Advertisements
RSS

How to withdraw tasks and handle them in Oracle BPM

18 Jun

If you want to withdraw a Human Task in Oracle BPM there are multiple options. This blog post will first show 3 options and then explain how to model your Oracle BPM process to anticipate on the result of a withdrawn task.

1. The BPM Workspace

Using the default Oracle BPM WorkSpace to withdraw a task:

withdraw5

2. Using the TaskService

If you use a custom front-end (instead of the default Oracle BPM Workspace) you can use the Oracle SOA Suite TaskQueryService & TaskService to handle your tasks. In the TaskService there are operations named withdraw and withdrawTasks to either withdraw 1 or multiple tasks. The example below shows a withdrawTask operation request message.


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:tas="http://xmlns.oracle.com/bpel/workflow/taskService"
 xmlns:task="http://xmlns.oracle.com/bpel/workflow/task"
 xmlns:com="http://xmlns.oracle.com/bpel/workflow/common">
 <soapenv:Header/>
 <soapenv:Body>
 <tas:withdrawTask>
 <com:workflowContext>
 <com:credential>
 <com:login>weblogic</com:login>
 <com:password>welcome1</com:password>
 <com:onBehalfOfUser>weblogic</com:onBehalfOfUser>
 </com:credential>
 </com:workflowContext>
 <tas:taskId>a71a4c2b-b121-4cde-91af-79872dbda522</tas:taskId>
 </tas:withdrawTask>
 </soapenv:Body>
</soapenv:Envelope>

This solution is implemented in our Adaptive Case Management project in the case a specific (power)user is logged in and wants to withdraw the current task (and activity) where he/she is working on.

3. Using events/signal

When you want to withdraw a task without actually opening a task (or having access to it’s taskId) you can use a signal subprocess to receive an event.

withdraw4

The event can trigger an Update Task action which calls the withdraw operation from within the BPM process.

withdraw3

The Oracle BPM Process modeling

When using the withdrawTask the task state is set to “WITHDRAWN” when the task is closed. So make sure to use the data association on the output tab of the task to store the state in a process data object.

withdraw1

In the BPM process flow we can use an exclusive gateway to model the logic by checking the value of the taskState process data object.

withdraw2

Often we use gateways in Oracle BPM processes to check the outcome of a human task and model the outcome to different process flows. However keep in mind that the state can also inform about e.g. EXPIRED, ERROR or WITHDRAWN tasks.

withdraw7

References

Advertisements
 
2 Comments

Posted by on 18-06-2015 in BPM, Oracle

 

Tags: ,

2 responses to “How to withdraw tasks and handle them in Oracle BPM

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: