public NodeInstance getNodeInstance(final Node node) { Node actualNode = node; // async continuation handling if (node instanceof AsyncEventNode) { actualNode = ((AsyncEventNode) node).getActualNode(); } else if (useAsync(node)) { actualNode = new AsyncEventNode(node); } NodeInstanceFactory conf = NodeInstanceFactoryRegistry.getInstance(getKnowledgeRuntime().getEnvironment()).getProcessNodeInstanceFactory(actualNode); if (conf == null) { throw new IllegalArgumentException("Illegal node type: " + node.getClass()); } NodeInstanceImpl nodeInstance = (NodeInstanceImpl) conf.getNodeInstance(actualNode, this, this); if (nodeInstance == null) { throw new IllegalArgumentException("Illegal node type: " + node.getClass()); } if (((NodeInstanceImpl) nodeInstance).isInversionOfControl()) { getKnowledgeRuntime().insert(nodeInstance); } return nodeInstance; }
@Test public void testDefaultEntries() throws Exception { Node node = new ActionNode(); assertEquals( CreateNewNodeFactory.class, NodeInstanceFactoryRegistry.getInstance(null).getProcessNodeInstanceFactory( node ).getClass() ); }
NodeInstanceFactory conf = NodeInstanceFactoryRegistry.getInstance(getProcessInstance().getKnowledgeRuntime().getEnvironment()).getProcessNodeInstanceFactory(actualNode); if (conf == null) { throw new IllegalArgumentException("Illegal node type: " + node.getClass());
@Test public void testDiscoveredEntry() { NodeInstanceFactoryRegistry.getInstance(null).register(MockNode.class, new MockNodeInstanceFactory( new MockNodeInstance( new MockNode() ) )); assertEquals( MockNodeInstanceFactory.class, NodeInstanceFactoryRegistry.getInstance(null).getProcessNodeInstanceFactory( new MockNode() ).getClass() ); } }
public org.jbpm.workflow.instance.NodeInstance getNodeInstance(final Node node) { NodeInstanceFactory conf = SimulationNodeInstanceFactoryRegistry.getInstance(getProcessInstance().getKnowledgeRuntime().getEnvironment()).getProcessNodeInstanceFactory(node); if (conf == null) { throw new IllegalArgumentException("Illegal node type: " + node.getClass()); } NodeInstanceImpl nodeInstance = (NodeInstanceImpl) conf.getNodeInstance(node, getProcessInstance(), this); if (nodeInstance == null) { throw new IllegalArgumentException("Illegal node type: " + node.getClass()); } return nodeInstance; }
public org.jbpm.workflow.instance.NodeInstance getNodeInstance(final Node node) { NodeInstanceFactory conf = SimulationNodeInstanceFactoryRegistry.getInstance(getProcessInstance().getKnowledgeRuntime().getEnvironment()).getProcessNodeInstanceFactory(node); if (conf == null) { throw new IllegalArgumentException("Illegal node type: " + node.getClass()); } NodeInstanceImpl nodeInstance = (NodeInstanceImpl) conf.getNodeInstance(node, getProcessInstance(), this); if (nodeInstance == null) { throw new IllegalArgumentException("Illegal node type: " + node.getClass()); } return nodeInstance; }
public NodeInstance getNodeInstance(final Node node) { Node actualNode = node; // async continuation handling if (node instanceof AsyncEventNode) { actualNode = ((AsyncEventNode) node).getActualNode(); } else if (useAsync(node)) { actualNode = new AsyncEventNode(node); } NodeInstanceFactory conf = NodeInstanceFactoryRegistry.getInstance(getKnowledgeRuntime().getEnvironment()).getProcessNodeInstanceFactory(actualNode); if (conf == null) { throw new IllegalArgumentException("Illegal node type: " + node.getClass()); } NodeInstanceImpl nodeInstance = (NodeInstanceImpl) conf.getNodeInstance(actualNode, this, this); if (nodeInstance == null) { throw new IllegalArgumentException("Illegal node type: " + node.getClass()); } if (((NodeInstanceImpl) nodeInstance).isInversionOfControl()) { getKnowledgeRuntime().insert(nodeInstance); } return nodeInstance; }
NodeInstanceFactory conf = NodeInstanceFactoryRegistry.getInstance(getProcessInstance().getKnowledgeRuntime().getEnvironment()).getProcessNodeInstanceFactory(actualNode); if (conf == null) { throw new IllegalArgumentException("Illegal node type: " + node.getClass());