Hi Everyone!
@joram @martin.grofcik @filiphr
We need to register a process variable which needs to be attached to every execution our process instance creates(every task including script task). We have a class which extends the ExecutionListener to purpose the same wherein we set below in the notify() method of the ExecutionListener
public void notify(DelegateExecution execution)
{
execution.setVariablelocal(somevar)
}
But some reason this ExecutionListener is called only once (Probably as its attached to StartInstance) - so not sure how I can achieve setting a process variable in my Java code to be attached to every execution.
Note - variable needs to have unique values for every task(basically a local variable).
Below is how we register this listener.
FlowableListener somelisterner= new FlowableListener();
somelisterner.setEvent(ExecutionListener.EVENTNAME_START);
somelisterner.setImplementationType(ImplementationType.IMPLEMENTATION_TYPE_INSTANCE);
somelisterner.setInstance(new SomeClass());
bpmnParse.getCurrentProcess().getExecutionListeners().add(somelisterner);
Any ideas?
Thanks
Binish