AnsweredAssumed Answered

JPA / Best Praticies

Question asked by edufrazao on Jul 13, 2016
Latest reply on Jul 18, 2016 by edufrazao
Hi folks.
I'm using Activiti 5.21.0.
I already use Spring and JPA 2.1 (with Eclipselink) to manage my system entities, and  org.activiti.spring.SpringProcessEngineConfiguration to configure the engine, with Transaction management.

Its working fine, and I want to place a best pratice question.
In some cases, I need to mix the logic to collect my entities to information related with Activiti Tasks.
For example:

I have to several notifications to display for a user. This notifications is stored in my database schema, with a relation with Activitiy by a task_id column. So I need to display for a user, only notifications for tasks that this user have acces. It can be assigned or with a identity link with a group. This information is stored in the activiti schema. For now I'm using JPQL Native Query support to join the information, but this have serious portability drawbacks.

For the regular stuff, I use the Activiti Services.

What do you recomend guys? Its a good pratice to map Activity entites into my JPA Persistence Unit for example?

Outcomes