public void addNode(final Node node) { nodeContainer.addNode(node); ((org.jbpm.workflow.core.Node) node).setNodeContainer(this); }
public void removeNode(final Node node) { nodeContainer.removeNode(node); ((org.jbpm.workflow.core.Node) node).setNodeContainer(null); }
public synchronized void terminate() { ((org.jbpm.workflow.core.Node) this.from).removeOutgoingConnection(fromType, this); ((org.jbpm.workflow.core.Node) this.to).removeIncomingConnection(toType, this); this.from = null; this.fromType = null; this.to = null; this.toType = null; }
public void addNode(Node node) { // TODO find a more elegant solution for this // preferrable remove id setting from this class // and delegate to GUI command that drops node if (node.getId() <= 0) { long id = 0; for (Node n: nodeContainer.getNodes()) { if (n.getId() > id) { id = n.getId(); } } ((org.jbpm.workflow.core.Node) node).setId(++id); } nodeContainer.addNode(node); ((org.jbpm.workflow.core.Node) node).setNodeContainer(this); }
public RuleFlowNodeContainerFactory connection(long fromId, long toId) { Node from = nodeContainer.getNode(fromId); Node to = nodeContainer.getNode(toId); new ConnectionImpl( from, org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE, to, org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE); return this; }
protected NodeFactory(RuleFlowNodeContainerFactory nodeContainerFactory, NodeContainer nodeContainer, long id) { this.nodeContainerFactory = nodeContainerFactory; this.nodeContainer = nodeContainer; this.node = createNode(); this.node.setId(id); }
public RuleFlowNodeContainerFactory done() { nodeContainer.addNode(node); return this.nodeContainerFactory; }
public void setValue(Object value) { node.setMetaData(name, value); } public DataType getType() {
public void wire(Object object) { setMetaData( "Action", object ); }
public void addConstraint(ConnectionRef connection, Constraint constraint) { if (connection != null) { throw new IllegalArgumentException( "A Milestone node only accepts one simple constraint"); } this.constraint = constraint.getConstraint(); }
public Node[] getNodes() { return nodeContainer.getNodes(); }
public Node getInNode() { if (inNode == null) { inNode = ((NodeContainer) parentNode.getNodeContainer()).internalGetNode(inNodeId); } return inNode; }
private boolean acceptsNoOutgoingConnections(Node node) { NodeContainer nodeContainer = node.getNodeContainer(); return nodeContainer instanceof DynamicNode || (nodeContainer instanceof WorkflowProcess && ((WorkflowProcess) nodeContainer).isDynamic()); }
public Node getNode() { if (node == null) { try { node = nodeContainer.getNode(nodeId); } catch (IllegalArgumentException e) { // unknown node id, returning null } } return node; }
public void connect() { ((org.jbpm.workflow.core.Node) this.from).addOutgoingConnection(fromType, this); ((org.jbpm.workflow.core.Node) this.to).addIncomingConnection(toType, this); }
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { super.readExternal( in ); dialect = (String) in.readObject(); consequence = (String) in.readObject(); }
protected void handleNode(final Node node, final Element element, final String uri, final String localName, final ExtensibleXmlParser parser) throws SAXException { super.handleNode(node, element, uri, localName, parser); node.setMetaData("Transaction", true); }
public Node getNode(final long id) { return nodeContainer.getNode(id); }
public void removeNode(Node node) { nodeContainer.removeNode(node); ((org.jbpm.workflow.core.Node) node).setNodeContainer(null); }
public Node getNode(long id) { return nodeContainer.getNode(id); }