cancel
Showing results for 
Search instead for 
Did you mean: 

May I store a processEngine instance reference in a database ?

cnirparis
Champ in-the-making
Champ in-the-making
Hello everyone.

For using Activiti you must create a processEngine, for example


ProcessEngine pe = ProcessEngineConfiguration
   .createProcessEngineConfigurationFromResourceDefault()
   .buildProcessEngine();


The documentation advice is to avoid to parse more than once the BPMN Xml because it's costly. They say to store ini a static field of external JNDI.
So is it possible to store the processEngine instance reference (here
pe
) in a database (as a blob probably), and getting it again in a complete different execution context ?
Before doing it myself I'd like to know if this is pertinent.

Thank you very much for any answer.
4 REPLIES 4

samson
Champ in-the-making
Champ in-the-making
That sounds very strange.
To read/write it from the database and to serialize/deserialize it, takes much longer then to parse a xml File.

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

Could you provide use case for it please?

Regards
Martin

What do you mean ? The matter is to know if it's better (in terms of executing time) to re-parse the BPMN XML file every time you need it, or it's better to store the processEngine instance somewhere else. The documentation seems to say that.
Thank you for your answer.

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

How often do you start process engine?

store engine in the DB - after the fetch you have to reestablish all DB connections, beans…. , I think that's the time consuming part of process engine initialization.

Regards
Martin