private static DynamicNodeInstance findDynamicContext(WorkflowProcessInstance processInstance, String uniqueId) { for (NodeInstance nodeInstance : ((WorkflowProcessInstanceImpl) processInstance).getNodeInstances(true)) { if (uniqueId.equals(((NodeInstanceImpl) nodeInstance).getUniqueId())) { return (DynamicNodeInstance) nodeInstance; } } throw new IllegalArgumentException("Could not find node instance " + uniqueId); }
public Node getNode() { try { return ((org.jbpm.workflow.core.NodeContainer) this.nodeInstanceContainer.getNodeContainer()).internalGetNode( this.nodeId ); } catch (IllegalArgumentException e) { throw new IllegalArgumentException( "Unknown node id: " + this.nodeId + " for node instance " + getUniqueId() + " for process instance " + this.processInstance, e); } }
@Override public void afterNodeLeft(ProcessNodeLeftEvent event) { logAndAdd("anl-" + ((NodeInstanceImpl) event.getNodeInstance()).getUniqueId()); }
@Override public void afterNodeTriggered(ProcessNodeTriggeredEvent event) { logAndAdd("ant-" + ((NodeInstanceImpl) event.getNodeInstance()).getUniqueId()); }
@Override public void beforeNodeTriggered(ProcessNodeTriggeredEvent event) { logAndAdd("bnt-" + ((NodeInstanceImpl) event.getNodeInstance()).getUniqueId()); }
@Override public void beforeNodeLeft(ProcessNodeLeftEvent event) { logAndAdd("bnl-" + ((NodeInstanceImpl) event.getNodeInstance()).getUniqueId()); }
@Override public void beforeNodeTriggered(ProcessNodeTriggeredEvent event) { NodeInstance nodeInstance = event.getNodeInstance(); String uniqId = ((NodeInstanceImpl) nodeInstance).getUniqueId(); String nodeName = ((NodeInstanceImpl) nodeInstance).getNode().getName(); String prevNodeName = nodeIdNodeNameMap.put( uniqId, nodeName ); if( prevNodeName != null ) { assertEquals(uniqId + " is used for more than one node instance: ", prevNodeName, nodeName); } }
private static DynamicNodeInstance findDynamicContext(WorkflowProcessInstance processInstance, String uniqueId) { for (NodeInstance nodeInstance : ((WorkflowProcessInstanceImpl) processInstance).getNodeInstances(true)) { if (uniqueId.equals(((NodeInstanceImpl) nodeInstance).getUniqueId())) { return (DynamicNodeInstance) nodeInstance; } } throw new IllegalArgumentException("Could not find node instance " + uniqueId); }
public Node getNode() { try { return ((org.jbpm.workflow.core.NodeContainer) this.nodeInstanceContainer.getNodeContainer()).internalGetNode( this.nodeId ); } catch (IllegalArgumentException e) { throw new IllegalArgumentException( "Unknown node id: " + this.nodeId + " for node instance " + getUniqueId() + " for process instance " + this.processInstance, e); } }
@Override public void beforeNodeTriggered(ProcessNodeTriggeredEvent event) { NodeInstance nodeInstance = event.getNodeInstance(); String uniqId = ((NodeInstanceImpl) nodeInstance).getUniqueId(); String nodeName = ((NodeInstanceImpl) nodeInstance).getNode().getName(); String prevNodeName = nodeIdNodeNameMap.put( uniqId, nodeName ); if( prevNodeName != null ) { assertEquals(uniqId + " is used for more than one node instance: ", prevNodeName, nodeName); } }