Case migration fails on PropertyNotFoundException

I have a case model that defines the following expression for manual activation:

${repetitionCounter>1}

This works fine without any issues. However, I recently had to update the case model to include more tasks (and stages), and when initiating migration of the existing case instances through use of the MigrationService, it throws an exception:

Caused by: org.flowable.common.engine.impl.javax.el.PropertyNotFoundException: Cannot resolve identifier ‘repetitionCounter’

The tasks in the model don’t have anything that overrides the repetition variable:

Any help would be greatly appreciated.

The exception means that the ‘repetitionCounter’ variable doesn’t exist at that moment. One option is to use one of the safe functions to get a variable: The Flowable API · Flowable Open Source Documentation (these work in CMMN to).

Are you able to share your CMMN XML and the migration steps you’re trying to do?