Sun Adapter for DB2 Tutorials

ProcedureCreate the bpInsert Business Process

  1. From the Projects window, right-click your new project and select New -> Business Process from the shortcut menu.

  2. Rename your new business process to bpInsert.

  3. From the Projects window, expand CAPS Components Library -> Adapters -> File -> FileClient. Select and drag the FileClient.receive activity from the project tree to the BPEL Designer canvas.

  4. As in step 3, drag the FileClient.write activity from the CAPS Components Library -> Adapters -> File -> FileClient directory to the BPEL Designer canvas, and then drag another FileClient.write activity to the canvas, so that you have two FileClient.write activities in your BPEL process.

  5. From the Projects window, expand prjDB2_BPEL -> otdALL -> otdInputDTD_DB_employee. Select and drag the unmarshal activity from the project tree to the BPEL Designer canvas.

  6. Connect the following activities:

    • Start -> FileClient.receive

    • FileClient.receive -> FileClient.write

    • FileClient.write -> otdInputDTD_DB_employee.unmarshal

  7. Create the Insert Scope with a While statement.

    1. From the Business Process Designer toolbar, select a Scope element and drag it to the canvas. Double-click the Scope element to expand the element.

    2. Rename the Scope element to Insert.

    3. From the Business Process Designer toolbar, select a While element and drag it into the expanded Scope element box on the canvas. Double-click the While element to expand the element.

    4. From the Projects window, expand prjDB2_BPEL -> otdALL -> otdDB2. Select and drag the otdDB2.DB_EMPLOYEEInsert activity from the project tree into the expanded While element box on the BPEL Designer canvas.

    5. Connect the following elements: (See image below for details)

      • otdInputDTD_DB_employee.unmarshal -> Scope element input node

      • Scope element input node -> While element input node

      • While element input node -> otdDB2.DB_EMPLOYEEInsert

      • otdDB2.DB_EMPLOYEEInsert -> While element output node

      • While element output node -> Scope element output node

      • Scope element output node -> FileClient.write

      • FileClient.write -> End

    Image shows the bpInsert Business Process from the Business
Process Designer.
  8. Click Save All to save the latest changes to your project.