12-21-2012 07:36 AM
task.setDueDate(..)
ProcessEngines.getDefaultProcessEngine().getTaskService().save(task)
With Activiti 5.11 we have the following exception on the line 2 :Caused by: org.activiti.engine.ActivitiOptimisticLockingException: TaskEntity[109811] was updated by another transaction concurrently
12-21-2012 08:47 AM
Task task = taskService.createTaskQuery()….singleResult();
task.setPriority(1);
taskService.saveTask(task);
task.setDueDate(..)
ProcessEngines.getDefaultProcessEngine().getTaskService().save(task)
12-21-2012 09:22 AM
12-21-2012 12:44 PM
12-21-2012 12:51 PM
12-23-2012 10:06 AM
12-26-2012 03:54 AM
12-26-2012 04:27 AM
public void testRevisionUpdatedOnSaveWhenFetchedUsingQuery() {
Task task = taskService.newTask();
taskService.saveTask(task);
assertEquals(1, ((TaskEntity) task).getRevision());
task.setAssignee("kermit");
taskService.saveTask(task);
assertEquals(2, ((TaskEntity) task).getRevision());
// Now fetch the task through the query api
task = taskService.createTaskQuery().singleResult();
assertEquals(2, ((TaskEntity) task).getRevision());
task.setPriority(1);
taskService.saveTask(task);
assertEquals(3, ((TaskEntity) task).getRevision());
taskService.deleteTask(task.getId(), true);
}
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.