cancel
Showing results for 
Search instead for 
Did you mean: 

JPA / Best Praticies

edufrazao
Champ on-the-rise
Champ on-the-rise
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?

2 REPLIES 2

trademak
Star Contributor
Star Contributor
It all depends a lot on the use cases of course. If you need an Activiti entity in your custom query, then I don't see an issue with it. But if it's only used to get hold of user or group info, I would advise to use a user or group cache instead.

Best regards,

edufrazao
Champ on-the-rise
Champ on-the-rise
In fact, sometimes I need to join with task, historic task, process and historic process info too, and the information in identity links too. This is the most commom scenarios. User and groups is in my schema. Do you map activiti entities in your setup?
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.