Tuesday, June 08, 2010

Oracle BPEL Worklist Application

Note to self on Oracle BPEL/BPM/BPA Human Interaction / Worklist task handling...

To add a Worklist interaction to a BPEL process, add a "Human Task" from the Component Palette. By default, this is set up with an Invoke to initiate the task, and also a Receive to receive the response.

The Receive causes the task to return immediately, which doesn't help if you want to try out the actual Human Interaction bit. If you comment out the Receive, and replace it with a Pick on the same partner link (to wait for an "onTaskCompleted" message (or it could be "onTaskAssigned", or "onTaskUpdated", or even "onSubTaskUpdated", depending what you want to do with it...)), you can cause it to wait for a real response. I'll come to generating that in a minute.

On the Pick, also add an Alarm branch to cause it to time out after, say, 30 minutes.
After the Pick, by default a set of options are generated to handle what comes back from the task once it has been dealt with. The default outcomes are APPROVE and REJECT, but the outcome can also become EXPIRED, STALE, and others.

Adding the Human Task also causes a .task to be opened, with a whole bunch of defaults filled in. For a test, you can set the task to be completed by a valid user "approving" or "rejecting" the task. To set the Human Task up to do this, open up the Assignment and Routing Policy section and click on the green plus to add a Participant. Fill in the dialogue to add a name with a userid of "bpeladmin". This allows you to use a default user who should be included in the default installation. You should now see that you have one user acting as a "SingleApprover". Save the Human Task.

If you now deploy and invoke the BPEL process, you should now see a process instance sitting there waiting for the Human Task to complete.

To complete the Human Task, you need to log onto the Worklist Application provided in the default install. Under Windows, if you're running the BPEL/BPM on your local machine, the default Worklist application is under Start -> All Programs -> -> Oracle BPEL Process Manager -> Worklist Application.
This resolves to the URL where the Worklist application is running. It'll be something like:
http://localhost:8888/integration/worklistapp/Login

If you login with the user that you used for the task - a usable default one seems to be "bpeladmin" with password of "welcome1". This should log you into the BPM Worklist Application and you should see the Task sitting there in the "My Tasks" section of the logged-in user.

You can now choose what to do with the task. If you "approve", or "reject", you should then see the BPEL process instance completing on the BPEL console.

1 Comments:

Blogger Publishing Editor said...

Another good reference to BPEL is http://bpelresource.com/

3:39 PM  

Post a Comment

Subscribe to Post Comments [Atom]

Links to this post:

Create a Link

<< Home