We have the below work flow
start state->node1->node2->node3->node4->end state
We are trying to jump from node2 to end state directly but still node3 and node 4 are getting executed by executuioj context. We tried setNode and other stuff but its not working as expected
EndState endState = (EndState)executionContext.getNode().getProcessDefinition().getNode("end-state");
executionContext.getToken().setNode(endState);
Can you please advise on how this can be done?