cancel
Showing results for 
Search instead for 
Did you mean: 

How to change a FormVariable type of a process in execution?

losky
Champ in-the-making
Champ in-the-making
So, i've implemented activiti for a company and some process of this company
One process is very long lived one (4 months)

At the very last moment we found that a FormVariable that writes a ProcessVariable has the wrong type
The variable shoud be a double but in the process is a long

How can i change the process definition affecting the already executing processes ?
Is it possible to modify an executing process ?

Thanks in advance
Losky
2 REPLIES 2

trademak
Star Contributor
Star Contributor
Hi,

Well, that's an interesting one. I'll try and setup a unit test for this to answer your question in a better way.
Right now I would think that updating the processDefinitionId on the running instances is enough. In addition, the history of the process instances should probably be update too if you want to keep that.
But that could be a simple update statement on the database. I'll come back to this after implementing the unit test.

Best regards,

trademak
Star Contributor
Star Contributor
Hi,

There's a SetProcessDefinitionVersionCmd class in the Activiti Engine code.
This command can do exactly what you are looking for.
The SetProcessDefinitionVersionCmd is however not exposed in one of the Activiti interfaces, so would need to do some coding there.
For the next version of Activiti we can see if we can also expose this functionality directly.

Best regards,