cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti Model Versioning

johnson
Champ in-the-making
Champ in-the-making
Hi,

I am updating a model in the Activiti Repository using the following method:

RepositoryService.saveModel(model);

Strangely the model version is not increasing, that is I always get '1' from model.getVersion(), after multiple updates. Is this behaviour normal?

Aside from this, does Acitivi support versioning for Models? That is, do I have access to the previous versions of a model?
2 REPLIES 2

johnson
Champ in-the-making
Champ in-the-making
Regarding my question, I am using Activiti 5.12.1.

Regards

trademak
Star Contributor
Star Contributor
Hi,

The model repository does support different versions, but you have to increase the version and save a new model yourself. It's not the default behaviour to increase the version when you save the model.

Yes, Activiti supports versioning on models. You can use the ModelQuery to get all versions of a specific model or get a specific (older) version.

Best regards,