[jboss-user] [jBPM] - When do Sub Task Strategy executed?

Thomas Setiabudi do-not-reply at jboss.com
Wed Jan 30 05:59:10 EST 2013

Thomas Setiabudi [https://community.jboss.org/people/thomas.setiabudi] created the discussion

"When do Sub Task Strategy executed?"

To view the discussion, visit: https://community.jboss.org/message/795110#795110


We use JBPM 5.4.

We can set sub task strategy to a task, but we have some questions:

1. When do actually the code inside the execute(..) method of a Sub Task Strategy is called?

2. Where should we put the sub task strategy such as OnParentAbortAllSubTasksEndStrategy or OnAllSubTasksEndParentEndStrategy? on the parent task? on the sub task? both?

3. If we look at the implementation of org.jbpm.task.OnParentAbortAllSubTasksEndStrategy

public void execute(TaskServiceSession taskServiceSession, TaskService service, Task task) {
        List<TaskSummary> subTasks = taskServiceSession.getSubTasksByParent(task.getId(), "en-UK");
            for(TaskSummary taskSummary : subTasks){
                Task subTask = taskServiceSession.getTask(taskSummary.getId());
                service.addEventListener(new InternalTaskEventListener(taskServiceSession));
                service.getEventSupport().fireTaskCompleted( subTask.getId(),

when do this code:  service.getEventSupport().fireTaskCompleted( ..)
is executed?
Which part of it says that this will be executed when the parent task is aborted?

Any help is appreciated.

Thomas Setiabudi

Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130130/2b1256ff/attachment-0001.html 

More information about the jboss-user mailing list