I have just started with activiti and not updated any library.
Mybatis version I have used : 3.3
The Sample code I am using is :
<java>
TaskService taskService = processEngine.getTaskService();
ManagementService managementService = processEngine.getManagementService();
IdentityService identityService = processEngine.getIdentityService();
HistoryService historyService = processEngine.getHistoryService();
FormService formService = processEngine.getFormService();
System.out.println(identityService);
System.out.println("Number of process definitions : " + repositoryService.createProcessDefinitionQuery().count());
System.out.println("Number of tasks : " + taskService.createTaskQuery().count());
// runtimeService.startProcessInstanceByKey("holidayVacationRequest");
System.out.println("Number of tasks after process start: " + taskService.createTaskQuery().count());
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("employeeName", "Kermit");
variables.put("numberOfDays", new Integer(4));
variables.put("vacationMotivation", "I'm really tired!");
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("holidayVacationRequest", variables);
List<Task> tasks = taskService.createTaskQuery().orderByExecutionId().desc().list();
for (Task task : tasks) {
System.out.println(task);
}
</java>
Output I am getting as :
org.activiti.engine.impl.IdentityServiceImpl@3542162a
Number of process definitions : 11
Number of tasks : 90
Number of tasks after process start: 90
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by RES.EXECUTION_ID_ desc
LIMIT 2147483647 OFFSET 0' at line 15
### The error may exist in org/activiti/db/mapping/entity/Task.xml
### The error may involve org.activiti.engine.impl.persistence.entity.TaskEntity.selectTaskByQueryCriteria-Inline
### The error occurred while setting parameters