Package org.openbp.server.context

Examples of org.openbp.server.context.TokenContextService.saveContext()


    TokenContext tc1 = startSimpleSignalSetProcess("TestSignal1", "Done", 0);
    tc1.setLifecycleState(LifecycleState.SELECTED);
    tc1.setLifecycleRequest(LifecycleRequest.NONE);
    tc1.setNodeId(localHost);
    tokenContextService.saveContext(tc1);

    TokenContext tc2 = startSimpleSignalSetProcess("TestSignal2", "Done", 0);
    tc2.setLifecycleState(LifecycleState.SELECTED);
    tc2.setLifecycleRequest(LifecycleRequest.NONE);
    tc2.setNodeId("DifferentHost");
View Full Code Here


    TokenContext tc2 = startSimpleSignalSetProcess("TestSignal2", "Done", 0);
    tc2.setLifecycleState(LifecycleState.SELECTED);
    tc2.setLifecycleRequest(LifecycleRequest.NONE);
    tc2.setNodeId("DifferentHost");
    tokenContextService.saveContext(tc2);

    TokenContext tc3 = startSimpleSignalSetProcess("TestSignal3", "Done", 0);
    tc3.setLifecycleState(LifecycleState.RUNNING);
    tc3.setLifecycleRequest(LifecycleRequest.NONE);
    tc3.setNodeId(localHost);
View Full Code Here

    TokenContext tc3 = startSimpleSignalSetProcess("TestSignal3", "Done", 0);
    tc3.setLifecycleState(LifecycleState.RUNNING);
    tc3.setLifecycleRequest(LifecycleRequest.NONE);
    tc3.setNodeId(localHost);
    tokenContextService.saveContext(tc3);

    TokenContext tc4 = startSimpleSignalSetProcess("TestSignal4", "Done", 0);
    tc4.setLifecycleState(LifecycleState.ERROR);
    tc4.setLifecycleRequest(LifecycleRequest.NONE);
    tc4.setNodeId(localHost);
View Full Code Here

    TokenContext tc4 = startSimpleSignalSetProcess("TestSignal4", "Done", 0);
    tc4.setLifecycleState(LifecycleState.ERROR);
    tc4.setLifecycleRequest(LifecycleRequest.NONE);
    tc4.setNodeId(localHost);
    tokenContextService.saveContext(tc4);

    TokenContext tc5 = startSimpleSignalSetProcess("TestSignal5", "Done", 0);
    tokenContextService.saveContext(tc5);

    getProcessServer().getEngine().commit();
View Full Code Here

    tc4.setLifecycleRequest(LifecycleRequest.NONE);
    tc4.setNodeId(localHost);
    tokenContextService.saveContext(tc4);

    TokenContext tc5 = startSimpleSignalSetProcess("TestSignal5", "Done", 0);
    tokenContextService.saveContext(tc5);

    getProcessServer().getEngine().commit();

    // Execute those that can be executed
    getProcessFacade().executePendingContextsInThisThread();
View Full Code Here

    // Cleanup the last ones
    tc2 = tokenContextService.getContextById(tc2.getId());
    tc2.setLifecycleState(LifecycleState.SUSPENDED);
    tc2.setLifecycleRequest(LifecycleRequest.RESUME);
    tc2.setNodeId(localHost);
    tokenContextService.saveContext(tc2);

    tc4 = tokenContextService.getContextById(tc4.getId());
    tc4.setLifecycleState(LifecycleState.SUSPENDED);
    tc4.setLifecycleRequest(LifecycleRequest.RESUME);
    tokenContextService.saveContext(tc4);
View Full Code Here

    tokenContextService.saveContext(tc2);

    tc4 = tokenContextService.getContextById(tc4.getId());
    tc4.setLifecycleState(LifecycleState.SUSPENDED);
    tc4.setLifecycleRequest(LifecycleRequest.RESUME);
    tokenContextService.saveContext(tc4);

    tokenContextService.commit();

    getProcessFacade().executePendingContextsInThisThread();
    assertEquals("Done", TestCaseSyncMgr.getInstance().getSignal(null, "TestSignal2"));
View Full Code Here

      }
    }

    if (updateContext)
    {
      contextService.saveContext(dbContext);
      engine.commit();
    }

    // Make the rolled-back context the current one
    return dbContext;
View Full Code Here

          sessionRegistry.registerSession(context.getId(), context, sessionTimeout);
        }
      }

      TokenContextService contextService = engine.getTokenContextService();
      contextService.saveContext(context);
      engine.commit();

      do
      {
        executeNextStep();
View Full Code Here

      // This node type requires persistence of the process state
      LogUtil.trace(getClass(), "Suspending token (immediate suspend). [{0}]", context);

      engine.changeTokenState(context, LifecycleState.SUSPENDED, LifecycleRequest.NONE);

      contextService.saveContext(context);
      engine.commit();
    }
    else if (lifecycleRequest == LifecycleRequest.STOP)
    {
      // Normally terminate processing
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.