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.
Start the Workflow Administration applet.
Add a new Criteria Workflow. For this example, we assume the workflow name is orabpeltest.
Add a step to the workflow. For this example, we use initiateprocess as the step name.
Add step users.
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.)
Add an exit condition by checking the Use Additional Exit Condition box and then clicking Edit…
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"))
Note: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.
On the Events tab, click on Edit… for the Entry event.
In the Edit Script dialog, click on the Custom tab.
Click on the Custom Script Expression checkbox to enable the script window.
Type the following lines into the script window:
<$if not conversationId$> <$obConfigID="process_3"$> <$obInvokeProcess(obConfigID)$> <$endif$>
Note: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.
Click OK to finish editing the script.
Click OK to finish editing the workflow step.
Enable the workflow.