public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Swimlane)) return false; Swimlane other = (Swimlane) o; if (id != 0 && id == other.getId()) return true; return name.equals(other.getName()) && taskMgmtDefinition.equals(other.getTaskMgmtDefinition()); }
public void verifySwimlaneAssignments() { TaskMgmtDefinition taskMgmtDefinition = processDefinition.getTaskMgmtDefinition(); Map swimlanes; if (taskMgmtDefinition != null && (swimlanes = taskMgmtDefinition.getSwimlanes()) != null) { Task startTask = taskMgmtDefinition.getStartTask(); Swimlane startTaskSwimlane = startTask != null ? startTask.getSwimlane() : null; for (Iterator iter = swimlanes.values().iterator(); iter.hasNext();) { Swimlane swimlane = (Swimlane) iter.next(); if (swimlane.getAssignmentDelegation() == null && swimlane != startTaskSwimlane) { addWarning("swimlane '" + swimlane.getName() + "' does not have an assignment"); } } } }
public SwimlaneInstance createSwimlaneInstance(String swimlaneName) { Swimlane swimlane = taskMgmtDefinition != null ? taskMgmtDefinition .getSwimlane(swimlaneName) : null; if (swimlane == null) { throw new JbpmException("swimlane does not exist: " + swimlaneName); } return createSwimlaneInstance(swimlane); }
Task startTask = taskMgmtDefinition.getStartTask(); if (startTask == null || startTask.getSwimlane() != swimlane) { addWarning("swimlane '" + swimlaneName + "' does not have an assignment"); taskMgmtDefinition.addSwimlane(swimlane);
if (name != null) { task.setName(name); taskMgmtDefinition.addTask(task); taskMgmtDefinition.addTask(task); Swimlane swimlane = taskMgmtDefinition.getSwimlane(swimlaneName); if (swimlane == null) { addWarning("task references unknown swimlane: " + taskElement.getPath());
public boolean isStartTaskInstance() { if (taskMgmtInstance != null) { TaskMgmtDefinition taskMgmtDefinition = taskMgmtInstance.getTaskMgmtDefinition(); if (taskMgmtDefinition != null) { return task != null && task.equals(taskMgmtInstance.getTaskMgmtDefinition().getStartTask()); } } return false; }
public int hashCode() { int result = 1154431951 + name.hashCode(); result = 1436943863 * result + taskMgmtDefinition.hashCode(); return result; }
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); }
Task startTask = taskMgmtDefinition.getStartTask(); if (startTask == null || startTask.getSwimlane() != swimlane) { addWarning("swimlane '" + swimlaneName + "' does not have an assignment"); taskMgmtDefinition.addSwimlane(swimlane);
if (name != null) { task.setName(name); taskMgmtDefinition.addTask(task); taskMgmtDefinition.addTask(task); Swimlane swimlane = taskMgmtDefinition.getSwimlane(swimlaneName); if (swimlane == null) { addWarning("task references unknown swimlane: " + taskElement.getPath());
public boolean isStartTaskInstance() { if (taskMgmtInstance != null) { TaskMgmtDefinition taskMgmtDefinition = taskMgmtInstance.getTaskMgmtDefinition(); if (taskMgmtDefinition != null) { return task != null && task.equals(taskMgmtInstance.getTaskMgmtDefinition().getStartTask()); } } return false; }
public int hashCode() { int result = 1154431951 + name.hashCode(); result = 1436943863 * result + taskMgmtDefinition.hashCode(); return result; }
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); }
public void verifySwimlaneAssignments() { TaskMgmtDefinition taskMgmtDefinition = processDefinition.getTaskMgmtDefinition(); Map swimlanes; if (taskMgmtDefinition != null && (swimlanes = taskMgmtDefinition.getSwimlanes()) != null) { Task startTask = taskMgmtDefinition.getStartTask(); Swimlane startTaskSwimlane = startTask != null ? startTask.getSwimlane() : null; for (Iterator iter = swimlanes.values().iterator(); iter.hasNext();) { Swimlane swimlane = (Swimlane) iter.next(); if (swimlane.getAssignmentDelegation() == null && swimlane != startTaskSwimlane) { addWarning("swimlane '" + swimlane.getName() + "' does not have an assignment"); } } } }
/** * creates a task instance on the rootToken, and assigns it to the currently authenticated * user. */ public TaskInstance createStartTaskInstance() { TaskInstance taskInstance = null; Task startTask = taskMgmtDefinition.getStartTask(); if (startTask != null) { Token rootToken = processInstance.getRootToken(); ExecutionContext executionContext = new ExecutionContext(rootToken); taskInstance = createTaskInstance(startTask, executionContext); taskInstance.setActorId(SecurityHelper.getAuthenticatedActorId()); } return taskInstance; }
public SwimlaneInstance createSwimlaneInstance(String swimlaneName) { Swimlane swimlane = taskMgmtDefinition != null ? taskMgmtDefinition .getSwimlane(swimlaneName) : null; if (swimlane == null) { throw new JbpmException("swimlane does not exist: " + swimlaneName); } return createSwimlaneInstance(swimlane); }
public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Swimlane)) return false; Swimlane other = (Swimlane) o; if (id != 0 && id == other.getId()) return true; return name.equals(other.getName()) && taskMgmtDefinition.equals(other.getTaskMgmtDefinition()); }
/** * creates a task instance on the rootToken, and assigns it to the currently authenticated * user. */ public TaskInstance createStartTaskInstance() { TaskInstance taskInstance = null; Task startTask = taskMgmtDefinition.getStartTask(); if (startTask != null) { Token rootToken = processInstance.getRootToken(); ExecutionContext executionContext = new ExecutionContext(rootToken); taskInstance = createTaskInstance(startTask, executionContext); taskInstance.setActorId(SecurityHelper.getAuthenticatedActorId()); } return taskInstance; }