As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
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);
taskService.complete(taskId);
<br>public HistoricTaskInstanceEntity(TaskEntity task, ExecutionEntity execution) {<br> this.id = task.getId();<br> if (execution!=null) {<br> this.processDefinitionId = execution.getProcessDefinitionId();<br> this.processInstanceId = execution.getProcessInstanceId();<br> this.executionId = execution.getId();<br> }<br> this.name = task.getName();<br> this.parentTaskId = task.getParentTaskId();<br> this.description = task.getDescription();<br> this.owner = task.getOwner();<br> this.assignee = task.getAssignee();<br> this.startTime = ClockUtil.getCurrentTime();<br> this.taskDefinitionKey = task.getTaskDefinitionKey();<br> this.setPriority(task.getPriority());<br> }<br>
<br> public void setDueDate(Date dueDate) {<br> this.dueDate = dueDate;<br> <br> CommandContext commandContext = Context.getCommandContext();<br> if (commandContext!=null) {<br> commandContext<br> .getHistoryManager()<br> .recordTaskDueDateChange(id, dueDate);<br> }<br> }<br><br>
See https://github.com/Activiti/Activiti/commit/7f5ca8f2d36f89b72e46f26eab681107216753f9 for the fix