Package org.huihoo.workflow.store.persistent

Examples of org.huihoo.workflow.store.persistent.UserTransaction


    if (joinType != null)
    {
      CaseDatabaseImpl caseDatabaseImpl = (CaseDatabaseImpl) workflowService.getCaseDatabase();
      SpiCaseDatabase caseDatabase = caseDatabaseImpl.getWrappedObject();

      UserTransaction userTransaction = null;
      MonitorEventResult eventResult = null;
      try
      {
        userTransaction = caseDatabase.getUserTransaction();

        if (JoinType.JOIN_AND.equals(joinType))
        {
          eventResult =
            dispatch_andJoin(
              workflowService,
              workflowProcess,
              operator,
              event_userTransaction,
              caseDatabase,
              userTransaction,
              workflowWork,
              workflowTransition);
        }

        if (JoinType.JOIN_XOR.equals(joinType))
        {
          eventResult =
            dispatch_xorJoin(
              workflowService,
              workflowProcess,
              operator,
              event_userTransaction,
              caseDatabase,
              userTransaction,
              workflowWork,
              workflowTransition);
        }

        if (JoinType.JOIN_OR.equals(joinType))
        {
          eventResult =
            dispatch_orJoin(
              workflowService,
              workflowProcess,
              operator,
              event_userTransaction,
              caseDatabase,
              userTransaction,
              workflowWork,
              workflowTransition);
        }

        if (JoinType.JOIN_WEIGHT.equals(joinType))
        {
          eventResult =
            dispatch_weightJoin(
              workflowService,
              workflowProcess,
              operator,
              event_userTransaction,
              caseDatabase,
              userTransaction,
              workflowWork,
              workflowTransition);
        }

        userTransaction.commit();
      }
      catch (WorkflowException ex)
      {
        if (userTransaction != null)
        {
          try
          {
            userTransaction.rollback();
          }
          catch (TransactionException e)
          {
            ;
          }
        }

        eventResult = new MonitorEventResult();
        eventResult.setException(ex);
      }
      finally
      {
        if (userTransaction != null)
        {
          try
          {
            userTransaction.release();
          }
          catch (TransactionException e)
          {
            ;
          }
View Full Code Here


    gCaseDBImpl.updateCaseParameter_impl(this,workflowProcess,operator,conn, false, workflowCase, parameter);
  }

  public UserTransaction getUserTransaction() throws WorkflowException
  {
    UserTransaction userTransaction = null;
    Connection conn = null;
    try
    {
      conn = ConnUtils.getConnection(getStore());
      conn.setAutoCommit(false);
View Full Code Here

 
    WorkflowActivity workflowActivity = workItem.getWorkflowActivity();
    WorkflowPackage workflowPackage = workflowProcess.getWorkflowPackage();
    WorkflowService workflowService=getCaseDatabase().getWorkflowService();
    CaseDatabaseImpl caseDatabase =(CaseDatabaseImpl) workflowService.getCaseDatabase();
    UserTransaction userTransaction = caseDatabase.getUserTransaction();
    boolean resultDone = false;
    try
    {
      resultDone =  DispatchController.accept_core(workflowService,workflowProcess,operator, caseDatabase.getWrappedObject(), userTransaction, workItem);
      userTransaction.commit();
    }
    catch (WorkflowException ex)
    {
      log.error(ex);
      userTransaction.rollback();
      throw ex;
    }
    finally
    {
      userTransaction.release();
    }
    return resultDone;
  }
View Full Code Here

    WorkflowActivity workflowActivity = workItem.getWorkflowActivity();
    WorkflowPackage workflowPackage = workflowProcess.getWorkflowPackage();
    WorkflowService workflowService=getCaseDatabase().getWorkflowService();
   
    CaseDatabaseImpl caseDatabase =(CaseDatabaseImpl) workflowService.getCaseDatabase();
    UserTransaction userTransaction = caseDatabase.getUserTransaction();

    boolean resultDone = false;
    try
    {
      resultDone =  DispatchController.dispatch_core(workflowService,workflowProcess,operator, caseDatabase.getWrappedObject(), userTransaction, workItem);
      userTransaction.commit();
    }
    catch (Exception wfsex)
    {
      log.error(wfsex, wfsex);
      userTransaction.rollback();
      throw new WorkflowException(wfsex);
    }
    finally
    {
      userTransaction.release();
    }
    return resultDone;
  }
View Full Code Here

    WorkflowActivity workflowActivity = workItem.getWorkflowActivity();
    WorkflowPackage workflowPackage = workflowProcess.getWorkflowPackage();
    WorkflowService workflowService=getCaseDatabase().getWorkflowService();
    CaseDatabaseImpl caseDatabase =(CaseDatabaseImpl) workflowService.getCaseDatabase();

    UserTransaction userTransaction = caseDatabase.getUserTransaction();
    boolean resultDone = false;
    try
    {
      resultDone =  DispatchController.revert_core(workflowService,workflowProcess,operator, caseDatabase.getWrappedObject(), userTransaction, workItem);
      userTransaction.commit();
    }
    catch (WorkflowException ex)
    {
      log.error(ex, ex);
      userTransaction.rollback();
      throw ex;
    }
    finally
    {
      userTransaction.release();
    }

    return resultDone;
  }
View Full Code Here

    WorkflowActivity workflowActivity = workItem.getWorkflowActivity();
    WorkflowPackage workflowPackage = workflowProcess.getWorkflowPackage();
    WorkflowService workflowService=getCaseDatabase().getWorkflowService();
    CaseDatabaseImpl caseDatabase =(CaseDatabaseImpl) workflowService.getCaseDatabase();
    UserTransaction userTransaction = caseDatabase.getUserTransaction();

    boolean resultDone = false;
    try
    {
      resultDone = DispatchController.fetch_core(workflowService,workflowProcess,operator, caseDatabase.getWrappedObject(), userTransaction, workItem);
      userTransaction.commit();
    }
    catch (WorkflowException ex)
    {
      log.error(ex, ex);
      userTransaction.rollback();

      throw ex;
    }
    finally
    {
      userTransaction.release();
    }
    return resultDone;
  }
View Full Code Here

TOP

Related Classes of org.huihoo.workflow.store.persistent.UserTransaction

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.