Search code examples
jbpmbpmn

Is it possible to access a process instance id from within the instance? (jbpm)


We're hoping to put a running instance id into context within our jbpm workflow so we can use it along with the remote queries to pull data back about our running application.

Anyone know if this is possible? And if so how is it done?


Solution

  • ¿Where are you planing to do that? On a "Script Task" you can access to a running process Instance with:

    System.out.println("processInstanceId = "+kcontext.getProcessInstance().getId());