Prerequisite
A stored procedure in the desired database has to be created, which contains the business logic to be performed on the data coming from Fiorano. For example, a stored procedure stores the callout parameters in a predefined database table.
Configuring Database Callout file
Open the configuration file: $FIORANO_HOME/esb/server/profiles/$PROFILE_NAME/FES/conf/callout.cfg where the database and stored procedure configuration can be done and then modify the content as follows:
Database Connection Properties
- Uncomment JDBC_DRIVER string for DB which is to be configured.
- Uncomment JDBC_CONNECTION_URL string and provide the IP address of the machine in which DB is configured and provide the database name.
- Provide the login name for database.
- Provide the password for database.
Callout Procedure
After the Connection Properties are set, provide the value of CALLOUT_PROCEDURE as follows:
call <qualified name of the stored procedure > (?,...)
Callout Parameters
Provide the PARAMETER_INFO as a semicolon-separated list of parameters with each parameter information in the following format:
<FirstParamNameInStoreProcedureDefinition>,IN|OUT|INOUT,<datatype>
Supported datatypes are varchar, int, datetime (to be used in conjunction with InTime value source as explained below), and boolean.
Adding DB Support Jar path
Navigate to the path from which Enterprise server is started ($FioranoHome/esb/fes/bin or $FioranoHome/esb/server/bin) and open fes.conf or server.conf accordingly. Provide the path of the support jar along with the support jar name under the section <java.classpath>.
Enabling Callout at Server Level
Callout can be enabled by any of the following options.
Dashboard
- Start Enterprise Server (FES) and login to Dashboard.
- Navigate to Advanced Properties > Advanced Properties.
- Change the EnableCallout attribute value to 'true' in SBW.
Connection Management
- Start Enterprise Server (FES) and open eStudio .
- Open Connection Management.
- Log on to FES-JMX, navigate to Fiorano > Esb > Sbw > SBWManager > SBWManager > Config.
- Enable viewing Expert Properties.
- Under Attributes, set the value of EnableCallout to 'true' and save the configuration.
Profile Management
- Stop the Enterprise Server (FES) if it is running and then open eStudio .
- Open Profile Management perspective and open FES profile.
- Navigate to Fiorano > Esb > Sbw > SBWManager.
- Check the checkbox Show Expert Properties.
- Check the Enable Callout check box.
- Save the profile and restart the server.
Configuring callout in an Event Process
- Create an Event Process with Feeder > Display.
- Select output port of Feeder and navigate to Properties > General.
- Set Enable Callout to YES. Click Callout Parameters button.
- The parameters will be loaded based on the configuration provided in callout.cfg file.
- Click ValueSource drop-down as shown below to provide mapping from the monitoring data to the parameters of the stored procedure.
- ValueSource drop-down contains the below values which can be chosen as per the given scenario:
- Body: Stores entire message body in DB column.
- XPath: Stores specific element of the message body based on XPath.
- To configure XPath, select 'XPath' from ValueSource drop-down.
- Click Value ellipsis button to provide appropriate Xpath.
- Configure XPath corresponding to the element to be saved.
- To configure XPath, select 'XPath' from ValueSource drop-down.
- AppContext: Passes the content of Application content as parameter to the procedure.
- AppContextXPath: AppContextXPath is used to map specific element from the AppContext. The manner in which it is configured is similar to how XPath is configured above.
- Property: The value of a JMS property that is present in the message can be mapped using this. This option can be used to map different details about the flow such as component name, event process name, event process environment, or any custom properties used in the flow.
- Constant: Maps Constant value provided in the 'Value' field.
- Intime: The timestamp at which the message entered a component can be logged by selecting this. The data type in stored procedure should be 'datetime' for this. The value will be available at the output port of the component.
ExecutionTime: The amount of time that the component took can be mapped using this. The time is returned in milliseconds.
After the above actions are performed, Callout Configuration gets completed. After launching the Event Process, the database configured will be updated by the data from the parameters mapped in Callout Parameters.