AnsweredAssumed Answered

How to determine when process is complete after signal()?

Question asked by gottsch on May 24, 2013
Latest reply on Jun 4, 2013 by frederikheremans1
Hello,
I have an issue where I pass the process/execution a process variable, signal() it which executes tasks that work on the varaible, and then try to retrieve the variable again.  Everything works fine, unless the endEvent is encountered at which point the execution no longer exists and the variables are in history.  So my question is, how can I determine if the endEvent has occurred?

Snippet:

// get the process instance id from object
String piid = request.getProcessInstanceId();

// add the request process variable
runtimeService.setVariable(execution.getId(), "request", request);
      
// propagate process
runtimeService.signal(execution.getId());
      
// retrieve the request from the workflow
request = (IPncRequest) runtimeService.getVariable(piid, "request");


Thanks

Outcomes