use of org.camunda.bpm.engine.impl.bpmn.behavior.FlowNodeActivityBehavior in project camunda-bpm-platform by camunda.
the class PvmAtomicOperationActivityLeave method execute.
public void execute(PvmExecutionImpl execution) {
execution.activityInstanceDone();
ActivityBehavior activityBehavior = getActivityBehavior(execution);
if (activityBehavior instanceof FlowNodeActivityBehavior) {
FlowNodeActivityBehavior behavior = (FlowNodeActivityBehavior) activityBehavior;
ActivityImpl activity = execution.getActivity();
String activityInstanceId = execution.getActivityInstanceId();
if (activityInstanceId != null) {
LOG.debugLeavesActivityInstance(execution, activityInstanceId);
}
try {
behavior.doLeave(execution);
} catch (RuntimeException e) {
throw e;
} catch (Exception e) {
throw new PvmException("couldn't leave activity <" + activity.getProperty("type") + " id=\"" + activity.getId() + "\" ...>: " + e.getMessage(), e);
}
} else {
throw new PvmException("Behavior of current activity is not an instance of " + FlowNodeActivityBehavior.class.getSimpleName() + ". Execution " + execution);
}
}
Aggregations