Package org.camunda.bpm.engine.impl.cmmn.execution

Examples of org.camunda.bpm.engine.impl.cmmn.execution.CaseExecutionState


  protected CmmnExecution eventNotificationsStarted(CmmnExecution execution) {
    CmmnActivityBehavior behavior = getActivityBehavior(execution);
    triggerBehavior(behavior, execution);

    CaseExecutionState newState = getPreviousState(execution);
    execution.setCurrentState(newState);

    return execution;
  }
View Full Code Here


  }

  protected void assertHistoricState(String activityId, CaseExecutionState expectedState) {
    HistoricCaseActivityInstanceEventEntity historicActivityInstance = (HistoricCaseActivityInstanceEventEntity) queryHistoricActivityCaseInstance(activityId);
    int actualStateCode = historicActivityInstance.getCaseActivityInstanceState();
    CaseExecutionState actualState = CaseExecutionState.CaseExecutionStateImpl.getStateForCode(actualStateCode);
    assertEquals("The state of historic case activity '" + activityId + "' wasn't as expected", expectedState, actualState);
  }
View Full Code Here

  // helper //////////////////////////////////////////////////////////////////////

  protected void ensureTransitionAllowed(CmmnActivityExecution execution, CaseExecutionState expected, CaseExecutionState target, String transition) {
    String id = execution.getId();

    CaseExecutionState currentState = execution.getCurrentState();

    // the state "suspending" or "terminating" will set immediately
    // inside the corresponding AtomicOperation, that's why the
    // previous state will be used to ensure that the transition
    // is allowed.
View Full Code Here

    }
  }

  public void reactivated(CmmnActivityExecution execution) {
    if (execution.isCaseInstanceExecution()) {
      CaseExecutionState previousState = execution.getPreviousState();

      if (SUSPENDED.equals(previousState)) {
        resumed(execution);
      }
    }
View Full Code Here

  public void handleChildSuspension(CmmnActivityExecution execution, CmmnActivityExecution child) {
    // if the given execution is not suspending currently, then ignore this notification.
    if (execution.isSuspending() && isAbleToSuspend(execution)) {
      String id = execution.getId();
      CaseExecutionState currentState = execution.getCurrentState();

      if (SUSPENDING_ON_SUSPENSION.equals(currentState)) {
        execution.performSuspension();

      } else if (SUSPENDING_ON_PARENT_SUSPENSION.equals(currentState)) {
View Full Code Here

    if (execution.isActive()) {
      checkAndCompleteCaseExecution(execution);

    } else if (execution.isTerminating() && isAbleToTerminate(execution)) {
      String id = execution.getId();
      CaseExecutionState currentState = execution.getCurrentState();

      if (TERMINATING_ON_TERMINATION.equals(currentState)) {
        execution.performTerminate();

      } else if (TERMINATING_ON_EXIT.equals(currentState)) {
View Full Code Here

  public void notify(DelegateCaseExecution planItem) throws Exception {
    CmmnExecution execution = (CmmnExecution) planItem;

    String activityId = execution.getEventSource().getId();

    CaseExecutionState previousState = execution.getPreviousState();
    String previousStateName = "()";
    if (!previousState.equals(CaseExecutionState.NEW)) {
      previousStateName = previousState.toString();
    }

    CaseExecutionState newState = execution.getCurrentState();

    String stateTransition = previousStateName + " --" + execution.getEventName() + "(" + activityId + ")--> " + newState;

    log.fine("collecting state transition: " +  stateTransition);
View Full Code Here

  protected CmmnExecution eventNotificationsStarted(CmmnExecution execution) {
    CmmnActivityBehavior behavior = getActivityBehavior(execution);
    triggerBehavior(behavior, execution);

    CaseExecutionState newState = getPreviousState(execution);
    execution.setCurrentState(newState);

    return execution;
  }
View Full Code Here

    }
  }

  public void reactivated(CmmnActivityExecution execution) {
    if (execution.isCaseInstanceExecution()) {
      CaseExecutionState previousState = execution.getPreviousState();

      if (SUSPENDED.equals(previousState)) {
        resumed(execution);
      }
    }
View Full Code Here

  }

  protected void ensureTransitionAllowed(CmmnActivityExecution execution, CaseExecutionState expected, CaseExecutionState target, String transition) {
    String id = execution.getId();

    CaseExecutionState currentState = execution.getCurrentState();

    // is the case execution already in the target state
    if (target.equals(currentState)) {
      String message = "Case execution '"+id+"' is already "+target+".";
      throw createIllegalStateTransitionException(transition, message, execution);
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.impl.cmmn.execution.CaseExecutionState

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.