Package org.huihoo.workflow

Examples of org.huihoo.workflow.WorkflowException


    MonitorEventResult eventResult = monitorEvent.getResult();

    if (eventResult.getException() != null)
    {
      throw new WorkflowException(eventResult.getException());
    }

    Connection conn = (Connection) userTransaction.getStoreConnection().get();
    PreparedStatement pstmt = null;
    String strSQL = null;
    WorkflowCase workflowCase = workflowWork.getWorkflowCase();
    WorkflowActivity dispActivity = workflowTransition.getFromWorkflowActivity();
    String disp_owner_process_id = dispActivity.getWorkflowProcess().getUUID();
    String disp_activity_id = dispActivity.getUUID();

    String packageId = workflowProcess.getWorkflowPackage().getUUID();
    String processId = workflowProcess.getUUID();
    String caseId = workflowCase.getUUID();
   
    log.debug("\nandJoin monitorEvent == > "+monitorEvent);
   
    try
    {
      if (eventResult.getBatchNo() == 0)
      {
        strSQL =
          "INSERT INTO  "
            + caseDatabase.getSchemaContext().getTableName(SchemaContext.SCHEMA_ACTIVITY_DISPATCH)
            + "(vc_packageid,vc_processid,vc_caseid,vc_owner_processid,vc_activityid,int_batchNo) "
            + " VALUES(?,?,?,?,?,?)";
        pstmt = conn.prepareStatement(strSQL);
        pstmt.setString(1, packageId);
        pstmt.setString(2, processId);
        pstmt.setString(3, caseId);
        pstmt.setString(4, disp_owner_process_id);
        pstmt.setString(5, disp_activity_id);
        pstmt.setInt(6, eventResult.getBatchNo() + 1);
        pstmt.execute();

        ConnUtils.cleanupNoThrow(pstmt);
        pstmt = null;
      }
      else
      {
        strSQL =
          "UPDATE "
            + caseDatabase.getSchemaContext().getTableName(SchemaContext.SCHEMA_ACTIVITY_DISPATCH)
            + " "
            + "SET    int_batchNo=?,vc_disp_flag=?   "
            + "WHERE  vc_packageid=? "
            + "AND    vc_processid=? "
            + "AND    vc_caseid=?  "
            + "AND    vc_owner_processid=? "
            + "AND    vc_activityid=? ";
        pstmt = conn.prepareStatement(strSQL);
        pstmt.setInt(1, eventResult.getBatchNo() + 1);
        pstmt.setString(2, "TRUE");
        pstmt.setString(3, packageId);
        pstmt.setString(4, processId);
        pstmt.setString(5, caseId);
        pstmt.setString(6, disp_owner_process_id);
        pstmt.setString(7, disp_activity_id);
        ConnUtils.cleanupNoThrow(pstmt);
        pstmt = null;
      }
    }
    catch (SQLException ex)
    {
      throw new WorkflowException(ex);
    }
    finally
    {
      ConnUtils.cleanupNoThrow(pstmt);
      pstmt = null;
View Full Code Here


    MonitorEventResult eventResult = monitorEvent.getResult();

    if (eventResult.getException() != null)
    {
      eventResult.getException().printStackTrace();
      throw new WorkflowException(eventResult.getException());
    }

    Connection conn = (Connection) userTransaction.getStoreConnection().get();
    PreparedStatement pstmt = null;
    String strSQL = null;
    WorkflowCase workflowCase = workflowWork.getWorkflowCase();
    WorkflowActivity dispActivity = workflowTransition.getFromWorkflowActivity();
    String disp_owner_process_id = dispActivity.getWorkflowProcess().getUUID();
    String disp_activity_id = dispActivity.getUUID();

    String packageId = workflowProcess.getWorkflowPackage().getUUID();
    String processId = workflowProcess.getUUID();
    String caseId = workflowCase.getUUID();
   
    log.debug("\nxorJoin monitorEvent == > "+monitorEvent);
   
    try
    {
      if (eventResult.getBatchNo() == 0)
      {
        strSQL =
          "INSERT INTO  "
            + caseDatabase.getSchemaContext().getTableName(SchemaContext.SCHEMA_ACTIVITY_DISPATCH)
            + "(vc_packageid,vc_processid,vc_caseid,vc_owner_processid,vc_activityid,int_batchNo) "
            + " VALUES(?,?,?,?,?,?)";
        pstmt = conn.prepareStatement(strSQL);
        pstmt.setString(1, packageId);
        pstmt.setString(2, processId);
        pstmt.setString(3, caseId);
        pstmt.setString(4, disp_owner_process_id);
        pstmt.setString(5, disp_activity_id);
        pstmt.setInt(6, eventResult.getBatchNo() + 1);
        pstmt.execute();

        ConnUtils.cleanupNoThrow(pstmt);
        pstmt = null;
      }
      else
      {
        strSQL =
          "UPDATE "
            + caseDatabase.getSchemaContext().getTableName(SchemaContext.SCHEMA_ACTIVITY_DISPATCH)
            + " "
            + "SET    int_batchNo=?,vc_disp_flag=?   "
            + "WHERE  vc_packageid=? "
            + "AND    vc_processid=? "
            + "AND    vc_caseid=?  "
            + "AND    vc_owner_processid=? "
            + "AND    vc_activityid=? ";
        pstmt = conn.prepareStatement(strSQL);
        pstmt.setInt(1, eventResult.getBatchNo() + 1);
        pstmt.setString(2, "TRUE");
        pstmt.setString(3, packageId);
        pstmt.setString(4, processId);
        pstmt.setString(5, caseId);
        pstmt.setString(6, disp_owner_process_id);
        pstmt.setString(7, disp_activity_id);
        ConnUtils.cleanupNoThrow(pstmt);
        pstmt = null;
      }
    }
    catch (SQLException ex)
    {
      throw new WorkflowException(ex);
    }
    finally
    {
      ConnUtils.cleanupNoThrow(pstmt);
      pstmt = null;
View Full Code Here

      CaseDatabase caseDatabase=workflowService.getCaseDatabase();
      WorkflowCase localCase=caseDatabase.findWorkflowCase(session,workflowProcess,liveCase.getUUID());
      String packageID=localCase.getWorkflowProcess().getWorkflowPackage().getUUID();
      if(!liveCase.getPackageID().equals(packageID))
      {
        throw new WorkflowException("crossWorkflow not supported");
      }
     
      caseDatabase.deleteWorkflowCase(session,workflowProcess,localCase);
    }
View Full Code Here

      CaseDatabase caseDatabase=workflowService.getCaseDatabase();
      WorkflowCase localCase=caseDatabase.findWorkflowCase(session,workflowProcess,liveCase.getUUID());
      String packageID=localCase.getWorkflowProcess().getWorkflowPackage().getUUID();
      if(!liveCase.getPackageID().equals(packageID))
      {
        throw new WorkflowException("crossWorkflow not supported");
      }
     
      caseDatabase.cancelWorkflowCase(session,workflowProcess,localCase);     
    }
