WebSphere Process Server Human task custom properties
Published August 20th, 2008 in Websphere Process Server / Integration Developer
Have you ever come across a situation where you want to get a specific task instance based on some input data? For eg, if you have an order task, you may want to retrieve the human task based on the order Id. The order Id will be part of the business object and will be available only if you have the human task. When we querying the human task we cannot retrieve human task based on the value of business object associated with it. So to get a task instance with some order Id, it’s not a good solution to get the entire human task and loop through each task to check whether it matches with the order Id we have.
To address this issue WebSphere Process Server and WebSphere Integration Developer provides a nice solution of using custom properties. In WPS and WID you can attach a custom property while creating a human task and it is possible to retrieve the human task based on custom property value.
In today’s post I will be explaining how to create a custom property for a human task. For this I have created a simple Business Object called CustomBO. This will be the business object associated with our human task. My Business object looks like the one shown in the figure.
The interface used in my business process is
Create a human task using the interface we created in the previous step. Once you have created the human task click on properties window and click on Environment.
Click on Add to add a new custom property.
Enter the name for your custom property. The value of the custom property needs to come from the business object. So we will be using a replacement expression as the value from the custom property.
Now click on Ok.
You are done with creating a custom property for a human task.
To run this using BPC Explorer, add your human task to a business process and assemble it in the assembly diagram.
Launch your BPC explorer. Go to processes and start the business process. While starting the business process I entered 1 as the value for my id. Now to view this custom property value in your human task click on ‘My To-dos’ and find out the task we just created. Click on the task and go to the details page. Click on custom properties tab you can see the custom property with the values we specified.
I tried this example in WID 6.1 only. For users of WID 6.0.2 and lower versions, this method will not work (At least it was not working for me). For me in WID 6.0.2 after executing the process, the custom property value was the replacement expression itself. Ie, the replacement expression was not replaced by its value. I think it is because in WID 6.0.2 and lower versions the business object is available only after creating the human task. (Not sure its just a guess from me).
Anyways don’t worry I had used a nice workaround to fix this issue in WID 6.0.2, I created a escalation which will be executed after one second or so and from there reset the value of the custom properties. ![]()
If you enjoyed this post, make sure you subscribe to my RSS feed!
Related Posts:
3 Responses to “WebSphere Process Server Human task custom properties”
- 1 Pingback on Aug 22nd, 2008 at 5:50 pm
































One kind request is could you also upload the project interchanges so that it will be easy to import them and follow the blog instructions?
That was a good suggestion. I will start uploading the PI also from now on.
If I have the Project Interchange for any of the existing posts I will update the post with that PI too. (Usually I try all these posts in one module called TestModule which will be a total mess after two three tries and hence I will start deleting these things. So I am not sure whether I have the PIs of all the existing posts.)
Thanks