AnsweredAssumed Answered

ExecutionEntity.getSuperExecution returning null

Question asked by heymjo on May 23, 2012

This might be stretching the boundaries of what is allowed through activiti API.. So i have a process definition that has a callactivity. This callactivity has another callactivity, effectively creating 3 levels of process instance execution

I have defined a ParseListener on the processengine that automatically adds an executionlistener to start/end of each process (implementing parseProcess) The executionlistener is a Spring bean. All this works fine and the listener is called for start/end of each process instance.

Now in the executionlistener i am trying to find out at which level i am. The listener method has defined this as listener method

public void onEvent(ExecutionEntity execution)

so i thought i could just call execution.getSuperExecution() recursively to go all the way up. This does not work. getSuperExecution only returns the immediate parent, and when you call on this immediate parent getSuperExecution again you get null. Am i misunderstanding what an execution is perhaps ?

ExecutionEntity also has getParent but that returns null in all cases.

Thanks for any ideas !