cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti engine persist process and not AUTO resume process

kiloksky
Champ in-the-making
Champ in-the-making
Hi all,

   My process define like : process 1 -> process 2 -> process 3

   I would like to persist a process 1 in database while its going to process 2, i try to use timer event (wait-state) but i found that the connection will keep look up db table after 5 seconds or etc, how can i use wait-state to persist previous process and stop the activit engine AUTO resume the process, the reasons is i suppose there may be some accident that cause JVM shut down and the previous process which done is persist in db , i can manually look up DB to find out which process is not finish correctly. Is it possible ? Anyone can guide me on this ?  :?

Please and Thanks a lot.
kiloksky
6 REPLIES 6

webcyberrob
Champ in-the-making
Champ in-the-making
Hi kiloksky,

Due you mean your process is defined to launch subsequent processes or do you mean your process comprises three tasks? I shall assume the latter.

As far as activities not finishing correctly, as I understand the engine, activities progress under a transaction. Hence the engine would tend to look after itself in the event of a system crash. Thus you may find that what you are after is built into the engine.

I'd recommend reading the section on asynchronous continuations and transaction management in the user guide…

R

pavitra
Champ in-the-making
Champ in-the-making
Hi
I am novice to activiti, I wanted this sample to work  my activiti is like this Start–>Step1(Service task)–>Step2(Service task)–>Step3(Service task)–>end. This flow will persist only when there is no exception in any of the steps. I wanted to track these steps even when the exception occurs.I wanted this flow to persists because in this way I can maintain the flow with the exception.How can I achieve this please help me on this.I tried with the Receive task to put in the middle of my service tasks to persists each steps.But I have to signal every time to continue to the next step.

hari
Star Contributor
Star Contributor
Hi Pavitra,

Have you tried the task/execution listeners ? You can have a create task listener on each of the service tasks and write some logic to log some information into your tables.

pavitra
Champ in-the-making
Champ in-the-making
Hi,
I need to persist to activiti tables itslef. Can I able to persits in activiti tables ?

pavitra
Champ in-the-making
Champ in-the-making
Like if I get Exception in Step2(Service task) I want Step1(Service task) step to be persisted in activiti tables.

jbarrez
Star Contributor
Star Contributor
If step 1 and 2 are service tasks, make both of them async to persist them between the steps.