public void setValues(CompensateEventDefinition otherDefinition) { super.setValues(otherDefinition); setActivityRef(otherDefinition.getActivityRef()); setWaitForCompletion(otherDefinition.isWaitForCompletion()); } }
public void setValues(CompensateEventDefinition otherDefinition) { super.setValues(otherDefinition); setActivityRef(otherDefinition.getActivityRef()); setWaitForCompletion(otherDefinition.isWaitForCompletion()); } }
@Override protected void executeParse(BpmnParse bpmnParse, CompensateEventDefinition eventDefinition) { ScopeImpl scope = bpmnParse.getCurrentScope(); if (StringUtils.isNotEmpty(eventDefinition.getActivityRef())) { if (scope.findActivity(eventDefinition.getActivityRef()) == null) { LOGGER.warn("Invalid attribute value for 'activityRef': no activity with id '{}' in current scope {}", eventDefinition.getActivityRef(), scope.getId()); } } org.activiti.engine.impl.bpmn.parser.CompensateEventDefinition compensateEventDefinition = new org.activiti.engine.impl.bpmn.parser.CompensateEventDefinition(); compensateEventDefinition.setActivityRef(eventDefinition.getActivityRef()); compensateEventDefinition.setWaitForCompletion(eventDefinition.isWaitForCompletion()); ActivityImpl activity = bpmnParse.getCurrentActivity(); if (bpmnParse.getCurrentFlowElement() instanceof ThrowEvent) { activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createIntermediateThrowCompensationEventActivityBehavior((ThrowEvent) bpmnParse.getCurrentFlowElement(), compensateEventDefinition)); } else if (bpmnParse.getCurrentFlowElement() instanceof BoundaryEvent) { BoundaryEvent boundaryEvent = (BoundaryEvent) bpmnParse.getCurrentFlowElement(); boolean interrupting = boundaryEvent.isCancelActivity(); activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createBoundaryEventActivityBehavior(boundaryEvent, interrupting, activity)); activity.setProperty("type", "compensationBoundaryCatch"); } else { // What to do? } }