I have a process which is made of of various call activities. The idea is that an outer scheduler starts up an instance of the BPML diagram and based on the variable passed, it takes one of 4 routes. I’ve added a TaskListener to be invoked when tasks are created. The problem is that when I invoke the CallActivity and the first task within that process is hit:
String businessKey = (String) taskDelegate.getVariable(BUSINESS_KEY) is null and taskDelegate.getExecution().getProcessBusinessKey() is also null.
I invoke the main process with the following:
ProcessInstance newProcess = runtimeService.startProcessInstanceByKey(constants.PROCESS_NAME, obj.getBusinessKey(), properties);
So, my main problem is how do I get the business key after using a call activity within a task listener?