use of org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecution in project camunda-bpm-platform by camunda.
the class PvmExecutionImpl method leaveActivityViaTransitions.
@Override
public void leaveActivityViaTransitions(List<PvmTransition> _transitions, List<? extends ActivityExecution> _recyclableExecutions) {
List<? extends ActivityExecution> recyclableExecutions = Collections.emptyList();
if (_recyclableExecutions != null) {
recyclableExecutions = new ArrayList<ActivityExecution>(_recyclableExecutions);
}
// execution).
if (recyclableExecutions.size() > 1) {
removeVariablesLocalInternal();
}
// the activity.
for (ActivityExecution execution : recyclableExecutions) {
execution.setEnded(true);
}
// remove 'this' from recyclable executions to
// leave the activity with 'this' execution
// (when 'this' execution is the last concurrent
// execution, then 'this' execution will be pruned,
// and the activity is left with the scope
// execution)
recyclableExecutions.remove(this);
for (ActivityExecution execution : recyclableExecutions) {
execution.end(_transitions.isEmpty());
}
PvmExecutionImpl propagatingExecution = this;
if (getReplacedBy() != null) {
propagatingExecution = getReplacedBy();
}
propagatingExecution.isActive = true;
propagatingExecution.isEnded = false;
if (_transitions.isEmpty()) {
propagatingExecution.end(!propagatingExecution.isConcurrent());
} else {
propagatingExecution.setTransitionsToTake(_transitions);
propagatingExecution.performOperation(PvmAtomicOperation.TRANSITION_NOTIFY_LISTENER_END);
}
}
Aggregations