Discussion:
[jboss-user] [jBPM] - When do Sub Task Strategy executed?
Thomas Setiabudi
2013-01-30 10:59:10 UTC
Permalink
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

--------------------------------------------------------------
Hi,

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(),
                                                                subTask.getTaskData().getActualOwner().getId(),
                                                                subTask.getTaskData().getProcessSessionId());
            }
    }
 


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.


Regards,
Thomas Setiabudi
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/795110#795110]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Maciej Swiderski
2013-01-31 17:47:06 UTC
Permalink
Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion

"Re: When do Sub Task Strategy executed?"

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

--------------------------------------------------------------
as far as I know this feature is not yet completed and most likely you can expect it to be in version 6.

HTH
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/795460#795460]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Loading...