AnsweredAssumed Answered

How to use the same Persistence Context of activiti ?

Question asked by campa on Jul 5, 2011
Latest reply on Jul 5, 2011 by ronald.van.kuijk
Hi guys, I'd like to do some transactional JPA operations before, and also after, the starting, or the move on,  of activiti process instance.
Using the code below seems that the EntityManager injected by Spring is not the same instance/thread used by activti in the startProcessInstanceByKey execution.
I'm using activiti manual configuration for spring.

How can we have injected the same EntityManager used by activiti in his operations ?

private RuntimeService runtimeService;
private EntityManager em;

public void invioAlLegale() {
      runtimeService.startProcessInstanceByKey(key, …);

Thanks in advance