cancel
Showing results for 
Search instead for 
Did you mean: 

Anyone know how to fit such request?

yuanqixun
Champ in-the-making
Champ in-the-making
Recently, I do some bpm's integration work based on activiti, but we have such request as bellow, I don't know if Activiti can fit it.

1. someone start a process of a very long steps processdefiniton;

2. when the process runed to some node, we found the process definition is wrong, so we should modify the process definition;

3. we can modify the original process definition file, and publish to Activiti engine and start new process will ok;

4. but how to modify the running process instance's definition?
—–
anyone consider the request based on Activiti?
7 REPLIES 7

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
4. but how to modify the running process instance's definition?
—–
anyone consider the request based on Activiti?

Modifying database records is the only option. If each activity can stay in the same node, you just have to adapt the reference to the process definition in the process instance. IF more things change, (e.g. a node disappears that had waiting tasks, all becomes a lot more difficult)

yuanqixun
Champ in-the-making
Champ in-the-making
Well,I think we can copy the instance's definition and modify the definition, then revision this model to engine, this version just affect the instance, do you think so?

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
If this definiton only has one instance, yes. Otherwise it would influence all instances that have been started with the same defiition

yuanqixun
Champ in-the-making
Champ in-the-making
sure, I think so, do you have such request? It should be included into the engine in my opinion.

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
if only this limited set would be supported (where all nodes that are present in e.g. v1 are also present in v2), there is no real advantage of adding this to the engine cause that can be done with a simple update of records in the db. When more functionality would be supported, it might be interesting. Care to create such a tool and contribute?

michele1
Champ in-the-making
Champ in-the-making
if only this limited set would be supported (where all nodes that are present in e.g. v1 are also present in v2), there is no real advantage of adding this to the engine cause that can be done with a simple update of records in the db. When more functionality would be supported, it might be interesting. Care to create such a tool and contribute?

So what are the exact steps to update a process definition for running processes?

1. deploy the updated process definition
2. stop the web services with the running activity engine
3. check in act_re_procdef the old id and the new id (in the column (id_)
4. update the column proc_def_id_ in the table act_ru_task  with the new process id
5. commit the changes on the database
6. restart the web services that use activiti

Am I missing some step? Especially if the missing step will cause subtle erratic behaviour of the engine.

If I olny change timers, add tasks and scripts and move trasnition in the process all is safe, isn't it?

trademak
Star Contributor
Star Contributor
Hi,

The steps you mention seem valid. However it's important to thoroughly test this.

Best regards,