Hi ,
I have following issue . From time to time i get error engine message when i try get task identity links.
My scenario is :
I have following process :
In parallel multi instance sub process i create user task to provide missing email address . On create user task event in camunda module i use bpm.engine.delegate.TaskListener and send information to external java application about new task . Java Application call camunda api to get task ( always successfully) ,then i want to get information about groups and i call camunda appi to get identity links and sometimes i get error as in topic.
As i understand issue here is connected with transaction .Identity task links is keep in different table in camunda and when i asked about identity transation is not finished yet so i get error ’ Cannot find task with id X: task is null’. I dont understand why i can get information about task successfully but i can
t get identity links. its means that insert operation for this 2 tables are call in 2 different transaction in camunda .
I don`t know how to solve it but the best solution will be have a one transaction which insert task data to all task related tables and after this catch event and send to external application.
Other solution which i think is get groups from DelegateTask on task listener for create event and pass this to java app . Something like this :
public class MyTaskCreateListener implements TaskListener {
public void notify(DelegateTask delegateTask) {
delegateTask.getCandidates().toString());
}
}
but i`m not sure if this will solve issue - if DelegateTask passed in interface are a independent of database transaction and information about groups will be passed event if db transaction on identity links table is not committed yet?
Do You have any idea ?
Thanks