| 29 December 2006 |
For my last project we had to get access to the HumanWorkflow Tasklist that was created and maintained by Oracle BPEL 10.1.3.1. For this purpose BPEL comes with an API that should be used. However, for the latest release there isn’t very much documentation about it. After searching the internet I ended up in this thread of the BPEL forum.
So that’s why I decided to make this blog so other people running into problems with the API can use this code as a headstart.The project (which can be downloaded here: project.zip) was tested with JDeveloper 10.1.3.1.0 and a running instance of Oracle’s SOA Suite 10.1.3.1.0. The code uses the REMOTE_CLIENT option to connect to the BPEL instance. The BPEL instance is running on a machine called ‘pascal-laptop’ and I have set the RMI port for the OC4J instance to 12401. All other settings are defaults. When you open the project you will see a file called ‘wf_client_config.xml’. This file configures the location where the client can find the BPEL server and it’s services. You most likely will have to change this file to make it match your configuration.
If you are running into a ‘NoClassDefFoundError’ you have probably an error in the ‘wf_client_config.xml’ file. You should also check the libraries I have defined at the project, to make sure the used paths are all valid.
Now back to the sample code:
- The tasklist that is created will show ALL tasks in your BPEL instance. You would probably want to filter those. First of all you can replace ITaskQueryService.ASSIGNMENT_FILTER_ALL with ITaskQueryService.ASSIGNMENT_MY_AND_GROUP so only tasks that are assigned to the user logged in and/or his group are shown.
Furthermore you can use the method getFilter(…) to create a custom filter that filters the output. - Another thing I want to mention is the authenticate method. The authentication is now done with the oc4jadmin user. You can use the fourth parameter to ‘log in’ on behalf of another user. If I created a user ‘palma’ and supply this as a parameter I will only see the tasks of the user ‘palma’ and his group. We use this construction in our application. We extract the username from the authenticated session of the web-application and supply it with the authenticate method so only the tasks of that webuser (and his group) are shown.
- My final recommendation is, since the authentication is a rather ‘expensive’ method, when you have obtained a HumanworkflowContext to store it in your session context, so you can take it from there instead of authenticating yourself for each ‘query’.
I hope this blog and sample code helps. Please let me know what you think of it!


10 comments to 'Getting Human Workflow Tasklist from Oracle BPEL'
15 August 2007
Hi,
I can not download file bpelworklistreader.zip from your link. Is the link correct?
15 August 2007
Hi Edward,
You were right, the link had become invalid. I have corrected this and will check my other links ;)
Thx for your feedback.
27 August 2007
[...] base for this post is this one, to create a standalone HumanWorkflowReader. If you have this in place (or something similar) [...]
27 September 2007
Hi,
This post is very helpful. I want to use BPMAuthorizationService when using REMOTE_CLIENT. I am getting the object as null. Can anybody please post how we can use this service when using remote client.
13 November 2007
Yes, please. I agree with Rama. Anybody knows this?
26 April 2008
Has anyone got this working in SOA Suite 10.1.3.3.1? I got NoClassDefFoundError: com/collaxa/common/util/NonSyncPrintWriter at getTaskList. Any idea?
5 May 2008
tsangnn,
I have received this error..
NoClassDefFoundError: om/collaxa/common/util/NonSyncPrintWriter
when the RMI port had become invalid in my wf_client_config.xml file.
-E
9 May 2008
In my case it wasn’t the RMI port. It was the jar files in the project libraries. I re-arrange them and it worked. Thanks.
22 May 2008
Can you describe what kind of jars did you add ? And where did you add them ? I have the same problem and i cant find any clues…
22 May 2008
Here is the jar and directories you need to add to your Project Properties:
ADF Model Runtime
bpm-infra.jar
Orabpel-common.jar
Orabpel-thirdparty.jar
jazncore.jar
oc4jclient.jar
xml.jar
xmlparserv2.jar
orasaaj.jar
soap.jar
config
bpm-services.jar
schema
olite40.jar
ojdbc.jar
orabpel.jar
wsclient_extended.jar
You should find all these libs, jars and directories under your local JDev installation or your OC4J installation. Run a Search to find them then add them to your project properties under Libraries. You might need to download the wsclient_extended.jar from OTN. Hope this helps.
Leave a comment