Our web app currently starts a process with a business key …
String processName = getProcessName();
String businessKey = getBusinessKey();
ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
RuntimeService runTimeService = processEngine.getRuntimeService();
ProcessInstance processInstance = runTimeService.startProcessInstanceByKey(processName, businessKey);
the process runs and then waits at the first user task to be externally signalled via a TaskListener attached to the User Task … so in my
public class GenericHumanTaskListener implements TaskListener {
public void notify (DelegateTask delegateTask) { … }
}
function I am trying to retrieve the business key that the process started with through the delegateTask object … is there a way to do so?I guess the alternative would be to start the process with a variables HashMap … but I was hoping the business key would be retrievable without having to restore to putting it in the variables map.