Package org.jbpm.taskmgmt.def

Examples of org.jbpm.taskmgmt.def.Swimlane


    return swimlaneInstances != null ? swimlaneInstances.get(swimlaneName) : null;
  }

  public SwimlaneInstance createSwimlaneInstance(String swimlaneName)
  {
    Swimlane swimlane = (taskMgmtDefinition != null ? taskMgmtDefinition.getSwimlane(swimlaneName) : null);
    if (swimlane != null)
    {
      return createSwimlaneInstance(swimlane);
    }
    throw new JbpmException("couldn't create swimlane instance for non-existing swimlane " + swimlaneName);
View Full Code Here


  }

  public void assign(ExecutionContext executionContext) {
    TaskMgmtInstance taskMgmtInstance = executionContext.getTaskMgmtInstance();

    Swimlane swimlane = task.getSwimlane();
    // if this task is in a swimlane
    if (swimlane != null) {

      // if this is a task assignment for a start-state
      if (isStartTaskInstance()) {
View Full Code Here

      {
        addWarning("there's a swimlane without a name");
      }
      else
      {
        Swimlane swimlane = new Swimlane(swimlaneName);
        Element assignmentElement = swimlaneElement.element("assignment");

        if (assignmentElement != null)
        {

          if ((assignmentElement.attribute("actor-id") != null) || (assignmentElement.attribute("pooled-actors") != null))
          {
            swimlane.setActorIdExpression(assignmentElement.attributeValue("actor-id"));
            swimlane.setPooledActorsExpression(assignmentElement.attributeValue("pooled-actors"));

          }
          else
          {
            Delegation assignmentDelegation = readAssignmentDelegation(assignmentElement);
            swimlane.setAssignmentDelegation(assignmentDelegation);
          }
        }
        taskMgmtDefinition.addSwimlane(swimlane);
      }
    }
View Full Code Here

    Element assignmentElement = taskElement.element("assignment");

    // if there is a swimlane attribute specified
    if (swimlaneName != null)
    {
      Swimlane swimlane = taskMgmtDefinition.getSwimlane(swimlaneName);
      if (swimlane == null)
      {
        addWarning("task references unknown swimlane '" + swimlaneName + "':" + taskElement.asXML());
      }
      else
View Full Code Here

    if ((taskMgmtDefinition != null) && (taskMgmtDefinition.getSwimlanes() != null))
    {
      for (Swimlane swimlane : taskMgmtDefinition.getSwimlanes().values())
      {
        Task startTask = taskMgmtDefinition.getStartTask();
        Swimlane startTaskSwimlane = (startTask != null ? startTask.getSwimlane() : null);

        if ((swimlane.getAssignmentDelegation() == null)
             && (swimlane.getActorIdExpression()==null)
             && (swimlane.getPooledActorsExpression()==null)
             && (swimlane != startTaskSwimlane))
View Full Code Here

    super.setUp();
   
    processDefinition = new ProcessDefinition();
    taskMgmtDefinition = new TaskMgmtDefinition();
    processDefinition.addDefinition(taskMgmtDefinition);
    buyer = new Swimlane("buyer");
    taskMgmtDefinition.addSwimlane(buyer);
    seller = new Swimlane("seller");
    taskMgmtDefinition.addSwimlane(seller);
    laundry = new Task("laundry");
    taskMgmtDefinition.addTask(laundry);
    dishes = new Task("dishes");
    taskMgmtDefinition.addTask(dishes);
View Full Code Here

      "</process-definition>");
 
    processDefinition = saveAndReload(processDefinition);
 
    TaskMgmtDefinition taskMgmtDefinition = processDefinition.getTaskMgmtDefinition();
    Swimlane initiatorSwimlaneViaStartTask = taskMgmtDefinition.getStartTask().getSwimlane();
    assertNotNull(initiatorSwimlaneViaStartTask);
   
    Swimlane initiatorSwimlaneViaDefinition = taskMgmtDefinition.getSwimlane("initiator");
    assertSame(initiatorSwimlaneViaDefinition, initiatorSwimlaneViaStartTask);
  }
View Full Code Here

      "    <assignment class='assignment-specified-just-to-prevent-a-warning'/>" +
      "  </swimlane>" +
      "</process-definition>"
    );
    TaskMgmtDefinition taskMgmtDefinition = processDefinition.getTaskMgmtDefinition();
    Swimlane initiatorSwimlane = taskMgmtDefinition.getSwimlane("initiator");
    assertNotNull(initiatorSwimlane);
    assertEquals("initiator", initiatorSwimlane.getName());
  }
View Full Code Here

    assertEquals("bill", assignable.getActorId());
  }

  public void testFirstTermSwimlane() {
    expressionAssignmentHandler.expression = "swimlane(boss)";
    SwimlaneInstance swimlaneInstance = new SwimlaneInstance(new Swimlane("boss"));
    swimlaneInstance.setActorId("john");
    processInstance.getTaskMgmtInstance().addSwimlaneInstance(swimlaneInstance);
    expressionAssignmentHandler.assign(assignable, executionContext);
    assertEquals("john", assignable.getActorId());
  }
View Full Code Here

  }

  public void assign(ExecutionContext executionContext) {
    TaskMgmtInstance taskMgmtInstance = executionContext.getTaskMgmtInstance();
   
    Swimlane swimlane = task.getSwimlane();
    // if this task is in a swimlane
    if (swimlane!=null) {
     
      // if this is a task assignment for a start-state
      if (isStartTaskInstance()) {
View Full Code Here

TOP

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

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.