Package org.drools.workflow.instance.node

Examples of org.drools.workflow.instance.node.DynamicNodeInstance


                break;
            case PersisterEnums.FOR_EACH_NODE_INSTANCE:
                nodeInstance = new ForEachNodeInstance();
                break;
            case PersisterEnums.DYNAMIC_NODE_INSTANCE:
                nodeInstance = new DynamicNodeInstance();
                nbTimerInstances = stream.readInt();
                if (nbTimerInstances > 0) {
                    List<Long> timerInstances = new ArrayList<Long>();
                    for (int i = 0; i < nbTimerInstances; i++) {
                        timerInstances.add(stream.readLong());
View Full Code Here


                break;
            case PersisterEnums.FOR_EACH_NODE_INSTANCE:
                nodeInstance = new ForEachNodeInstance();
                break;
            case PersisterEnums.DYNAMIC_NODE_INSTANCE:
                nodeInstance = new DynamicNodeInstance();
                nbTimerInstances = stream.readInt();
                if (nbTimerInstances > 0) {
                    List<Long> timerInstances = new ArrayList<Long>();
                    for (int i = 0; i < nbTimerInstances; i++) {
                        timerInstances.add(stream.readLong());
View Full Code Here

    KnowledgeRuntimeLogger logger = KnowledgeRuntimeLoggerFactory.newFileLogger(ksession, "test");
    TestWorkItemHandler handler = new TestWorkItemHandler();
    ksession.getWorkItemManager().registerWorkItemHandler("Human Task", handler);
    // start a new process instance
    ProcessInstance processInstance = (ProcessInstance) ksession.startProcess("org.drools.dynamic");
    DynamicNodeInstance dynamicContext = (DynamicNodeInstance)
      ((WorkflowProcessInstance) processInstance).getNodeInstances().iterator().next();
    Map<String, Object> parameters = new HashMap<String, Object>();
    parameters.put("TaskName", "Dynamic Task");
    assertNull(handler.getWorkItem());
    assertEquals(0, dynamicContext.getNodeInstances().size());
    DynamicUtils.addDynamicWorkItem(dynamicContext, ksession, "Human Task", parameters);
    assertNotNull(handler.getWorkItem());
    assertEquals(1, dynamicContext.getNodeInstances().size());
    logger.close();
    }
View Full Code Here

    KnowledgeRuntimeLogger logger = KnowledgeRuntimeLoggerFactory.newFileLogger(ksession, "test");
    TestWorkItemHandler handler = new TestWorkItemHandler();
    ksession.getWorkItemManager().registerWorkItemHandler("Human Task", handler);
    // start a new process instance
    ProcessInstance processInstance = (ProcessInstance) ksession.startProcess("org.drools.dynamic");
    DynamicNodeInstance dynamicContext = (DynamicNodeInstance)
      ((WorkflowProcessInstance) processInstance).getNodeInstances().iterator().next();
    Map<String, Object> parameters = new HashMap<String, Object>();
    parameters.put("x", "NewValue");
    assertNull(handler.getWorkItem());
    assertEquals(0, dynamicContext.getNodeInstances().size());
    DynamicUtils.addDynamicSubProcess(dynamicContext, ksession, "org.drools.subflow", parameters);
    assertNotNull(handler.getWorkItem());
    assertEquals(1, dynamicContext.getNodeInstances().size());
    logger.close();
    }
View Full Code Here

                break;
            case PersisterEnums.FOR_EACH_NODE_INSTANCE:
                nodeInstance = new ForEachNodeInstance();
                break;
            case PersisterEnums.DYNAMIC_NODE_INSTANCE:
                nodeInstance = new DynamicNodeInstance();
                nbTimerInstances = stream.readInt();
                if (nbTimerInstances > 0) {
                    List<Long> timerInstances = new ArrayList<Long>();
                    for (int i = 0; i < nbTimerInstances; i++) {
                        timerInstances.add(stream.readLong());
View Full Code Here

TOP

Related Classes of org.drools.workflow.instance.node.DynamicNodeInstance

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.