4.1 Configuring a Workflow

To integrate with BPEL process manager, you must first configure a Content Server workflow. There are many possible ways to configure a workflow. The following tasks configure the most basic type of workflow that integrates with BPEL process manager.

  1. Start the Workflow Administration applet.

  2. Add a new Criteria Workflow. For this example, we assume the workflow name is orabpeltest.

  3. Add a step to the workflow. For this example, we use initiateprocess as the step name.

  4. Add step users.

    Figure 4-1 Add New Step Dialog

    Add New Step dialog
  5. Change to the Exit Conditions tab and select at least 1 reviewer. (This is an arbitrary setting, but in this instance, it leaves the content item in this workflow step after a BPEL process is initiated.)

    Figure 4-2 Add New Step Dialog, Exit Conditions Tab

    Add New Step dialog, Exit Conditions tab
  6. Add an exit condition by checking the Use Additional Exit Condition box and then clicking Edit…

  7. In the Edit Additional Exit Condition dialog, check the Custom Condition Expression and add the following script:

    wfGet("conversationId") and 
    obIsInstanceClosed("process_3", wfGet("conversationId"))

    Figure 4-3 Additional Exit Condition Dialog

    Additional Exit Condition dialog


    Note that the IdocScript function obIsInstanceClosed tests if the BPEL instance with the specified conversation ID is still open. The conversation ID is stored in the workflow companion data when the process is invoked.
  8. On the Events tab, click on Edit… for the Entry event.

    Figure 4-4 Add New Step Dialog, Events Tab

    Add New Step dialog, Events tab
  9. In the Edit Script dialog, click on the Custom tab.

  10. Click on the Custom Script Expression checkbox to enable the script window.

  11. Type the following lines into the script window:

    <$if not conversationId$>

    Figure 4-5 Edit Script Dialog

    Edit Script dialog


    The component defines IdocScript functions that can be used to start and determine the state of an invoked process. The obInvokeProcess Idoc function takes the name of the process configuration ID as its one argument. Alternatively, you can use the ORABPEL_INVOKE_BPEL service. This service requires the obConfigID variable to be set to the name of a process configuration. The service reads the process configuration and uses it to determine how to connect to BPEL process manager.
  12. Click OK to finish editing the script.

  13. Click OK to finish editing the workflow step.

  14. Enable the workflow.