Package org.jbpm.taskmgmt.def

Examples of org.jbpm.taskmgmt.def.TaskMgmtDefinition


    }
  }

  // verify swimlane assignments in second pass ///////////////////////////////
  public void verifySwimlaneAssignments() {
    TaskMgmtDefinition taskMgmtDefinition = processDefinition.getTaskMgmtDefinition();
    if ( (taskMgmtDefinition!=null)
         && (taskMgmtDefinition.getSwimlanes()!=null)
       ) {
      Iterator iter = taskMgmtDefinition.getSwimlanes().values().iterator();
      while (iter.hasNext()) {
        Swimlane swimlane = (Swimlane) iter.next();
       
        Task startTask = taskMgmtDefinition.getStartTask();
        Swimlane startTaskSwimlane = (startTask!=null ? startTask.getSwimlane() : null);
       
        if ( (swimlane.getAssignmentDelegation()==null)
             && (swimlane!=startTaskSwimlane)
           ) {
View Full Code Here


    initialNodeName = root.attributeValue("initial");
  }
 
  protected void readSwimlanes(Element processDefinitionElement) {
    Iterator iter = processDefinitionElement.elementIterator("swimlane");
    TaskMgmtDefinition taskMgmtDefinition = processDefinition.getTaskMgmtDefinition();
    while (iter.hasNext()) {
      Element swimlaneElement = (Element) iter.next();
      String swimlaneName = swimlaneElement.attributeValue("name");
      if (swimlaneName==null) {
        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);
          }
        } else {
          Task startTask = taskMgmtDefinition.getStartTask();
          if ( (startTask==null)
               || (startTask.getSwimlane()!=swimlane)
             ) {
            addWarning("swimlane '"+swimlaneName+"' does not have an assignment");
          }
        }
        taskMgmtDefinition.addSwimlane(swimlane);
      }
    }
  }
View Full Code Here

    }
  }

  public void readTasks(Element element, TaskNode taskNode) {
    List elements = element.elements("task");
    TaskMgmtDefinition tmd = (TaskMgmtDefinition) processDefinition.getDefinition(TaskMgmtDefinition.class);
    if (elements.size()>0) {
      if (tmd==null) {
        tmd = new TaskMgmtDefinition();
      }
      processDefinition.addDefinition(tmd);
     
      Iterator iter = elements.iterator();
      while (iter.hasNext()) {
View Full Code Here

    }
    return variableAccesses;
  }

  public void readStartStateTask(Element startTaskElement, StartState startState) {
    TaskMgmtDefinition taskMgmtDefinition = processDefinition.getTaskMgmtDefinition();
    Task startTask = readTask(startTaskElement, taskMgmtDefinition, null);
    startTask.setStartState(startState);
    if (startTask.getName()==null) {
      startTask.setName(startState.getName());
    }
    taskMgmtDefinition.setStartTask(startTask);
  }
View Full Code Here

    }
  }

  // verify swimlane assignments in second pass ///////////////////////////////
  public void verifySwimlaneAssignments() {
    TaskMgmtDefinition taskMgmtDefinition = processDefinition.getTaskMgmtDefinition();
    if ( (taskMgmtDefinition!=null)
         && (taskMgmtDefinition.getSwimlanes()!=null)
       ) {
      Iterator iter = taskMgmtDefinition.getSwimlanes().values().iterator();
      while (iter.hasNext()) {
        Swimlane swimlane = (Swimlane) iter.next();
       
        Task startTask = taskMgmtDefinition.getStartTask();
        Swimlane startTaskSwimlane = (startTask!=null ? startTask.getSwimlane() : null);
       
        if ( (swimlane.getAssignmentDelegation()==null)
             && (swimlane!=startTaskSwimlane)
           ) {
View Full Code Here

TOP

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

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.