JBoss Community

Get subprocess id from outside the process

reply from Al Nadein in jBPM - View the full discussion
final Execution exectution = processInstance.findActiveExecutionIn("subprocess");
String pid = processEngineFactory.getProcessEngine().execute(
 new Command<String>(){
   public String execute(Environment env){
    return ((ExecutionImpl)execution).getSubProcessInstance().getId();
   }
 }
); 

 

fails with LazyInitializationException - i.e. the same exception as before

Reply to this message by going to Community

Start a new discussion in jBPM at Community