use of org.camunda.bpm.engine.impl.cmmn.behavior.CmmnActivityBehavior in project camunda-bpm-platform by camunda.
the class AbstractAtomicOperationCaseExecutionComplete method postTransitionNotification.
protected void postTransitionNotification(CmmnExecution execution) {
if (!execution.isCaseInstanceExecution()) {
execution.remove();
} else {
CmmnExecution superCaseExecution = execution.getSuperCaseExecution();
PvmExecutionImpl superExecution = execution.getSuperExecution();
if (superCaseExecution != null) {
TransferVariablesActivityBehavior behavior = (TransferVariablesActivityBehavior) getActivityBehavior(superCaseExecution);
behavior.transferVariables(execution, superCaseExecution);
superCaseExecution.complete();
} else if (superExecution != null) {
SubProcessActivityBehavior behavior = (SubProcessActivityBehavior) getActivityBehavior(superExecution);
try {
behavior.passOutputVariables(superExecution, execution);
} catch (RuntimeException e) {
LOG.completingSubCaseError(execution, e);
throw e;
} catch (Exception e) {
LOG.completingSubCaseError(execution, e);
throw LOG.completingSubCaseErrorException(execution, e);
}
// set sub case instance to null
superExecution.setSubCaseInstance(null);
try {
behavior.completed(superExecution);
} catch (RuntimeException e) {
LOG.completingSubCaseError(execution, e);
throw e;
} catch (Exception e) {
LOG.completingSubCaseError(execution, e);
throw LOG.completingSubCaseErrorException(execution, e);
}
}
execution.setSuperCaseExecution(null);
execution.setSuperExecution(null);
}
CmmnExecution parent = execution.getParent();
if (parent != null) {
CmmnActivityBehavior behavior = getActivityBehavior(parent);
if (behavior instanceof CmmnCompositeActivityBehavior) {
CmmnCompositeActivityBehavior compositeBehavior = (CmmnCompositeActivityBehavior) behavior;
compositeBehavior.handleChildCompletion(parent, execution);
}
}
}
use of org.camunda.bpm.engine.impl.cmmn.behavior.CmmnActivityBehavior in project camunda-bpm-platform by camunda.
the class AbstractAtomicOperationCaseExecutionComplete method eventNotificationsStarted.
protected CmmnExecution eventNotificationsStarted(CmmnExecution execution) {
CmmnActivityBehavior behavior = getActivityBehavior(execution);
triggerBehavior(behavior, execution);
execution.setCurrentState(COMPLETED);
return execution;
}
use of org.camunda.bpm.engine.impl.cmmn.behavior.CmmnActivityBehavior in project camunda-bpm-platform by camunda.
the class AbstractAtomicOperationCaseExecutionTerminate method notifyParent.
protected void notifyParent(CmmnExecution parent, CmmnExecution execution) {
CmmnActivityBehavior behavior = getActivityBehavior(parent);
if (behavior instanceof CmmnCompositeActivityBehavior) {
CmmnCompositeActivityBehavior compositeBehavior = (CmmnCompositeActivityBehavior) behavior;
compositeBehavior.handleChildTermination(parent, execution);
}
}
use of org.camunda.bpm.engine.impl.cmmn.behavior.CmmnActivityBehavior in project camunda-bpm-platform by camunda.
the class AtomicOperationCaseExecutionCreate method eventNotificationsStarted.
protected CmmnExecution eventNotificationsStarted(CmmnExecution execution) {
CmmnActivityBehavior behavior = getActivityBehavior(execution);
behavior.onCreate(execution);
execution.setCurrentState(AVAILABLE);
return execution;
}
use of org.camunda.bpm.engine.impl.cmmn.behavior.CmmnActivityBehavior in project camunda-bpm-platform by camunda.
the class AtomicOperationCaseExecutionEnable method eventNotificationsStarted.
protected CmmnExecution eventNotificationsStarted(CmmnExecution execution) {
CmmnActivityBehavior behavior = getActivityBehavior(execution);
behavior.onEnable(execution);
execution.setCurrentState(ENABLED);
return execution;
}
Aggregations