public List<Task> createNewTask(String taskId, int taskType, String... actors) {
		Task task = access().getTask(taskId);
		AssertHelper.notNull(task, "指定的任务[id=" + taskId + "]不存在");
		List<Task> tasks = new ArrayList<Task>();
		try {
			Task newTask = (Task)task.clone();
			newTask.setTaskType(taskType);
			newTask.setCreateTime(DateHelper.getTime());
			newTask.setParentTaskId(taskId);
			tasks.add(saveTask(newTask, actors));
		} catch (CloneNotSupportedException e) {
			throw new SnakerException("任务对象不支持复制", e.getCause());
		}
		return tasks;
	}
public List<Task> createNewTask(String taskId, int taskType, String... actors) {
		Task task = access().getTask(taskId);
		AssertHelper.notNull(task, "指定的任务[id=" + taskId + "]不存在");
		List<Task> tasks = new ArrayList<Task>();
		try {
			Task newTask = (Task)task.clone();
			newTask.setTaskType(taskType);
			newTask.setCreateTime(DateHelper.getTime());
			newTask.setParentTaskId(taskId);
			tasks.add(saveTask(newTask, actors));
		} catch (CloneNotSupportedException e) {
			throw new SnakerException("任务对象不支持复制", e.getCause());
		}
		return tasks;
	}
public List < Task > createNewTask ( String taskId , int taskType , String ... actors ) { Task task = access ( ) . getTask ( taskId ) ; AssertHelper . notNull ( task , "指定的任务[id=" + taskId  ]不存在") List < Task > tasks = new ArrayList < Task > ( ) ; try { Task newTask = ( Task ) task . clone ( ) ; newTask . setTaskType ( taskType ) ; newTask . setCreateTime ( DateHelper . getTime ( ) ) ; newTask . setParentTaskId ( taskId ) ; tasks . add ( saveTask ( newTask , actors ) ) ; } catch ( CloneNotSupportedException e ) { throw new SnakerException ( "任务对象不支持复制", e.getCause()); } return tasks ; }
根据已有任务、任务类型、参与者创建新的任务
适用于转派，动态协办处理
根据已有任务、任务类型、参与者创建新的任务 适用于转派，动态协办处理