You open the SQL forwarding agent agent configuration dialog from a workflow configuration: you can right-click the agent icon and select Configuration..., or double-click the agent icon.
SQL Tab
The SQL tab contains configuration data that is related to the target database and the UDR Type.
The SQL forwarding agent configuration dialog - SQL tab
Setting | Description |
---|---|
Database | Profile defining the database that the agent is supposed to connect and forward data to. When selecting the Browse button next to the field it will open a browser where one and only one database profile can be selected. For further information about database profile setup, see Database Profile. |
UDR Type | The UDR type the agent accesses as input type. When selecting the Browse button next to the field it will open the UDR Internal Format Browser and one and only one UDR type can be selected. |
SQL Statement | The user enters a SQL statement should send to the database. By right clicking in the pane, selecting MIM Assistance..., the MIM Browser appears. The user can select a MIM value to be used in the SQL query. The value of the MIM will be used in the SQL query during execution. The name of the MIM Value for example "Workflow.Batch Count" will be displayed in blue color as "$(Workflow.Batch Count)" in the text field. By right clicking in the pane, selecting UDR Assistance..., the UDR Internal Format Browser appears. The user can select a field from the UDR specified in the UDR Type selector. The name of the UDR field name for example "UDR.Fieldname" will be displayed in green color as "$(UDR.Fieldname)" in the text field. If the input type UDR is changed after writing the SQL syntax the GUI validation will fail (unless the different UDR's have identical field names). The field value will be used as an input variable in the SQL Statement in the same way as MIM values do. There is support for Stored Procedures. When using the forward agent use JDBC to call a stored procedure in the same way as a normal call. The exact supported syntax for stored procedures varies between databases. An example of a procedure with two input arguments could have a SQL statement looking like this: Example CALL test_proc($(UDR.field1), $(UDR.field2)) Note! The statement syntax of the statement will not be validated in the GUI, but references to MIM values are validated. If an incorrect SQL statement is entered this will generate an exception during runtime. |
Use Prepare Call | Enable this checkbox to allow the SQL Forwarding agent to use prepareCall when using the agent to conduct the SQL operations. When left unchecked, the SQL Forwarding agent will use preparedStatement for all its SQL operations. |
Commit Window Size | The number of UDRs to be processed between each database A number field where it is possible to enter an integer number. If the check box is enabled the agent will call commit on the database after reaching the specified number of successful executions. It will also call commit when receiving endBatch. If the check box is disabled, the agent inserts every 500 UDRs, and only does a commit when receiving endBatch. |
Route on SQL Exception | Check to prevent the workflow from aborting when selected exceptions occur. Such exceptions are filtered by the rule that you specify in the Regular Expression Criteria editing pane. Instead of aborting the workflow due to these exceptions, the workflow proceeds to the agent that you now can route the selected exceptions to. Note! Since the error message contains linefeed, the regular expression has to adjusted according to this. Start the regular expression with "(?s)" to ignore linefeed, for example: (?s).*ORA-001.* Clear to abort the workflow on the occurrence of any exception. |
Upon Exception, route entire executed batch instead of single UDR | Select this check box to prevent the workflow from retrying each UDR if prepareStatement.execute fails, causing an Exception. If you select this check box, an errorUDRList is routed instead of an errorUDR. |
Regular Expression Criteria | Use the Java Regular Expression syntax convention when you enter the expression that selects the SQL error messages. The SQL errors that match this criteria enable the agent to identify the data that should be routed further along the workflow. When the agent identifies erroneous data it generates an Agent Message Event. For further information, see 4.3.15 Agent Event. |
Note!
specific database tables from the Platform database should never be utilized as targets for output as this might cause severe damage to the system in terms of data corruption that in turn might make the system unusable.