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

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


  protected CallableElementBinding getBinding() {
    return getCallableElement().getBinding();
  }

  protected Integer getVersion(CmmnActivityExecution execution) {
    CmmnExecution caseExecution = (CmmnExecution) execution;
    return getCallableElement().getVersion(caseExecution);
  }
View Full Code Here


    CmmnExecution caseExecution = (CmmnExecution) execution;
    return getCallableElement().getVersion(caseExecution);
  }

  protected String getDeploymentId(CmmnActivityExecution execution) {
    CmmnExecution caseExecution = (CmmnExecution) execution;
    CmmnCaseDefinition definition = caseExecution.getCaseDefinition();
    if (definition instanceof CaseDefinitionEntity) {
      CaseDefinitionEntity caseDefinition = (CaseDefinitionEntity) definition;
      return caseDefinition.getDeploymentId();
    }
    return null;
View Full Code Here

      .getCommandExecutorTxRequired()
      .execute(new Command<Void>() {

        @Override
        public Void execute(CommandContext commandContext) {
          CmmnExecution caseTask = (CmmnExecution) caseService
              .createCaseExecutionQuery()
              .caseExecutionId(caseExecutionId)
              .singleResult();
          caseTask.terminate();
          return null;
        }

      });
  }
View Full Code Here

    // when
    terminate(subCaseInstanceId);

    // then
    CmmnExecution subCaseInstance = (CmmnExecution) queryOneTaskCaseInstance();
    assertNotNull(subCaseInstance);
    assertTrue(subCaseInstance.isTerminated());

    CaseExecution caseTask = queryCaseExecutionByActivityId(CASE_TASK);
    assertNotNull(caseTask);
    assertTrue(caseTask.isActive());
View Full Code Here

    // when
    suspend(subCaseInstanceId);

    // then
    CmmnExecution subCaseInstance = (CmmnExecution) queryOneTaskCaseInstance();
    assertNotNull(subCaseInstance);
    assertTrue(subCaseInstance.isSuspended());

    CaseExecution caseTask = queryCaseExecutionByActivityId(CASE_TASK);
    assertNotNull(caseTask);
    assertTrue(caseTask.isActive());
View Full Code Here

  private static Logger log = Logger.getLogger(CaseExecutionStateTransitionCollector.class.getName());

  public List<String> stateTransitions = new ArrayList<String>();

  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);

    stateTransitions.add(stateTransition);
  }
View Full Code Here

    // in that case the case execution have to notify the parent too.
    // but if the transition "exit" will be executed, because the
    // parent has been terminated, we do not care about the notification
    // of the parent.

    CmmnExecution parent = execution.getParent();
    if (parent != null) {
      notifyParent(parent, execution);
    }
  }
View Full Code Here

  protected void transitionNotificationCompleted(CmmnExecution execution) {
    if (!execution.isCaseInstanceExecution()) {
      execution.remove();
    } else {
      CmmnExecution superCaseExecution = execution.getSuperCaseExecution();
      TransferVariablesActivityBehavior behavior = null;

      if (superCaseExecution != null) {
        behavior = (TransferVariablesActivityBehavior) getActivityBehavior(superCaseExecution);
        behavior.transferVariables(execution, superCaseExecution);
        superCaseExecution.complete();
      }
    }

    CmmnExecution parent = execution.getParent();
    if (parent != null) {
      CmmnActivityBehavior behavior = getActivityBehavior(parent);
      if (behavior instanceof CompositeActivityBehavior) {
        CompositeActivityBehavior compositeBehavior = (CompositeActivityBehavior) behavior;
        compositeBehavior.childStateChanged(parent, execution);
View Full Code Here

    return execution;
  }

  protected void transitionNotificationCompleted(CmmnExecution execution) {
    CmmnExecution parent = execution.getParent();
    if (parent != null) {
      CmmnActivityBehavior behavior = getActivityBehavior(parent);
      if (behavior instanceof CompositeActivityBehavior) {
        CompositeActivityBehavior compositeBehavior = (CompositeActivityBehavior) behavior;
        compositeBehavior.childStateChanged(parent, execution);
View Full Code Here

  }

  protected final void eventNotificationsCompleted(CmmnExecution execution) {
    String eventName = getEventName();

    CmmnExecution parent = execution.getParent();

    if (parent != null) {
      parent.handleChildTransition(execution, eventName);
    }

    transitionNotificationCompleted(execution);

  }
View Full Code Here

TOP

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

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.