01-28-2013 09:49 AM
Task task = taskService.newTask();
task.setName(taskEntity.getName());
task.setDescription(taskEntity.getDescription());
task.setPriority(taskEntity.getPriority());
task.setDueDate(taskEntity.getDueDate());
task.setOwner(taskEntity.getOwner());
task.setAssignee(taskEntity.getAssignee());
taskService.saveTask(task);
2) complete the task
taskService.complete(taskId);
01-28-2013 10:01 AM
public HistoricTaskInstanceEntity(TaskEntity task, ExecutionEntity execution) {
this.id = task.getId();
if (execution!=null) {
this.processDefinitionId = execution.getProcessDefinitionId();
this.processInstanceId = execution.getProcessInstanceId();
this.executionId = execution.getId();
}
this.name = task.getName();
this.parentTaskId = task.getParentTaskId();
this.description = task.getDescription();
this.owner = task.getOwner();
this.assignee = task.getAssignee();
this.startTime = ClockUtil.getCurrentTime();
this.taskDefinitionKey = task.getTaskDefinitionKey();
this.setPriority(task.getPriority());
}
public void setDueDate(Date dueDate) {
this.dueDate = dueDate;
CommandContext commandContext = Context.getCommandContext();
if (commandContext!=null) {
commandContext
.getHistoryManager()
.recordTaskDueDateChange(id, dueDate);
}
}
01-28-2013 10:07 AM
01-28-2013 10:17 AM
See https://github.com/Activiti/Activiti/commit/7f5ca8f2d36f89b72e46f26eab681107216753f9 for the fix
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.