Package org.huihoo.workflow.runtime

Examples of org.huihoo.workflow.runtime.WorkflowSession


   * @param event The session event
   */
  public void sessionDestroyed(HttpSessionEvent event)
  {
    HttpSession session=event.getSession();
    WorkflowSession workflowSession=(WorkflowSession)session.getAttribute(Constants.WORKFLOW_CLIENT_SESSION);
    if(workflowSession!=null)
    {
      session.removeAttribute(Constants.WORKFLOW_CLIENT_SESSION);
      workflowSession.invalidate();
    }
  }
View Full Code Here


  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());   
    return getWrappedObject().accept(session,workflowWork);
View Full Code Here

  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

  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

  public boolean fetch(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().fetch(session,workflowWork);
View Full Code Here

    String description)
    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();
      return caseDatabase.createWorkflowCase(session,workflowProcess,userDatabase.findParticipant(creator.getUUID()),creationTime,primaryKey,name,description);
    }
View Full Code Here

  public SerialCase findLiveCase(String sessionID,SerialProcess liveProcess,String caseId)
    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();
      WorkflowCase liveCase=caseDatabase.findWorkflowCase(session,workflowProcess,caseId);
      if(liveCase!=null)
      {
View Full Code Here

  public SerialCase findLiveCase(String sessionID,SerialProcess liveProcess,PrimaryKey primaryKey)
    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();
      WorkflowCase liveCase=caseDatabase.findWorkflowCase(session,workflowProcess,primaryKey);
      if(liveCase!=null)
      {
View Full Code Here

   
  public List getLiveCaseList(String sessionID,SerialProcess liveProcess,SerialParticipant creator) 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();
    List caseList=caseDatabase.getWorkflowCaseList(session,workflowProcess,userDatabase.findParticipant(creator.getUUID()))
    List result=new ArrayList();
View Full Code Here

  public void deleteLiveCase(String sessionID,SerialProcess liveProcess,SerialCase liveCase)
    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();
      WorkflowCase localCase=caseDatabase.findWorkflowCase(session,workflowProcess,liveCase.getUUID());
      String packageID=localCase.getWorkflowProcess().getWorkflowPackage().getUUID();
      if(!liveCase.getPackageID().equals(packageID))
View Full Code Here

TOP

Related Classes of org.huihoo.workflow.runtime.WorkflowSession

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.