*/
public void executeModelObject(ModelObject mo, EngineExecutor ee)
{
TokenContext context = ee.getTokenContext();
NodeSocket entrySocket = context.getCurrentSocket();
WaitStateNode node = (WaitStateNode) entrySocket.getNode();
// A wait state node usually is always persistent, so make the engine persist the process state.
context.setLifecycleRequest(LifecycleRequest.SUSPEND_IMMEDIATE);
// Execution will continue at the default exit socket when triggered by the application program.
NodeSocket nextSocket = node.getDefaultExitSocket();
if (nextSocket == null)
{
String msg = LogUtil.error(getClass(), "No default exit socket present for wait state node $0. [{1}]", node.getQualifier(), context);
throw new EngineException("NoDefaultExitSocket", msg);
}
context.setCurrentSocket(nextSocket);
}