0
votes

I have a jbpm process, where I have a startNode -> scriptTask -> timer -> scriptTask -> endNode Within the script tasks I have a simple java method call.

Before starting the jbpm process, registered an event listner

EventListner listner = new EventListner();
ksession.addEventListener(listner);

ksession.startProcess(processName);

There is a custom EventListner class

@Override
public class EventListner extends DefaultProcessEventListener {
    public void afterProcessStarted(ProcessStartedEvent startEvent) {
    //Some code here
    }
}

While running the jbpm process,what I see, the afterProcessStarted API is called after the Java method call within the first script task

Unable to figure it out.Need Help.Thanks in advance

1

1 Answers

1
votes

This is as expected, the after process started event is only triggered when everything that was the result of starting the process was completed. It behaves as a stack. See http://docs.jboss.org/jbpm/v6.2/userguide/ch05.html#d0e1828