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); } }
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); } }