Package org.jbpm.taskmgmt.def

Examples of org.jbpm.taskmgmt.def.Task


      "    </task>" +
      "  </task-node>" +
      "</process-definition>"
    );
    TaskNode taskNode = (TaskNode) processDefinition.getNode("t");
    Task task = taskNode.getTask("clean ceiling");
    TaskController taskController = task.getTaskController();
    assertNotNull(taskController);
    assertNull(taskController.getTaskControllerDelegation());
    List variableAccesses = taskController.getVariableAccesses();
    assertNotNull(variableAccesses);
    assertEquals(3, variableAccesses.size());
View Full Code Here


      "    </task>" +
      "  </task-node>" +
      "</process-definition>"
    );
    TaskNode taskNode = (TaskNode) processDefinition.getNode("t");
    Task task = taskNode.getTask("clean ceiling");
    TaskController taskController = task.getTaskController();
    assertNull(taskController.getVariableAccesses());
    Delegation taskControllerDelegation = taskController.getTaskControllerDelegation();
    assertNotNull(taskControllerDelegation);
    assertEquals("my-own-task-controller-handler-class", taskControllerDelegation.getClassName());
  }
View Full Code Here

      "      <controller />" +
      "    </task>" +
      "  </start-state>" +
      "</process-definition>"
    );
    Task task = processDefinition.getTaskMgmtDefinition().getStartTask();
    assertNotNull(task.getTaskController());
  }
View Full Code Here

    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

      "    <assignment class='assignment-specified-just-to-prevent-a-warning'/>" +
      "  </swimlane>" +
      "  <task name='grow old' swimlane='initiator' />" +
      "</process-definition>"
    );
    Task growOld = processDefinition.getTaskMgmtDefinition().getTask("grow old");
    assertNotNull(growOld);
    assertNotNull(growOld.getSwimlane());
    assertEquals("initiator", growOld.getSwimlane().getName());
  }
View Full Code Here

      "    </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

      "    </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

      "    </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

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

      "    </task>" +
      "  </task-node>" +
      "</process-definition>"
    );
    TaskNode taskNode = (TaskNode) processDefinition.getNode("a");
    Task task = taskNode.getTask("clean ceiling");
    Event event = task.getEvent(Event.EVENTTYPE_TASK_CREATE);
    assertNotNull(event);
    CreateTimerAction createTimerAction = (CreateTimerAction) event.getActions().get(0);
    assertNotNull(createTimerAction);
    assertEquals("2 business minutes", createTimerAction.getDueDate());

    // test default cancel event
    event = task.getEvent(Event.EVENTTYPE_TASK_END);
    assertNotNull(event);
    CancelTimerAction cancelTimerAction = (CancelTimerAction) event.getActions().get(0);
    assertNotNull(cancelTimerAction);
  }
View Full Code Here

TOP

Related Classes of org.jbpm.taskmgmt.def.Task

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.