JBoss Community

Get subprocess id from outside the process

reply from Michael Wohlfart in jBPM - View the full discussion

use a command:


processEngine.execute(new Command() {
  public Object execute(Environment env) {
    Execution exe = processInstance.findActiveExecutionIn("subprocess-task");
    String subprocessid = ((ExecutionImpl)execution).getSubprocessInstance();

    System.out.printlnl("subprocessid is: " + subprocessid);
    return null;
  }
});

Reply to this message by going to Community

Start a new discussion in jBPM at Community