We are experiencing a similar issue to the following forum post except our issue is related to identity links.
http://forum.flowable.org/t/transaction-management-and-propagation-modes-in-flowable/310
In our case, we are seeing a NPE in the GetIdentityLinksForTaskCmd due to the task not being found as a result of the it being completed by another thread between the call to retrieve the tasks and the call to retrieve the identity links for each task. The identity links in our case are retrieved to build the HATEOS links for our REST response.
Has any consideration been given to the idea of retrieving tasks with their identity links in single call to the database via the TaskQuery class similar to what is done for variables?
Code Snippet:
TaskQuery taskQuery = taskService.createTaskQuery().processInstanceId(processId);
List taskList = taskQuery.list();
// Retrieve identity links since they are needed to build HATEOS links.
for (Task t : taskList) {
List identityLinks = managementService.executeCommand(new GetIdentityLinksForTaskCmd(taskId));
}
…