Will the 1000 instances be in memory for 7 days (or until they receive the message)
[or will they be swapped to make space for other instances?
They are just in the database
thanks for previous reply!
One more question, so I can continue my work.
Is the database memorization an automatic thing?
Thanks a lot. Bye
what is 'database memorization'?
Are the process instances saved in the database automatically when they reach a wait state that takes a lot to be completed (without using CPU)?
Are the process instances saved in the database automatically when they reach a wait state
hat takes a lot to be completed (without using CPU)???? what do you mean here?
The situation is the syncronization on a shared object.
Suppose in the wait state we have a code such
(or a similar method call that may block this process instance).
Will the process instance be saved automatically and free the memory it holded?
don't do wait() in nodes/states/actions unless they are async... If it is in a wait it is 'working' and not persisted
now it's all perfect.
The solution is
persisting the instance
wait for the asynch call to complete
restore the instance and give it the call result
and the nice thing is... all three happen automatically in jBPM..
So If I write a library for receiving message and an asynchronus receive call takes one day to be completed, the process instance is automatically saved!
Will the instance be removed from runtime memory usage or not?
And will it free the memory of the process instance when it saves it and waits for the asynchronus call to be completed?
no, it will keep everything in memory as is very good practice. these days since memory is cheap. Besides that...if your jbpm engine handles more than 100 process instances per day (not specifically new ones), you have to restart your j2ee server each day. If you handle more than 1000 instances a day you have to reset your j2ee server each day and your hardware each week.
Can you please elaborate on why you'd have to restart the j2ee server each day if JBPM handles > than 100 process instances/day? Does JBPM have a problem scaling? It seems like 100 process instances isn't that many...
my situation is the following.
I've to execute a very large number of process instances but they're not started all in the same time.
This number can be even 1 million per day!
Some of this instances will live for a few minutes, since the answer they wait for arrives soon, while the others will wait days...
So can I free the useless memory usage of this kind of processes (since they're doing no work at all) or not?