createdTasks = transitionTaskFromStack(currentTask);
createdTasks = transitionTaskFromStack(currentTask, currentProcess);
	public void transitionTask(ITaskInstance taskInstance)			throws TransitionException {		Stack taskStack = new Stack();		taskStack.push(taskInstance);		IProcessInstance currentProcess = taskInstance.getProcessInstance();		while (!taskStack.empty()) {			// get the task from the Stack			ITaskInstance currentTask = (ITaskInstance) taskStack.pop();			Map createdTasks;			try {				createdTasks = transitionTaskFromStack(currentTask);			} catch (Exception e) {				String emsg = "Problem encountered transitioning task from Stack";				log.error(emsg, e);				throw new TransitionException(e);			}			for (Iterator it = createdTasks.values().iterator(); it.hasNext();) {				ITaskInstance newTask = (ITaskInstance) it.next();				ITaskDefinition td;				try {					td = newTask.getTaskDefinition();				} catch (DefinitionNotFoundException e) {					String emsg = "Failed to access the Task Definition";					log.error(emsg, e);					throw new TransitionException(emsg, e);				}				if (td.isAuto()) {					/*					 * is an Auto task, so add to the stack for processing check					 * to see if task is present in stack before adding it					 */					if (!taskStack.contains(newTask)) {						if (log.isInfoEnabled()) {							log.info("Added task to TaskStack - "									+ newTask);						}						taskStack.push(newTask);					} else {						if (log.isInfoEnabled()) {							log									.info("transitionTask - task already exists in stack "											+ newTask);						}					}				}			}		}		if (currentProcess.getTaskInstances().size() == 0) {			// mark process complete			doProcessDestruct(currentProcess);		}	}