use of org.camunda.bpm.engine.impl.pvm.process.TransitionImpl in project camunda-bpm-platform by camunda.
the class ActivityAfterInstantiationCmd method findTransition.
protected TransitionImpl findTransition(ProcessDefinitionImpl processDefinition) {
PvmActivity activity = processDefinition.findActivity(activityId);
EnsureUtil.ensureNotNull(NotValidException.class, describeFailure("Activity '" + activityId + "' does not exist"), "activity", activity);
if (activity.getOutgoingTransitions().isEmpty()) {
throw new ProcessEngineException("Cannot start after activity " + activityId + "; activity " + "has no outgoing sequence flow to take");
} else if (activity.getOutgoingTransitions().size() > 1) {
throw new ProcessEngineException("Cannot start after activity " + activityId + "; " + "activity has more than one outgoing sequence flow");
}
return (TransitionImpl) activity.getOutgoingTransitions().get(0);
}
Aggregations