Package org.jbpm.graph.node

Examples of org.jbpm.graph.node.TaskNode


    private static final long serialVersionUID = 1L;
    public void execute(ExecutionContext executionContext) throws Exception {
      Token token = executionContext.getToken();
      TaskMgmtInstance tmi = executionContext.getTaskMgmtInstance();
     
      TaskNode taskNode = (TaskNode) executionContext.getNode();
      Task changeNappy = taskNode.getTask("change nappy");

      // now, 2 task instances are created for the same task.
      tmi.createTaskInstance(changeNappy, token);
      tmi.createTaskInstance(changeNappy, token);
    }
View Full Code Here


      "<process-definition>" +
      "  <task-node name='t'>" +
      "  </task-node>" +
      "</process-definition>"
    );
    TaskNode taskNode = (TaskNode) processDefinition.getNode("t");
    assertNotNull(taskNode);
    assertEquals("t", taskNode.getName());
  }
View Full Code Here

      "    <task name='one' />" +
      "    <task name='two' />" +
      "    <task name='three' />" +
      "  </task-node>" +
      "</process-definition>");
    TaskNode taskNode = (TaskNode) processDefinition.getNode("t");
    assertNotNull(taskNode);
    assertEquals(3, taskNode.getTasks().size());
  }
View Full Code Here

    ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
      "<process-definition>" +
      "  <task-node name='t' />" +
      "</process-definition>"
    );
    TaskNode taskNode = (TaskNode) processDefinition.getNode("t");
    assertEquals(TaskNode.SIGNAL_LAST, taskNode.getSignal());
  }
View Full Code Here

    ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
      "<process-definition>" +
      "  <task-node name='t' signal='first' />" +
      "</process-definition>"
    );
    TaskNode taskNode = (TaskNode) processDefinition.getNode("t");
    assertEquals(TaskNode.SIGNAL_FIRST, taskNode.getSignal());
  }
View Full Code Here

    ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
      "<process-definition>" +
      "  <task-node name='t' />" +
      "</process-definition>"
    );
    TaskNode taskNode = (TaskNode) processDefinition.getNode("t");
    assertTrue(taskNode.getCreateTasks());
  }
View Full Code Here

    ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
      "<process-definition>" +
      "  <task-node name='t' create-tasks='false'/>" +
      "</process-definition>"
    );
    TaskNode taskNode = (TaskNode) processDefinition.getNode("t");
    assertFalse(taskNode.getCreateTasks());
  }
View Full Code Here

      "      </event>" +
      "    </task>" +
      "  </task-node>" +
      "</process-definition>"
    );
    TaskNode taskNode = (TaskNode) processDefinition.getNode("a");
    Task task = taskNode.getTask("clean ceiling");
    assertNotNull( task.getEvent(Event.EVENTTYPE_TASK_CREATE) );
  }
View Full Code Here

      "      </event>" +
      "    </task>" +
      "  </task-node>" +
      "</process-definition>"
    );
    TaskNode taskNode = (TaskNode) processDefinition.getNode("a");
    Task task = taskNode.getTask("clean ceiling");
    assertNotNull( task.getEvent(Event.EVENTTYPE_TASK_START) );
  }
View Full Code Here

      "      </event>" +
      "    </task>" +
      "  </task-node>" +
      "</process-definition>"
    );
    TaskNode taskNode = (TaskNode) processDefinition.getNode("a");
    Task task = taskNode.getTask("clean ceiling");
    assertNotNull( task.getEvent(Event.EVENTTYPE_TASK_ASSIGN) );
  }
View Full Code Here

TOP

Related Classes of org.jbpm.graph.node.TaskNode

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.