* @throws OpenBPException On error
*/
public void executeModelObject(ModelObject mo, EngineExecutor ee)
{
TokenContext context = ee.getTokenContext();
JavaActivityItem activity = (JavaActivityItem) mo;
NodeSocket nextSocket = null;
TokenContext oldContext = context;
HandlerContext hc = getEngine().executeHandler(activity.getHandlerDefinition(), HandlerTypes.ACTIVITY, context, context.getCurrentSocket(), nextSocket);
if (hc != null)
{
context = hc.getTokenContext();
if (context != oldContext)
{
// Token context instance has changed due to rollback
ee.setTokenContext(context);
return;
}
nextSocket = hc.getNextSocket();
if (nextSocket == null)
{
String msg = LogUtil.error(getClass(), "Handler of activity $0 did not provide a a socket to continue with. [{1}]", activity.getQualifier(), context);
throw new EngineException("MissingNextSocket", msg);
}
}
if (nextSocket != null)