@Override public void run() { FlowElement currentFlowElement = getCurrentFlowElement(execution); // Compensation check if ((currentFlowElement instanceof Activity) && (((Activity) currentFlowElement)).isForCompensation()) { /* * If the current flow element is part of a compensation, we don't always * want to follow the regular rules of leaving an activity. * More specifically, if there are no outgoing sequenceflow, we simply must stop * the execution there and don't go up in the scopes as we usually do * to find the outgoing sequenceflow */ cleanupCompensation(); return; } // When leaving the current activity, we need to delete any related execution (eg active boundary events) cleanupExecutions(currentFlowElement); if (currentFlowElement instanceof FlowNode) { handleFlowNode((FlowNode) currentFlowElement); } else if (currentFlowElement instanceof SequenceFlow) { handleSequenceFlow(); } }
if (activity.isForCompensation()) { writeDefaultAttribute(ATTRIBUTE_ACTIVITY_ISFORCOMPENSATION, ATTRIBUTE_VALUE_TRUE, xtw);
if (targetElement instanceof Activity) { Activity activity = (Activity) targetElement; if (activity.isForCompensation()) { compensationActivity = activity; break;
@Override public void run() { FlowElement currentFlowElement = getCurrentFlowElement(execution); // Compensation check if ((currentFlowElement instanceof Activity) && ( ((Activity) currentFlowElement)).isForCompensation()) { /* * If the current flow element is part of a compensation, we don't always * want to follow the regular rules of leaving an activity. * More specifically, if there are no outgoing sequenceflow, we simply must stop * the execution there and don't go up in the scopes as we usually do * to find the outgoing sequenceflow */ cleanupCompensation(); return; } // When leaving the current activity, we need to delete any related execution (eg active boundary events) cleanupExecutions(currentFlowElement); if (currentFlowElement instanceof FlowNode) { handleFlowNode((FlowNode) currentFlowElement); } else if (currentFlowElement instanceof SequenceFlow) { handleSequenceFlow(); } }
public ActivityImpl createActivityOnScope(BpmnParse bpmnParse, FlowElement flowElement, String xmlLocalName, ScopeImpl scopeElement) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Parsing activity {}", flowElement.getId()); } ActivityImpl activity = scopeElement.createActivity(flowElement.getId()); bpmnParse.setCurrentActivity(activity); activity.setProperty("name", flowElement.getName()); activity.setProperty("documentation", flowElement.getDocumentation()); if (flowElement instanceof Activity) { Activity modelActivity = (Activity) flowElement; activity.setProperty("default", modelActivity.getDefaultFlow()); if(modelActivity.isForCompensation()) { activity.setProperty(PROPERTYNAME_IS_FOR_COMPENSATION, true); } } else if (flowElement instanceof Gateway) { activity.setProperty("default", ((Gateway) flowElement).getDefaultFlow()); } activity.setProperty("type", xmlLocalName); return activity; }
if (activity.isForCompensation()) { writeDefaultAttribute(ATTRIBUTE_ACTIVITY_ISFORCOMPENSATION, ATTRIBUTE_VALUE_TRUE, xtw);
if (targetElement instanceof Activity) { Activity activity = (Activity) targetElement; if (activity.isForCompensation()) { compensationActivity = activity; break;