AnsweredAssumed Answered

Separate business data and process relative data

Question asked by beep02 on Mar 19, 2014
Latest reply on Mar 24, 2014 by jbarrez
I tried to understand how activiti works with data.
I searched and read several forum posts, so I came prepared to ask question.
What I currently understand is following:

Activity hides persistence layer and works with Variables, which , if defined as JPA entities, could be automatically fetched from entity manager and updated in entity manager.
-are they remain in database, when instance of the process completed it's work?
-can we also add (insert) and remove (delete) entities?

If I want add to the variables approach, e.g. I write a Java Service Task, that access the entity manager
- can I use the same transaction, that the engine manages? 
- can I create a separate transaction, that is not the part of the Engine transaction?

Can I use Hibernate as JPA implementation?

I need an approach to allow Activiti work as much natural for Activiti as possible.
At the same time I need work with complex data model, that has not had Activity in mind.
During the activity task, I must change/evaluate objects in DB, such objects, that not easily integrated in JPA model or in activiti model.

What would you do, if you were required to work with business data beyond the scope of variables?
Especially, if your data model is not initially built with Activiti in mind.