Package org.huihoo.willow

Examples of org.huihoo.willow.Context


    UserDatabaseRealm userRealm=new UserDatabaseRealm();
    engine.setRealmDatabase(userRealm);
   
    embedded.setEngine(engine);
   
    Context context=embedded.createContext(contextFile.getName(),contextFile.getAbsolutePath());
    context.setAutoDeploy(false);
    context.setReloadable(false);
    engine.addChild(context);
   
    try
    {
      embedded.start();
View Full Code Here


    WorkflowParticipant participant = session.getParticipant();
    String userid = participant.getUUID();
    String password = participant.getPassword();
    if (willow_engine != null)
    {
      Context context = willow_engine.findChild(service_name);
      if (context != null && (context instanceof WorkflowService))
      {
        WorkflowService workflowService = (WorkflowService) context;
        if (!authenticate(workflowService, userid, password))
        {
View Full Code Here

    if (willow_engine != null)
    {
      Context[] contexts = willow_engine.findChildren();
      for(int i=0;i<contexts.length;++i)
      {
        Context context=contexts[i];
       
        if (context != null && (context instanceof WorkflowService))
        {
          WorkflowService workflowService = (WorkflowService) context;
          if (authenticate(workflowService, userid, password))
View Full Code Here

    if (log.isDebugEnabled())
      log.debug("Process removeChild[parent=" + parent + ",child=" + child + "]");

    if (child instanceof Context)
    {
      Context context = (Context) child;
      if (context instanceof StandardContext)
      {
        ((StandardContext) context).removePropertyChangeListener(this);
      }
    }
View Full Code Here

  public Context[] findChildren()
  {

    synchronized (children)
    {
      Context results[] = new Context[children.size()];
      return ((Context[]) children.values().toArray(results));
    }

  }
View Full Code Here

        log.error("StandardEngine.setSessionManager: start: ", e);
      }
    }
   
    // Start our child containers, if any
    Context children[] = findChildren();
    for (int i = 0; i < children.length; i++)
    {     
      if (children[i] instanceof Lifecycle)
      {
        ((Lifecycle) children[i]).start();
View Full Code Here

  }

  public void stop() throws LifecycleException
  {
    // Stop our child containers, if any
    Context children[] = findChildren();
    for (int i = 0; i < children.length; i++)
    {
      if (children[i] instanceof Lifecycle)
      {
        ((Lifecycle) children[i]).stop();
View Full Code Here

  // LiveDispatcher utilities  
  //------------------------------------------------------------------------------------                                       
  public boolean accept(String sessionID, SerialWork workItem)
    throws WorkflowException, RemoteException
  {
    Context cotext=(Context)this.workflowService;
    SessionManager manager=cotext.getEngine().getSessionManager();
    WorkflowSession session=manager.findSession(sessionID);
   
    WorkflowProcess workflowProcess=workflowService.findWorkflowPackage(workItem.getPackageID()).getMainProcess();
    WorkflowCase workflowCase=workflowService.getCaseDatabase().findWorkflowCase(session,workflowProcess,workItem.getCaseID());
    WorkflowWork workflowWork=workflowService.getCaseDatabase().findWorkflowWork(session,workflowProcess,workflowCase,workItem.getUUID());   
View Full Code Here

    return getWrappedObject().accept(session,workflowWork);
  }
  public boolean dispatch(String sessionID, SerialWork workItem)
    throws WorkflowException, RemoteException
  {
    Context cotext=(Context)this.workflowService;
    SessionManager manager=cotext.getEngine().getSessionManager();
    WorkflowSession session=manager.findSession(sessionID);
    WorkflowProcess workflowProcess=workflowService.findWorkflowPackage(workItem.getPackageID()).getMainProcess();
    WorkflowCase workflowCase=workflowService.getCaseDatabase().findWorkflowCase(session,workflowProcess,workItem.getCaseID());
    WorkflowWork workflowWork=workflowService.getCaseDatabase().findWorkflowWork(session,workflowProcess,workflowCase,workItem.getUUID());   
    return getWrappedObject().dispatch(session,workflowWork);
View Full Code Here

    return getWrappedObject().dispatch(session,workflowWork);
  }
  public boolean revert(String sessionID, SerialWork workItem)
    throws WorkflowException, RemoteException
  {
    Context cotext=(Context)this.workflowService;
    SessionManager manager=cotext.getEngine().getSessionManager();
    WorkflowSession session=manager.findSession(sessionID);
    WorkflowProcess workflowProcess=workflowService.findWorkflowPackage(workItem.getPackageID()).getMainProcess();
    WorkflowCase workflowCase=workflowService.getCaseDatabase().findWorkflowCase(session,workflowProcess,workItem.getCaseID());
    WorkflowWork workflowWork=workflowService.getCaseDatabase().findWorkflowWork(session,workflowProcess,workflowCase,workItem.getUUID());   
    return getWrappedObject().revert(session,workflowWork);
View Full Code Here

TOP

Related Classes of org.huihoo.willow.Context

Copyright © 2018 www.massapicom. 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.