JBoss Community

Re: How do you get the active node of a process

created by Esteban Aliverti in jBPM - View the full discussion

You nees to use one of the "magic" castings of jBPM... :)

For example:

 

WorkflowProcessInstance process = (WorkflowProcessInstance) ksession.startProcess("some.id");

Assert.assertEquals("Ask for Emergency Information", process.getNodeInstances().iterator().next().getNodeName());

 

Remember that the active nodes are those that left the process instance in a waiting state. So, for example, you will never see a Script Task here.

Reply to this message by going to Community

Start a new discussion in jBPM at Community