/** * Finishes the building of a multi instance loop characteristics. * * @return the parent activity builder */ @SuppressWarnings({ "rawtypes", "unchecked" }) public <T extends AbstractActivityBuilder> T multiInstanceDone() { return (T) ((Activity) element.getParentElement()).builder(); }
Collection<BoundaryEvent> boundaryEvents = element.getParentElement().getChildElementsByType(BoundaryEvent.class); Collection<BoundaryEvent> attachedBoundaryEvents = new ArrayList<BoundaryEvent>();
protected void connectTarget(FlowNode target) { // check if compensation was started if (isBoundaryEventWithStartedCompensation()) { // the target activity should be marked for compensation if (target instanceof Activity) { ((Activity) target).setForCompensation(true); } // connect the target via association instead of sequence flow connectTargetWithAssociation(target); } else if (isCompensationHandler()) { // cannot connect to a compensation handler throw new BpmnModelException("Only single compensation handler allowed. Call compensationDone() to continue main flow."); } else { // connect as sequence flow by default connectTargetWithSequenceFlow(target); } }
public ModifiableBpmnModelInstance asyncBeforeInnerMiActivity(String activityId) { Activity activity = modelInstance.getModelElementById(activityId); MultiInstanceLoopCharacteristics miCharacteristics = (MultiInstanceLoopCharacteristics) activity.getUniqueChildElementByType(MultiInstanceLoopCharacteristics.class); miCharacteristics.setCamundaAsyncBefore(true); return this; }
final BpmnElement dstElement = elementMap.get(event.getId()); final Activity source = event.getAttachedTo(); final BpmnElement srcElement = elementMap.get(source.getId()); graph.addEdge(srcElement, dstElement, 100);
public ModifiableBpmnModelInstance asyncAfterInnerMiActivity(String activityId) { Activity activity = modelInstance.getModelElementById(activityId); MultiInstanceLoopCharacteristics miCharacteristics = (MultiInstanceLoopCharacteristics) activity.getUniqueChildElementByType(MultiInstanceLoopCharacteristics.class); miCharacteristics.setCamundaAsyncAfter(true); return this; }
@SuppressWarnings({ "rawtypes", "unchecked" }) public <T extends AbstractActivityBuilder> T moveToActivity(String identifier) { ModelElementInstance instance = modelInstance.getModelElementById(identifier); if (instance != null && instance instanceof Activity) { return (T) ((Activity) instance).builder(); } else { throw new BpmnModelException("Activity not found for id " + identifier); } }
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; }
protected void connectTarget(FlowNode target) { // check if compensation was started if (isBoundaryEventWithStartedCompensation()) { // the target activity should be marked for compensation if (target instanceof Activity) { ((Activity) target).setForCompensation(true); } // connect the target via association instead of sequence flow connectTargetWithAssociation(target); } else if (isCompensationHandler()) { // cannot connect to a compensation handler throw new BpmnModelException("Only single compensation handler allowed. Call compensationDone() to continue main flow."); } else { // connect as sequence flow by default connectTargetWithSequenceFlow(target); } }
public ModifiableBpmnModelInstance asyncAfterInnerMiActivity(String activityId) { Activity activity = modelInstance.getModelElementById(activityId); MultiInstanceLoopCharacteristics miCharacteristics = (MultiInstanceLoopCharacteristics) activity.getUniqueChildElementByType(MultiInstanceLoopCharacteristics.class); miCharacteristics.setCamundaAsyncAfter(true); return this; }
public AbstractFlowNodeBuilder compensationDone(){ if (compensateBoundaryEvent != null) { return compensateBoundaryEvent.getAttachedTo().builder(); } else { throw new BpmnModelException("No compensation in progress. Call compensationStart() first."); } }
Collection<BoundaryEvent> boundaryEvents = element.getParentElement().getChildElementsByType(BoundaryEvent.class); Collection<BoundaryEvent> attachedBoundaryEvents = new ArrayList<BoundaryEvent>();
protected void connectTarget(FlowNode target) { // check if compensation was started if (isBoundaryEventWithStartedCompensation()) { // the target activity should be marked for compensation if (target instanceof Activity) { ((Activity) target).setForCompensation(true); } // connect the target via association instead of sequence flow connectTargetWithAssociation(target); } else if (isCompensationHandler()) { // cannot connect to a compensation handler throw new BpmnModelException("Only single compensation handler allowed. Call compensationDone() to continue main flow."); } else { // connect as sequence flow by default connectTargetWithSequenceFlow(target); } }
public ModifiableBpmnModelInstance asyncBeforeInnerMiActivity(String activityId) { Activity activity = modelInstance.getModelElementById(activityId); MultiInstanceLoopCharacteristics miCharacteristics = (MultiInstanceLoopCharacteristics) activity.getUniqueChildElementByType(MultiInstanceLoopCharacteristics.class); miCharacteristics.setCamundaAsyncBefore(true); return this; }
/** * Finishes the building of a multi instance loop characteristics. * * @return the parent activity builder */ @SuppressWarnings({ "rawtypes", "unchecked" }) public <T extends AbstractActivityBuilder> T multiInstanceDone() { return (T) ((Activity) element.getParentElement()).builder(); }
Collection<BoundaryEvent> boundaryEvents = element.getParentElement().getChildElementsByType(BoundaryEvent.class); Collection<BoundaryEvent> attachedBoundaryEvents = new ArrayList<BoundaryEvent>();
/** * Finishes the building of a multi instance loop characteristics. * * @return the parent activity builder */ @SuppressWarnings({ "rawtypes", "unchecked" }) public <T extends AbstractActivityBuilder> T multiInstanceDone() { return (T) ((Activity) element.getParentElement()).builder(); }
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; }
public AbstractFlowNodeBuilder compensationDone(){ if (compensateBoundaryEvent != null) { return compensateBoundaryEvent.getAttachedTo().builder(); } else { throw new BpmnModelException("No compensation in progress. Call compensationStart() first."); } }
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; }