Hello Maïté, unfortunately I didn't manage to resolve this error in a direct way.
Instead, I choosed to not use asynchronous work item completion : I now rely on external message to trigger the next step in the workflow.
My workitem launch the task in another thread, then complete itself, as the standard synchronous way.
The next step in the workflow is an "AND" gateway, waiting for an external message to be sent.
The other thread, when completed, launch the proper message.
And so the workflow goes on.
That's how I manage to use asynchronous task.
Thanks for the quick reply. I see what you've done, good idea, I haven't thought about doing it this way. We'll give it a try. It's not as neat as having the asynchronous thread finishing the original workitem but there may be no way round it.
I did think about creating my own persistence layer but that would be quite a lot of work so your workaround is a better solution.
How do you send a message to an event in order to trigger it.
You can use the signalEvent method on the StatefulKnowledgeSession object, or directly on the ProcessInstance.
I found the relevant information here :
Estaben mentioned :
invoque fireAllRules() this invocation is only useful if your process instances reached a Rule Node.
How do we invoke fireAllRules() in JPA environment when ruletask is reached? Has Anybody tried that?
I have tried invoking fireAllRules in AgendaListener and adding that to a session received from JPAKnowledgeService. But this is not allowed as session created is not a knowledge session but a command session.