use of org.camunda.bpm.model.bpmn.instance.Event in project camunda-bpmn-model by camunda.
the class AbstractCompensateEventDefinitionBuilder method activityRef.
public B activityRef(String activityId) {
Activity activity = modelInstance.getModelElementById(activityId);
if (activity == null) {
throw new BpmnModelException("Activity with id '" + activityId + "' does not exist");
}
Event event = (Event) element.getParentElement();
if (activity.getParentElement() != event.getParentElement()) {
throw new BpmnModelException("Activity with id '" + activityId + "' must be in the same scope as '" + event.getId() + "'");
}
element.setActivity(activity);
return myself;
}
Aggregations