@Override public IntermediateThrowCompensationEventActivityBehavior createIntermediateThrowCompensationEventActivityBehavior(ThrowEvent throwEvent, CompensateEventDefinition compensateEventDefinition) { return wrappedActivityBehaviorFactory.createIntermediateThrowCompensationEventActivityBehavior(throwEvent, compensateEventDefinition); }
protected void executeParse(BpmnParse bpmnParse, ThrowEvent intermediateEvent) { EventDefinition eventDefinition = null; if (!intermediateEvent.getEventDefinitions().isEmpty()) { eventDefinition = intermediateEvent.getEventDefinitions().get(0); } if (eventDefinition instanceof SignalEventDefinition) { SignalEventDefinition signalEventDefinition = (SignalEventDefinition) eventDefinition; intermediateEvent.setBehavior(bpmnParse.getActivityBehaviorFactory().createIntermediateThrowSignalEventActivityBehavior(intermediateEvent, signalEventDefinition, bpmnParse.getBpmnModel().getSignal(signalEventDefinition.getSignalRef()))); } else if (eventDefinition instanceof CompensateEventDefinition) { CompensateEventDefinition compensateEventDefinition = (CompensateEventDefinition) eventDefinition; intermediateEvent.setBehavior(bpmnParse.getActivityBehaviorFactory().createIntermediateThrowCompensationEventActivityBehavior(intermediateEvent, compensateEventDefinition)); } else if (eventDefinition == null) { intermediateEvent.setBehavior(bpmnParse.getActivityBehaviorFactory().createIntermediateThrowNoneEventActivityBehavior(intermediateEvent)); } else { logger.warn("Unsupported intermediate throw event type for throw event " + intermediateEvent.getId()); } }
protected void executeParse(BpmnParse bpmnParse, CompensateEventDefinition eventDefinition) { if (bpmnParse.getCurrentFlowElement() instanceof ThrowEvent) { ThrowEvent throwEvent = (ThrowEvent) bpmnParse.getCurrentFlowElement(); throwEvent.setBehavior(bpmnParse.getActivityBehaviorFactory().createIntermediateThrowCompensationEventActivityBehavior( throwEvent, eventDefinition)); } else if (bpmnParse.getCurrentFlowElement() instanceof BoundaryEvent) { BoundaryEvent boundaryEvent = (BoundaryEvent) bpmnParse.getCurrentFlowElement(); boundaryEvent.setBehavior(bpmnParse.getActivityBehaviorFactory().createBoundaryCompensateEventActivityBehavior(boundaryEvent, eventDefinition, boundaryEvent.isCancelActivity())); } else { // What to do? } }
public IntermediateThrowCompensationEventActivityBehavior createIntermediateThrowCompensationEventActivityBehavior( ThrowEvent throwEvent, CompensateEventDefinition compensateEventDefinition) { return _source.createIntermediateThrowCompensationEventActivityBehavior(throwEvent, compensateEventDefinition); }
@Override public IntermediateThrowCompensationEventActivityBehavior createIntermediateThrowCompensationEventActivityBehavior(ThrowEvent throwEvent, CompensateEventDefinition compensateEventDefinition) { return wrappedActivityBehaviorFactory.createIntermediateThrowCompensationEventActivityBehavior(throwEvent, compensateEventDefinition); }
protected void executeParse(BpmnParse bpmnParse, ThrowEvent intermediateEvent) { EventDefinition eventDefinition = null; if (!intermediateEvent.getEventDefinitions().isEmpty()) { eventDefinition = intermediateEvent.getEventDefinitions().get(0); } if (eventDefinition instanceof SignalEventDefinition) { SignalEventDefinition signalEventDefinition = (SignalEventDefinition) eventDefinition; intermediateEvent.setBehavior(bpmnParse.getActivityBehaviorFactory().createIntermediateThrowSignalEventActivityBehavior(intermediateEvent, signalEventDefinition, bpmnParse.getBpmnModel().getSignal(signalEventDefinition.getSignalRef()))); } else if (eventDefinition instanceof CompensateEventDefinition) { CompensateEventDefinition compensateEventDefinition = (CompensateEventDefinition) eventDefinition; intermediateEvent.setBehavior(bpmnParse.getActivityBehaviorFactory().createIntermediateThrowCompensationEventActivityBehavior(intermediateEvent, compensateEventDefinition)); } else if (eventDefinition == null) { intermediateEvent.setBehavior(bpmnParse.getActivityBehaviorFactory().createIntermediateThrowNoneEventActivityBehavior(intermediateEvent)); } else { logger.warn("Unsupported intermediate throw event type for throw event " + intermediateEvent.getId()); } }
protected void executeParse(BpmnParse bpmnParse, CompensateEventDefinition eventDefinition) { if (bpmnParse.getCurrentFlowElement() instanceof ThrowEvent) { ThrowEvent throwEvent = (ThrowEvent) bpmnParse.getCurrentFlowElement(); throwEvent.setBehavior(bpmnParse.getActivityBehaviorFactory().createIntermediateThrowCompensationEventActivityBehavior( throwEvent, eventDefinition)); } else if (bpmnParse.getCurrentFlowElement() instanceof BoundaryEvent) { BoundaryEvent boundaryEvent = (BoundaryEvent) bpmnParse.getCurrentFlowElement(); boundaryEvent.setBehavior(bpmnParse.getActivityBehaviorFactory().createBoundaryCompensateEventActivityBehavior(boundaryEvent, eventDefinition, boundaryEvent.isCancelActivity())); } else { // What to do? } }
@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? } }
if (bpmnParse.getCurrentFlowElement() instanceof ThrowEvent) { activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createIntermediateThrowCompensationEventActivityBehavior((ThrowEvent) bpmnParse.getCurrentFlowElement(), compensateEventDefinition));