4 Replies Latest reply on Jun 18, 2015 6:07 PM by Dan Atwood

    suspend timers on human task




      I am using suspendTask operation available on TaskService Web Service to programmatically suspend human tasks from ADF. It is working fine. The problem is that, i have a timer on that human task which is of interrupting type. Now, this timer triggers after a specified time even if the human task is in suspended state.


      This makes me believe that timer does not differentiate suspended and assigned tasks. Unfortunately, the documentation does not detail out the behavior.


      I tried using suspendTimers operation available on same TaskService. Even after firing this operation for a particular taskId, the timer gets triggered.


      Has anyone experienced this scenario?


      Any pointers/ suggestions will help.

      Many thanks in advance.




        • 1. Re: suspend timers on human task

          Update -


          I am able to reproduce the issue using simple human tasks with timer on one of the human task. I suspended the human task using BPM workspace. Still the timer on the suspended human task fires based on the setting of the timer. Is this expected behavior or am i hitting some kind of bug?


          Attached sample with which i reproduced the issue.


          Request any one who is aware of this issue to provide me with some pointers.




          • 2. Re: suspend timers on human task
            Dan Atwood

            Know it is more confusing than it should be, but there are two deadlines in play with Oracle BPM.

            1. Boundary Timer Event - Process activities can have timer boundary events that (if set to "Interrupt") cause the work item instance to leave the activity in the process and flow through the sequence flow leaving the boundary timer event. believe what the problem is that you have a boundary timer event, but it is on the activity in the process.
            2. Human Task Deadline - Every user activity in the process has a human task associated with it.  This is set in the human task by clicking the "Deadlines" tab -> set the "Task Duration Settings" dropdown to "Expire After".

            When you suspend an instance you are suspending the human task inside the interactive User activity and not the actual work item instance.  What you have in your process is a boundary timer event that is expiring.  Even if you have suspended your human task, the boundary timer event will still expire and the instance will continue to the activity the boundary timer event is connected to.


            If you want this to work with a human task deadline so that your suspend action will work the way you want it to, you would need to get rid of the boundary timer on the activity and instead just have a deadline on the human task.  Right now, you have a bunch of suspended human tasks that are orphans.



            1 person found this helpful
            • 3. Re: suspend timers on human task

              Hi Dan,


              Thanks for the pointers. At present we modified the process to handle the timer firing issue. I will try to accommodate human task expiration, introduce a check based on task state and modify the flow accordingly.


              Coming to suspended human tasks, request you to provide some insight on purging human tasks as i cannot find any information on this.




              • 4. Re: suspend timers on human task
                Dan Atwood

                Hi Sai,


                Guessing you might have already have gotten into this, but look at the 2 BPM Web Service APIs:
                - TaskQueryService (http://{machineName}:{port}/integration/services/TaskQueryService/TaskQueryService?WSDL)
                - TaskService (http://{machineName}:{port}/integration/services/TaskService/TaskServicePort?WSDL).


                Something you might want to consider is to use the TaskQueryService's queryTasks method to get a list of the tasks currently having a "SUSPENDED" state using this predicate element:

                This will return the list of tasks that are suspended along with enough of their payload to determine if they are tasks that should be taken out of a suspended state.

                Using the taskId from each task that you'd like to remove from being suspended, you might want to use the TaskQueryService's resumeTasks method using this something like this:


                          <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tas="http://xmlns.oracle.com/bpel/workflow/taskService"  xmlns:com="http://xmlns.oracle.com/bpel/workflow/common">
                                   <!--Zero or more repetitions of the taskId's to resume:-->


                Hope this helps,