throw new WorkflowRuntimeException(null, getProcessInstance(), "Compensation can only be triggered with String events, not an event of type " + activityRefStr == null ? "null" : activityRefStr.getClass().getSimpleName()); compensationScopeContainer = process; } else { compensationScopeContainer = (ContextContainer) findNode(toCompensateNodeId); toCompensateNode = findNode(toCompensateNodeId); if( toCompensateNode == null ) { generatedInstances = createNodeInstanceContainers((Node) compensationScopeContainer, true); } else { generatedInstances = createNodeInstanceContainers(toCompensateNode, false);
private void registerExternalEventNodeListeners() { for (Node node : getWorkflowProcess().getNodes()) { if (node instanceof EventNode) { if ("external".equals(((EventNode) node).getScope())) { addEventListener(((EventNode) node).getType(), EMPTY_EVENT_LISTENER, true); } } else if (node instanceof EventSubProcessNode) { List<String> events = ((EventSubProcessNode) node).getEvents(); for (String type : events) { addEventListener(type, EMPTY_EVENT_LISTENER, true); if (isVariableExpression(type)) { addEventListener(resolveVariable(type), EMPTY_EVENT_LISTENER, true); } } } else if (node instanceof DynamicNode) { if (((DynamicNode) node).getActivationEventName() != null) { addEventListener(((DynamicNode) node).getActivationEventName(), EMPTY_EVENT_LISTENER, true); } } } if( getWorkflowProcess().getMetaData().containsKey("Compensation") ) { addEventListener("Compensation", new CompensationEventListener(this), true); } }
parentInstance = (NodeInstanceContainer) getProcessInstance(); } else { parentInstance = (NodeInstanceContainer) ((WorkflowProcessInstanceImpl) getProcessInstance()).getNodeInstance((Node) nestedNodes.pop()); generatedInstances.add((NodeInstance) parentInstance);
private void registerExternalEventNodeListeners() { for (Node node : getWorkflowProcess().getNodes()) { if (node instanceof EventNode) { if ("external".equals(((EventNode) node).getScope())) { addEventListener(((EventNode) node).getType(), EMPTY_EVENT_LISTENER, true); } } else if (node instanceof EventSubProcessNode) { List<String> events = ((EventSubProcessNode) node).getEvents(); for (String type : events) { addEventListener(type, EMPTY_EVENT_LISTENER, true); if (isVariableExpression(type)) { addEventListener(resolveVariable(type), EMPTY_EVENT_LISTENER, true); } } } else if (node instanceof DynamicNode) { if (((DynamicNode) node).getActivationEventName() != null) { addEventListener(((DynamicNode) node).getActivationEventName(), EMPTY_EVENT_LISTENER, true); } } } if( getWorkflowProcess().getMetaData().containsKey("Compensation") ) { addEventListener("Compensation", new CompensationEventListener(this), true); } }
parentInstance = (NodeInstanceContainer) getProcessInstance(); } else { parentInstance = (NodeInstanceContainer) ((WorkflowProcessInstanceImpl) getProcessInstance()).getNodeInstance((Node) nestedNodes.pop()); generatedInstances.add((NodeInstance) parentInstance);
throw new WorkflowRuntimeException(null, getProcessInstance(), "Compensation can only be triggered with String events, not an event of type " + activityRefStr == null ? "null" : activityRefStr.getClass().getSimpleName()); compensationScopeContainer = process; } else { compensationScopeContainer = (ContextContainer) findNode(toCompensateNodeId); toCompensateNode = findNode(toCompensateNodeId); if( toCompensateNode == null ) { generatedInstances = createNodeInstanceContainers((Node) compensationScopeContainer, true); } else { generatedInstances = createNodeInstanceContainers(toCompensateNode, false);