Use a state node. Invoke your existing service from an action handler associated with the node-enter event. Create a new web service for your existing service to call back. In the new service implementation, load the token and signal it.
first thank you for response.
Yesterday I figured out something similar related to using State and invoke action which will call WS on node-enter event.
However, I am not sure what should I invoke in my WS callback method.
Should I pass to WS only process instance ID , assuming that I will have only one leaving transition from the State.
And then in callback method to obtain processInstance and to call:
should I also ALSO pass State (Node) name to WS,
find Token in Process instance and call token.signal():
Thanx for your support.
In general you need the tokenId (long), in case you model a process with multiple branches of execution and the transitionName (String), should you have multiple outgoing transitions at some point.
With these parameters, use jbpmContext.loadToken(tokenId), then call token.signal(transitionName).
You don't need the state, because the Token object you load will already contain a pointer to it.
Works very nice.