Sun Adapter for DB2 Tutorials

Creating the bpUpdate Business Rules

The bpTableSelect business process describes how to select all records the DB2 database using the Business Process Designer.


Note –

The where clause in the business rule reads the trigger value as a placeholder for input. This permits you to modify the query to select a specific record. Also note that all records are selected from the database when the TriggerTableSelect.in file is empty.


ProcedureCreate the bpUpdate Business Rules

  1. Double-click bpUpdate in the Projects window to open the Business Process Designer to the bpUpdate Business Process.

  2. Create the bpUpdate FileClient.receive -> FileClient.write rule.

    1. Add a Business Rule to the link between FileClient.receive and FileClient.write and double-click the new Business Rule icon to open the Business Rule Designer.

    2. Create a string literal and enter Update the Rate and Last_update fields...as the String value.

    3. Map the Update the Rate and Last_update fields... output node of the string literal method box, to text under FileClient.write.input in the Input pane (right pane) of the Business Rule Designer.

  3. Create the FileClient.write -> otdDB2.DB_EMPLOYEEUpdate rule.

    1. Add a Business Rule to the link between FileClient.write and otdDB2.DB_EMPLOYEEUpdate and double-click the new Business Rule icon to open the Business Rule Designer.

    2. Create a string literal and enter 2008-10-21as the String value.

    3. Map the 2008-10-21 output node of the string literal method box, to LAST_UPDATE under otdDB2.DB_EMPLOYEEUpdate.Input -> insert in the Input pane (right pane) of the Business Rule Designer.

    4. Create another string literal and enter 23.0as the String value.

    5. Map the 23.0 output node of the string literal method box, to RATE under otdDB2.DB_EMPLOYEEUpdate.Input -> insert in the Input pane (right pane) of the Business Rule Designer.

    6. Map the text under FileClient.receive.Output1 in the Output pane of the Business Rule Designer, to whereClause under otdDB2.DB_EMPLOYEEUpdate.Input -> insert in the Input pane (right pane) of the Business Rule Designer.

  4. Create the otdDB2.DB_EMPLOYEEUpdate -> FileClient.write rule.

    1. Create a string literal and enter Update Doneas the String value.

    2. Map the Update Done output node of the string literal method box, to text under FileClient.write.Input1 in the Input pane of the Business Rule Designer.

  5. Save your Project.

Next Steps

For your next step, see Creating the Connectivity Maps .