private boolean acceptsNoIncomingConnections(Node node) { NodeContainer nodeContainer = node.getNodeContainer(); return nodeContainer instanceof DynamicNode || (nodeContainer instanceof WorkflowProcess && ((WorkflowProcess) nodeContainer).isDynamic()); }
private boolean acceptsNoOutgoingConnections(Node node) { NodeContainer nodeContainer = node.getNodeContainer(); return nodeContainer instanceof DynamicNode || (nodeContainer instanceof WorkflowProcess && ((WorkflowProcess) nodeContainer).isDynamic()); }
while (!(match.getNodeContainer() instanceof Process)) { id = ":" + match.getId() + id; match = (Node) match.getNodeContainer();
Stack<NodeInstance> generatedInstances = new Stack<NodeInstance>(); NodeContainer parentContainer = toCompensateNode.getNodeContainer(); while( !(parentContainer instanceof RuleFlowProcess) ) { nestedNodes.add(parentContainer); parentContainer = ((Node) parentContainer).getNodeContainer();
public static String getUniqueNodeId(Node node) { String result = (String) node.getMetaData().get("UniqueId"); if (result != null) { return result; } result = node.getId() + ""; NodeContainer nodeContainer = node.getNodeContainer(); while (nodeContainer instanceof CompositeNode) { CompositeNode composite = (CompositeNode) nodeContainer; result = composite.getId() + "-" + result; nodeContainer = composite.getNodeContainer(); } return "_" + result; }
public void validateAddIncomingConnection(final String type, final Connection connection) { CompositeNode.NodeAndType nodeAndType = internalGetLinkedIncomingNode(type); if (connection.getFrom().getNodeContainer() == this) { if (nodeAndType != null) { throw new IllegalArgumentException("Cannot link incoming connection type more than once: " + type); } } else { if (nodeAndType != null) { NodeImpl node = (NodeImpl) nodeAndType.getNode(); if (node != null) { node.validateAddIncomingConnection(nodeAndType.getType(), connection); } } } }
if( completedIds.contains(((NodeImpl) handlerNode.getNodeContainer()).getMetaData("UniqueId")) ) { NodeInstance subProcessNodeInstance = ((NodeInstanceContainer) nodeInstanceContainer).getNodeInstance((Node) handlerNode.getNodeContainer()); compensationInstances.add(subProcessNodeInstance); NodeInstance compensationHandlerNodeInstance
public void validateAddOutgoingConnection(final String type, final Connection connection) { CompositeNode.NodeAndType nodeAndType = internalGetLinkedOutgoingNode(type); if (connection.getTo().getNodeContainer() == this) { if (nodeAndType != null) { throw new IllegalArgumentException("Cannot link outgoing connection type more than once: " + type); } } else { if (nodeAndType != null) { NodeImpl node = (NodeImpl) nodeAndType.getNode(); if (node != null) { ((NodeImpl) nodeAndType.getNode()).validateAddOutgoingConnection(nodeAndType.getType(), connection); } } } }
public void triggerNode(long nodeId, boolean fireEvents) { org.jbpm.workflow.instance.NodeInstance nodeInstance = (org.jbpm.workflow.instance.NodeInstance) ((org.jbpm.workflow.instance.NodeInstanceContainer) getNodeInstanceContainer()) .getNodeInstance(getNode().getNodeContainer().getNode(nodeId)); triggerNodeInstance(nodeInstance, org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE, fireEvents); }
NodeContainer nodeContainer = node.getNodeContainer(); while (nodeContainer instanceof CompositeNode) { CompositeNode parent = (CompositeNode) nodeContainer;
NodeContainer targetParent = targetNode.getNodeContainer(); if( ! sourceParent.equals(targetParent) ) { throw new IllegalArgumentException("Compensation Associations may not cross (sub-)process boundaries,");
nodeId = (String)node.getMetaData().get("UniqueId"); nodeType = node.getClass().getSimpleName(); nodeContainerId = getNodeContainerId(node.getNodeContainer()); } else { nodeId = Long.toString(nodeInstance.getNodeId());
nodeId = (String)node.getMetaData().get("UniqueId"); nodeType = node.getClass().getSimpleName(); nodeContainerId = getNodeContainerId(node.getNodeContainer()); } else { nodeId = Long.toString(nodeInstance.getNodeId());
parentSubProcess = ((Node) subProcess).getNodeContainer();
public void addIncomingConnection(String type, Connection connection) { if (connection.getFrom().getNodeContainer() == this) { linkOutgoingConnections(connection.getFrom().getId(), connection.getFromType(), org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE); } else { super.addIncomingConnection(type, connection); CompositeNode.NodeAndType inNode = internalGetLinkedIncomingNode(type); if (inNode != null) { CompositeNodeStart start = new CompositeNodeStart(this, connection.getFrom(), type); internalAddNode(start); NodeImpl node = (NodeImpl) inNode.getNode(); if (node != null) { new ConnectionImpl( start, org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE, inNode.getNode(), inNode.getType()); } } } }
public void addOutgoingConnection(String type, Connection connection) { if (connection.getTo().getNodeContainer() == this) { linkIncomingConnections( org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE, connection.getTo().getId(), connection.getToType()); } else { super.addOutgoingConnection(type, connection); CompositeNode.NodeAndType outNode = internalGetLinkedOutgoingNode(type); if (outNode != null) { CompositeNodeEnd end = new CompositeNodeEnd(this, connection.getTo(), type); internalAddNode(end); NodeImpl node = (NodeImpl) outNode.getNode(); if (node != null) { new ConnectionImpl( outNode.getNode(), outNode.getType(), end, org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE); } } } }
private boolean acceptsNoIncomingConnections(Node node) { NodeContainer nodeContainer = node.getNodeContainer(); return nodeContainer instanceof DynamicNode || (nodeContainer instanceof WorkflowProcess && ((WorkflowProcess) nodeContainer).isDynamic()); }
private boolean acceptsNoOutgoingConnections(Node node) { NodeContainer nodeContainer = node.getNodeContainer(); return nodeContainer instanceof DynamicNode || (nodeContainer instanceof WorkflowProcess && ((WorkflowProcess) nodeContainer).isDynamic()); }
public NodeContainer getNodeContainer() { return new NodeContainerAdapter(delegate.getNodeContainer()); }
public void triggerNode(long nodeId, boolean fireEvents) { org.jbpm.workflow.instance.NodeInstance nodeInstance = (org.jbpm.workflow.instance.NodeInstance) ((org.jbpm.workflow.instance.NodeInstanceContainer) getNodeInstanceContainer()) .getNodeInstance(getNode().getNodeContainer().getNode(nodeId)); triggerNodeInstance(nodeInstance, org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE, fireEvents); }