@Override public void execute(ActivityExecution execution) throws Exception { final List<EventSubscriptionEntity> eventSubscriptions = collectEventSubscriptions(execution); if (eventSubscriptions.isEmpty()) { leave(execution); } else { // async (waitForCompletion=false in bpmn) is not supported CompensationUtil.throwCompensationEvent(eventSubscriptions, execution, false); } }
activity.getProperties().set(BpmnProperties.TYPE, ActivityTypes.END_EVENT_COMPENSATION); CompensateEventDefinition compensateEventDefinition = parseThrowCompensateEventDefinition(compensateEventDefinitionElement, scope); activity.setActivityBehavior(new CompensationEventActivityBehavior(compensateEventDefinition)); activity.setProperty(PROPERTYNAME_THROWS_COMPENSATION, true); activity.setScope(true);
@Override public void signal(ActivityExecution execution, String signalName, Object signalData) throws Exception { // join compensating executions - // only wait for non-event-scope executions cause a compensation event subprocess consume the compensation event and // do not have to compensate embedded subprocesses (which are still non-event-scope executions) if (((PvmExecutionImpl) execution).getNonEventScopeExecutions().isEmpty()) { leave(execution); } else { ((ExecutionEntity) execution).forceUpdate(); } }
nestedActivityImpl.getProperties().set(BpmnProperties.TYPE, ActivityTypes.INTERMEDIATE_EVENT_COMPENSATION_THROW); CompensateEventDefinition compensateEventDefinition = parseThrowCompensateEventDefinition(compensateEventDefinitionElement, scopeElement); activityBehavior = new CompensationEventActivityBehavior(compensateEventDefinition); nestedActivityImpl.setProperty(PROPERTYNAME_THROWS_COMPENSATION, true); nestedActivityImpl.setScope(true);
@Override public void signal(ActivityExecution execution, String signalName, Object signalData) throws Exception { // join compensating executions - // only wait for non-event-scope executions cause a compensation event subprocess consume the compensation event and // do not have to compensate embedded subprocesses (which are still non-event-scope executions) if (((PvmExecutionImpl) execution).getNonEventScopeExecutions().isEmpty()) { leave(execution); } else { ((ExecutionEntity) execution).forceUpdate(); } }
@Override public void execute(ActivityExecution execution) throws Exception { final List<EventSubscriptionEntity> eventSubscriptions = collectEventSubscriptions(execution); if (eventSubscriptions.isEmpty()) { leave(execution); } else { // async (waitForCompletion=false in bpmn) is not supported CompensationUtil.throwCompensationEvent(eventSubscriptions, execution, false); } }
activity.getProperties().set(BpmnProperties.TYPE, ActivityTypes.END_EVENT_COMPENSATION); CompensateEventDefinition compensateEventDefinition = parseThrowCompensateEventDefinition(compensateEventDefinitionElement, scope); activity.setActivityBehavior(new CompensationEventActivityBehavior(compensateEventDefinition)); activity.setProperty(PROPERTYNAME_THROWS_COMPENSATION, true); activity.setScope(true);
@Override public void signal(ActivityExecution execution, String signalName, Object signalData) throws Exception { // join compensating executions - // only wait for non-event-scope executions cause a compensation event subprocess consume the compensation event and // do not have to compensate embedded subprocesses (which are still non-event-scope executions) if (((PvmExecutionImpl) execution).getNonEventScopeExecutions().isEmpty()) { leave(execution); } else { ((ExecutionEntity) execution).forceUpdate(); } }
@Override public void execute(ActivityExecution execution) throws Exception { final List<EventSubscriptionEntity> eventSubscriptions = collectEventSubscriptions(execution); if (eventSubscriptions.isEmpty()) { leave(execution); } else { // async (waitForCompletion=false in bpmn) is not supported CompensationUtil.throwCompensationEvent(eventSubscriptions, execution, false); } }
nestedActivityImpl.getProperties().set(BpmnProperties.TYPE, ActivityTypes.INTERMEDIATE_EVENT_COMPENSATION_THROW); CompensateEventDefinition compensateEventDefinition = parseThrowCompensateEventDefinition(compensateEventDefinitionElement, scopeElement); activityBehavior = new CompensationEventActivityBehavior(compensateEventDefinition); nestedActivityImpl.setProperty(PROPERTYNAME_THROWS_COMPENSATION, true); nestedActivityImpl.setScope(true);
activity.getProperties().set(BpmnProperties.TYPE, ActivityTypes.END_EVENT_COMPENSATION); CompensateEventDefinition compensateEventDefinition = parseThrowCompensateEventDefinition(compensateEventDefinitionElement, scope); activity.setActivityBehavior(new CompensationEventActivityBehavior(compensateEventDefinition)); activity.setProperty(PROPERTYNAME_THROWS_COMPENSATION, true); activity.setScope(true);
nestedActivityImpl.getProperties().set(BpmnProperties.TYPE, ActivityTypes.INTERMEDIATE_EVENT_COMPENSATION_THROW); CompensateEventDefinition compensateEventDefinition = parseThrowCompensateEventDefinition(compensateEventDefinitionElement, scopeElement); activityBehavior = new CompensationEventActivityBehavior(compensateEventDefinition); nestedActivityImpl.setProperty(PROPERTYNAME_THROWS_COMPENSATION, true); nestedActivityImpl.setScope(true);