Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The SQL forwarding agent inserts UDR data into a database table according to your definitions of mapping between UDR fields and database table columns. This section is for describing the Batch workflow version of the  SQL forwarding agent. For the Real-Time version, you can refer to SQL Forwarding in Real-Time Workflows(4.13).

The agent also enables you to populate database columns with MIM values either by using a plain SQL statement, or by invoking a stored procedure that inserts the data.

...

The SQL tab contains configuration data that is related to the target database and the UDR Type.

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(4.

1

3).

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:

Info

Example

CALL test_proc($(UDR.field1), $(UDR.field2))

Note

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.

Commit Window Size

The number of UDRs to be processed between each database commit command. This value may be used to tune the performance. If tables are small and contain no Binary Objects, the value may be set to a higher value than the default. Default is 1000.

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

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 

see Agent Event(4.

1

3).

Note

Note!

Usage Engine 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.

...

The agent consumes the selected UDR type.

MIM

For information about the Usage Engine MIM and a list of the general MIM parameters, see Administration and Management(4.1).

...

Insert excerpt
Text Snippets (4.3)
Text Snippets (4.3)
nameMIM
nopaneltrue

Insert excerpt
Text Snippets (4.3)
Text Snippets (4.3)
nameNo Publish or access MIMs
nopaneltrue

Events

Agent Message Events

There are no message events for this agent.

Debug Events

Debug messages are dispatched in debug mode. During execution, the messages are displayed in the Workflow Monitor.

...

Insert excerpt
Text Snippets (4.3)
Text Snippets (4.3)
nameAgent Event Description
nopaneltrue

Insert excerpt
Text Snippets (4.3)
Text Snippets (4.3)
nameNo Agent Events
nopaneltrue

Debug Events

Insert excerpt
Text Snippets (4.3)
Text Snippets (4.3)
nameDebug Event Description
nopaneltrue

The agent produces the following debug events:

...