Automate Instance Migrations

What techniques are people using to manage the execution of instance migrations?

My solution is already setup to leverage Flowable’s automatic deployment of model definitions at server startup. But, I’d also like to automatically migrate any live case instances to the latest model definitions. I am aware of the CMMN migration service and the REST endpoints for executing migrations but I haven’t found a Flowable provided mechanism to manage migrations and automate their execution at startup.

I have been exploring building my own solution to automate migrations, perhaps leveraging a Spring event listener (e.g. @EventListener(ApplicationReadyEvent::class)) but would prefer not to reinvent the wheel if the capability already exists.

1 Like

Let’s say you have timer start event (triggered 1 min after the deployment). The process can fetch all case/process instances to migrate and migrate instances accordingly.

Regards
Martin

As for what you said above, could you please post the location of the code? I would like to know the relevant process.
looking forward to your reply

@martin.grofcik, thanks for the suggestion. I ended up leveraging a Spring event listener (e.g. @EventListener(ApplicationReadyEvent::class) ) as the trigger to kick-off the migrations. Seems to be working well so far.