Package org.huihoo.willow

Examples of org.huihoo.willow.Context


    }
   
  public List getLiveWorkList(String sessionID,SerialProcess liveProcess,SerialParticipant performer, int itemStatus)
    throws WorkflowException, RemoteException
    {
      Context cotext=(Context)this.workflowService;
      SessionManager manager=cotext.getEngine().getSessionManager();
      WorkflowSession session=manager.findSession(sessionID);
     
      WorkflowProcess workflowProcess=workflowService.findWorkflowPackage(liveProcess.getPackageID()).findWorkflowProcess(liveProcess.getUUID());
      CaseDatabase caseDatabase=workflowService.getCaseDatabase();
      UserDatabase userDatabase=workflowService.getUserDatabase();
View Full Code Here


    SerialCase liveCase,
    SerialParticipant performer,
    int itemStatus)
    throws WorkflowException, RemoteException
    {
      Context cotext=(Context)this.workflowService;
      SessionManager manager=cotext.getEngine().getSessionManager();
      WorkflowSession session=manager.findSession(sessionID);
     
      WorkflowProcess workflowProcess=workflowService.findWorkflowPackage(liveProcess.getPackageID()).findWorkflowProcess(liveProcess.getUUID());
      CaseDatabase caseDatabase=workflowService.getCaseDatabase();
      UserDatabase userDatabase=workflowService.getUserDatabase();
View Full Code Here

    // Install the new org.huihoo.workflow application
    try
    {
      Class clazz = Class.forName(engine.getContextClass());
      Context context = (Context) clazz.newInstance();
      context.setName(contextName);
      context.setAppBase(appBase);
      if (context instanceof Lifecycle)
      {
        clazz = Class.forName(engine.getConfigClass());
        LifecycleListener listener = (LifecycleListener) clazz.newInstance();
        ((Lifecycle) context).addLifecycleListener(listener);
View Full Code Here

    if (contextName == null)
    { 
      throw new IllegalArgumentException(sm.getString("standardEngine.nameRequired"));     
    }
    // Locate the context and associated work directory
    Context context = findDeployedApp(contextName);
    if (context == null)
      throw new IllegalArgumentException(sm.getString("standardEngine.nameMissing", contextName));

    // Remove this org.huihoo.workflow application
    log.info(sm.getString("standardEngine.removing", contextName));
View Full Code Here

    {
      throw new IllegalArgumentException(sm.getString("standardEngine.nameRequired"));
    }

    // Locate the context and associated work directory
    Context context = findDeployedApp(contextName);
    if (context == null)
    {
      throw new IllegalArgumentException(sm.getString("standardEngine.nameMissing", contextName));
    }

    // Remove this org.huihoo.workflow application
    engine.log(sm.getString("standardEngine.removing", contextName));
    try
    {
      // Get the work directory for the Context
      File workDir = new File(((StandardContext)context).getWorkPath());
      engine.removeChild(context);

      if (undeploy)
      {
        // Remove the org.huihoo.workflow application directory  file if it
        // exists in the Engine's engineBase directory.

        // Determine if directoryr to remove is in the engine engineBase
        boolean isAppBase = false;
        File appBase = new File(engine.getEngineBase());
        if (!appBase.isAbsolute())
        {
          appBase = new File(System.getProperty(Globals.PROPS_WILLOW_HOME), engine.getEngineBase());
        }
        File contextFile = new File(context.getAppBase());
        File baseDir = contextFile.getParentFile();
        if ((baseDir == null) || (appBase.getCanonicalPath().equals(baseDir.getCanonicalPath())))
        {
          isAppBase = true;
        }
View Full Code Here

    if (contextName == null)
    {
      throw new IllegalArgumentException(sm.getString("standardEngine.nameRequired"));
    }

    Context context = findDeployedApp(contextName);
    if (context == null)
    {
      throw new IllegalArgumentException(sm.getString("standardEngine.nameMissing", contextName));
    }
    log.info("standardEngine.start " + contextName);
View Full Code Here

    if (contextName == null)
    {
      throw new IllegalArgumentException(sm.getString("standardEngine.nameRequired"));
    }

    Context context = findDeployedApp(contextName);
    if (context == null)
    {
      throw new IllegalArgumentException(sm.getString("standardEngine.nameMissing", contextName));
    }
    log.info("standardEngine.stop " + contextName);
View Full Code Here

   *
   * @exception Exception if a processing error occurs
   */
  public void begin(Attributes attributes) throws Exception
  {
    Context child = (Context) digester.peek(0);
    EngineDeployer parent = (EngineDeployer) digester.peek(1);
    Engine engine = null;
    if (!(parent instanceof StandardEngine))
    {
      Method method = parent.getClass().getMethod("getEngine", null);
      engine = (Engine) method.invoke(parent, null);
    }
    else
    {
      engine=(Engine)parent;
    }

    File engineBase =engine.getAbsoluteEngineBase();

    String appBase = child.getAppBase();
    if (appBase == null)
    {
      // Trying to guess the appBase according to the name
      String name = child.getName();
      if (name == null)
      {
        return;
      }
     
      appBase = name;
    }

    File file = new File(appBase);
    if (!file.isAbsolute())
    {
      appBase = (new File(engineBase, appBase)).getCanonicalPath();
    }
    else
    {
      appBase = file.getCanonicalPath();
    }

    //olny file system based on directory is be supported
    File appDir = new File(appBase);
    if (!appDir.exists())
    {
      return;
    }

    if (appBase.startsWith(engineBase.getPath()))
    {
      //if appbase in enginebase ,use relative path
      appBase = appBase.substring(engineBase.getPath().length() + 1);
    }
   
    //get relative pathname
    appBase = appBase.replace(File.separatorChar, '/');

    child.setAppBase(appBase);

  }
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.