Expiring a Human Task that forgot to expire (workaround)

In BPM/SOA  11g, there are some known product issues which causes a Human Task with an expiry set to not to expire and remain running forever. There are some patches available to prevent this from occurring . This issue used to occur (as per my observation) when:

a) SOA server hosting the task runtime was not running when the task expired.

b) A redeployment of the composite containing the task was done at the same revision as the existing deployed composite.

The permanent fix is to get the patch applied. In case, this was not done and ended up with a number of human tasks in production that forgot to expire, then the below workaround can be done to expire the tasks.

1- Get the task number from the audit trail of the task in EM console.

task

2. Query wftask table in the SOAINFRA DB schema of the SOA runtime.

Select taskid from wftask where tasknumber=4032649;

3. Once the task number is obtained, use a SOAP testing tool like SOAP UI (or in case if you have OSB wrapper built,use the OSB test console) to invoke the out of the box TaskService.This runs at this relative URL on the SOA server:

integration/services/TaskService/TaskServicePort.

e.g. http://localhost:8001/integration/services/TaskService/TaskServicePort, where the soa server runs on port 8001.

4. The first operation to be invoked is suspendTimers. Sample request payload below.

    <tas1:suspendTimers     xmlns:com="http://xmlns.oracle.com/bpel/workflow/common" xmlns:task="http://xmlns.oracle.com/bpel/workflow/task" xmlns:tas="http://xmlns.oracle.com/bpel/workflow/TaskEvidenceService" xmlns:tas1="http://xmlns.oracle.com/bpel/workflow/taskService">

    <com:workflowContext>
    
    <com:credential>
    <com:login>weblogic</com:login>
    <com:password>redacted</com:password>
    </com:credential>
    </com:workflowContext>
    <tas1:taskId>9158fd0b-2570-489f-9da8-502ba3462355</tas1:taskId>
    </tas1:suspendTimers>
  • login and password should be for an user who has SOAAdmin role.
  • taskId is obtained from querying wftask table in step 2.

5. After running suspendTimers, run the resumeTimers operation. The payload is similar as above.

    <tas1:resumeTimers     xmlns:com="http://xmlns.oracle.com/bpel/workflow/common" xmlns:task="http://xmlns.oracle.com/bpel/workflow/task" xmlns:tas="http://xmlns.oracle.com/bpel/workflow/TaskEvidenceService" xmlns:tas1="http://xmlns.oracle.com/bpel/workflow/taskService">

    <com:workflowContext>
    
    <com:credential>
    <com:login>weblogic</com:login>
    <com:password>redacted</com:password>
    </com:credential>
    </com:workflowContext>
    <tas1:taskId>9158fd0b-2570-489f-9da8-502ba3462355</tas1:taskId>
    </tas1:resumeTimers>

This will wake up the task and the task will expire and the BPM process will move to the next activity in the process.

Advertisements

About atheek

I am a Weblogic consultant working in Middleware/Integration area.
This entry was posted in BPM, HumanTasks, SOA. Bookmark the permalink.

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