View Full Code Here

      WorkflowCase localCase=caseDatabase.findWorkflowCase(session,workflowProcess,liveCase.getUUID());
      String packageID=localCase.getWorkflowProcess().getWorkflowPackage().getUUID();
      if(!liveCase.getPackageID().equals(packageID))
      {
        throw new WorkflowException("crossWorkflow not supported");
      }
     
      caseDatabase.suspendWorkflowCase(session,workflowProcess,localCase);   
    }
View Full Code Here

      WorkflowCase localCase=caseDatabase.findWorkflowCase(session,workflowProcess,liveCase.getUUID());
      String packageID=localCase.getWorkflowProcess().getWorkflowPackage().getUUID();
      if(!liveCase.getPackageID().equals(packageID))
      {
        throw new WorkflowException("crossWorkflow not supported");
      }
     
      caseDatabase.resumeWorkflowCase(session,workflowProcess,localCase);   
    }
View Full Code Here

     
      WorkflowCase localCase=caseDatabase.findWorkflowCase(session,workflowProcess,liveCase.getUUID());
      String packageID=localCase.getWorkflowProcess().getWorkflowPackage().getUUID();
      if(!liveCase.getPackageID().equals(packageID))
      {
        throw new WorkflowException("crossWorkflow not supported");
      }
     
      WorkflowWork workflowWork=caseDatabase.findWorkflowWork(session,workflowProcess,localCase,workId);
      if(workflowWork!=null)
      {
View Full Code Here

      UserDatabase userDatabase=workflowService.getUserDatabase();
      WorkflowCase localCase=caseDatabase.findWorkflowCase(session,workflowProcess,liveCase.getUUID());
      String packageID=localCase.getWorkflowProcess().getWorkflowPackage().getUUID();
      if(!liveCase.getPackageID().equals(packageID))
      {
        throw new WorkflowException("crossWorkflow not supported");
      }
           
      List workList=caseDatabase.getWorkflowWorkList(session,workflowProcess,localCase,userDatabase.findParticipant(performer.getUUID()),itemStatus)
      List result=new ArrayList();
   
View Full Code Here

      WorkflowCall call = (WorkflowCall) implClass.newInstance();
      call.invoke(workItem, makeParamerers(workflowCase, app));
    }
    catch (Exception ex)
    {
      throw new WorkflowException(ex);
    }
  }
View Full Code Here

      return serviceContext.getMaxInactiveInterval(sessionID);
    }
    catch (RemoteException ex)
    {
      ex.printStackTrace();
      throw new WorkflowException(ex);
    }
  }
View Full Code Here

TOP

Related Classes of org.huihoo.workflow.WorkflowException

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.