/** * @return the name of the replacement task, if one is given in the task name mapping, or the * old task name */ private String getReplacementTaskName(Task oldTask) { String oldName = oldTask.getName(); if (taskNameMapping != null && taskNameMapping.containsKey(oldName)) { return (String) taskNameMapping.get(oldName); } // return new node name = old node name as default return oldName; }
/** * @return the name of the replacement task, if one is given in the task name mapping, or the * old task name */ private String getReplacementTaskName(Task oldTask) { String oldName = oldTask.getName(); if (taskNameMapping != null && taskNameMapping.containsKey(oldName)) { return (String) taskNameMapping.get(oldName); } // return new node name = old node name as default return oldName; }
/** * is a Map with the tasks, keyed by task-name or an empty map in case no tasks are present in * this task-node. */ public Map getTasksMap() { Map tasksMap = new HashMap(); if (tasks != null) { for (Iterator iter = tasks.iterator(); iter.hasNext();) { Task task = (Task) iter.next(); tasksMap.put(task.getName(), task); } } return tasksMap; }
/** * is a Map with the tasks, keyed by task-name or an empty map in case no tasks are present in * this task-node. */ public Map getTasksMap() { Map tasksMap = new HashMap(); if (tasks != null) { for (Iterator iter = tasks.iterator(); iter.hasNext();) { Task task = (Task) iter.next(); tasksMap.put(task.getName(), task); } } return tasksMap; }
public void addTask( Task task ) { if (tasks==null) tasks = new HashMap(); task.setTaskMgmtDefinition(this); tasks.put(task.getName(), task); }
public void addTask( Task task ) { if (tasks==null) tasks = new HashMap(); task.setTaskMgmtDefinition(this); tasks.put(task.getName(), task); }
public void setTask(Task task) { this.name = task.getName(); this.description = task.getDescription(); this.task = task; this.isBlocking = task.isBlocking(); this.priority = task.getPriority(); this.isSignalling = task.isSignalling(); }
public void setTask(Task task) { this.name = task.getName(); this.description = task.getDescription(); this.task = task; this.isBlocking = task.isBlocking(); this.priority = task.getPriority(); this.isSignalling = task.isSignalling(); }
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 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); }
protected void readTaskTimer(Element timerElement, Task task) { String name = timerElement.attributeValue("name", task.getName()); if (name == null) name = generateTimerName();
protected void readTaskTimer(Element timerElement, Task task) { String name = timerElement.attributeValue("name", task.getName()); if (name == null) name = generateTimerName();
/** * Start the current task, using the current actor id * * @see Actor */ public void startTask() { String actorId = Actor.instance().getId(); TaskInstance task = org.jboss.seam.bpm.TaskInstance.instance(); if ( actorId != null ) { task.start(actorId); } else { task.start(); } Events.instance().raiseEvent("org.jboss.seam.startTask." + task.getTask().getName()); }
Events.instance().raiseEvent("org.jboss.seam.endTask." + task.getTask().getName()); ProcessInstance process = org.jboss.seam.bpm.ProcessInstance.instance(); if ( process.hasEnded() )
Action action = new Action(delegation); action.setProcessDefinition(processDefinition); action.setName(task.getName());
Action action = new Action(delegation); action.setProcessDefinition(processDefinition); action.setName(task.getName());
/** * Associate the task instance with the given id with the current * conversation. * * @param taskId the jBPM task instance id * @return true if the task was found and was not ended */ public boolean resumeTask(Long taskId) { setTaskId(taskId); TaskInstance task = org.jboss.seam.bpm.TaskInstance.instance(); if (task==null) { taskNotFound(taskId); return false; } else if ( task.hasEnded() ) { taskEnded(taskId); return false; } else { setProcessId( task.getTaskMgmtInstance().getProcessInstance().getId() ); Events.instance().raiseEvent("org.jboss.seam.initTask." + task.getTask().getName()); return true; } }