Upgrades for CMMN existing cases

Hi

I just have a couple of questions in relation to CMMN upgrades. The doc states that there is versioning and that it does not upgrade existing cases.

Is that just simply not possible? So if we were to tweak a flow (say because of a bug), does that mean that all existing flows are buggy and cannot be recovered?

Similarly, if we add a new feature, does that mean that we cannot see that new feature in existing cases? Some of our cases can be months long and so I’m just concerned that we will have multiple versions of the case to manage.

Also, presumably for deprecation, we need to keep around any old code for old versions of the case definition, but my understanding is that we can remove actual case definition from the code base and it is essentially translated once deployed.

Cheers
Chris

Correct, that’s currently not possible. However, it’s something we’d like to do in the future.
In theory, you could create your own command and change the caseDefinitionId (similar to the SetProcessDefinitionCmd).

Once deployed, the case definition is stored in the database. You can remove it from the codebase.

Hi @joram

Thanks for your response to my original question. I’ve been following some of the release notes and I can see some kind of simple migration is supported for BPM. I can’t see the same for CMMN at the moment… Is that fair?

In terms of your original suggestion - changing the caseDefinitionId - if I did that would it just simply work - for example, if my case has 10 items in v1 and 20 items in v2, does the instance I’m changing for inherit the new 10 items automatically?

Cheers
Chris

We’re actually working on case instance migration, basic simple use cases are implemented and working. Have a look at flowable-engine/modules/flowable-cmmn-engine/src/test/java/org/flowable/cmmn/test/dynamic at main · flowable/flowable-engine · GitHub to get some ideas what’s possible and how the API looks like.

No, the instances of items are typically created when a stage gets active. if you’re past that point, those 10 items won’t be created. But that’s exactly the kind of migration we indeed want to add to the API linked above.