@Override public void cancel() { getProcessInstance().removeEventListener(getEventType(), getEventListener(), true); ((NodeInstanceContainer) getNodeInstanceContainer()).removeNodeInstance(this); } }
@Override public void signalEvent(String type, Object event) { BoundaryEventNode boundaryNode = (BoundaryEventNode) getEventNode(); String attachedTo = boundaryNode.getAttachedToNodeId(); Collection<NodeInstance> nodeInstances = ((NodeInstanceContainer) getNodeInstanceContainer()).getNodeInstances(); if( type != null && type.startsWith("Compensation") ) { // if not active && completed, signal if( ! isAttachedToNodeActive(nodeInstances, attachedTo, type, event) && isAttachedToNodeCompleted(attachedTo)) { super.signalEvent(type, event); } else { cancel(); } } else { if (isAttachedToNodeActive(nodeInstances, attachedTo, type, event)) { super.signalEvent(type, event); } else { cancel(); } } }
@Override public void cancel() { getProcessInstance().removeEventListener(getEventType(), getEventListener(), true); ((NodeInstanceContainer) getNodeInstanceContainer()).removeNodeInstance(this); } }
@Override public void signalEvent(String type, Object event) { BoundaryEventNode boundaryNode = (BoundaryEventNode) getEventNode(); String attachedTo = boundaryNode.getAttachedToNodeId(); Collection<NodeInstance> nodeInstances = ((NodeInstanceContainer) getNodeInstanceContainer()).getNodeInstances(); if( type != null && type.startsWith("Compensation") ) { // if not active && completed, signal if( ! isAttachedToNodeActive(nodeInstances, attachedTo, type, event) && isAttachedToNodeCompleted(attachedTo)) { super.signalEvent(type, event); } else { cancel(); } } else { if (isAttachedToNodeActive(nodeInstances, attachedTo, type, event)) { super.signalEvent(type, event); } else { cancel(); } } }