Sun Adapter for Oracle Tutorials

Creating the Business Processes

The business process flow contains all the BPEL elements that make up a business process.

This section walks you through creating the project's five business processes:

ProcedureCreate the bpDelete Business Process

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

    The Business Process Designer opens and BusinessProcess1 is added to the Project Explorer tree.

  2. Rename BusinessProcess1 to bpDelete.

  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 prjOracle_BPEL -> otdALL -> otdOracle. Select and drag the otdOracle.DB_EMPLOYEEDelete activity from the project tree to the BPEL Designer canvas.

  6. Connect the activities in the bpDelete BPEL canvas by dragging your cursor from the output node of one activity to the input node of the next activity, as follows: (See image below for details)

    • Start -> FileClient.receive

    • FileClient.receive -> FileClient.write

    • FileClient.write -> otdOracle.DB_EMPLOYEEDelete

    • otdOracle.DB_EMPLOYEEDelete -> FileClient.write

    • FileClient.write -> End

    Image shows the dbDelete BPEL Process before the business
rules have been added.
  7. Click Save All to save the latest changes to your project.

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 prjOracle_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 prjOracle_BPEL -> otdALL -> otdOracle. Select and drag the otdOracle.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 -> otdOracle.DB_EMPLOYEEInsert

      • otdOracle.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.

ProcedureCreate the bpPsSelect 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 bpPsSelect.

  3. Add the following activities to the bpPsSelect Business Process canvas.

    • FileClient.Receive (CAPS Components Library -> Adapters -> File -> FileClient)

    • FileClient.Write

    • FileClient.Write

    • Select_psPSSelectAll (prjOracle_BPEL -> otdALL -> otdOracle)

  4. Connect the following activities:

    • Start -> FileClient.receive

    • FileClient.receive -> FileClient.write

    • FileClient.write -> otdOracle.Select_psPSSelectAll

  5. Create the Decision.

    1. From the Business Process Designer toolbar, select a Branching Activity -> Decision element and drag it to the canvas. This adds a Decision and Decision.end element to the canvas.

    2. 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.

    3. Rename the Scope element to Records found.

    4. From the Projects window, expand prjOracle_BPEL -> otdALL -> otdInputDTD_DB_employee. Select and drag the marshal activity from the project tree into the expanded Records found element box on the BPEL Designer canvas.

    5. From the Projects window, select and drag the FileClient.write activity from the project tree into the expanded Records found element box on the BPEL Designer canvas.

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

      • otdOracle.Select_psPSSelectAll -> Decision element input node

      • Decision element -> Records found input node

      • Records element input node -> otdInputDTD_DB_employee.marshal

      • otdInputDTD_DB_employee.marshal -> FileClient.write

      • FileClient.write -> Records found element output node

      • Records found element output node -> Decision.end

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

    8. Rename the Scope element to No Record.

    9. From the Projects window, select and drag the FileClient.write activity from the project tree into the expanded No Record element box on the BPEL Designer canvas.

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

      • otdOracle.Select_psPSSelectAll -> Decision element input node

      • Decision element -> No Record input node

      • No Record input node -> FileClient.write

      • FileClient.write -> No Record element output node

      • No Record element output node -> Decision.end

  6. Connect the following elements:

    • Decision.end -> FileClient.write

    • FileClient.write -> End

    Image shows the bpPsSelect Business Process from the
Business Process Designer.

ProcedureCreate the bpTableSelect 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 bpTableSelect.

  3. Add the following activities to the bpTableSelect Business Process canvas.

    • FileClient.Receive (CAPS Components Library -> Adapters -> File -> FileClient)

    • FileClient.Write

    • FileClient.Write

    • FileClient.Write

    • DB_EMPLOYEESelectAll (prjOracle_BPEL -> otdALL -> otdOracle)

    • marshal (prjOracle_BPEL -> otdALL -> otdInputDTD_DB_employee)

  4. Connect the following activities: (See image below for details)

    • Start -> FileClient.receive

    • FileClient.receive -> FileClient.write

    • FileClient.write -> otdOracle.DB_EMPLOYEESelectAll

    • otdOracle.DB_EMPLOYEESelectAll -> otdInputDTD_DB_employee.marshal

    • otdInputDTD_DB_employee.marshal -> FileClient.write

    • FileClient.write -> FileClient.write

    • FileClient.write -> End

    Image shows the bpTableSelect Business Process from the
Business Process Designer.

ProcedureCreate the bpUpdate 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 bpUpdate.

  3. Add the following activities to the bpTableSelect Business Process canvas.

    • FileClient.Receive (CAPS Components Library -> Adapters -> File -> FileClient)

    • FileClient.Write

    • FileClient.Write

    • DB_EMPLOYEEUpdate (prjOracle_BPEL -> otdALL -> otdOracle)

  4. Connect the following activities: (See image below for details)

    • Start -> FileClient.receive

    • FileClient.receive -> FileClient.write

    • FileClient.write -> otdOracle.DB_EMPLOYEEUpdate

    • otdOracle.DB_EMPLOYEEUpdate -> FileClient.write

    • FileClient.write -> End

    Image shows the bpTableSelect Business Process from the
Business Process Designer.
  5. Save your project.

Next Steps

For your next step, see Using Business Process Designer to Create Business Rules.