Dear all, i am rather new to Mendix so i would like to crosscheck that my solution to a specific problem i have is indeed a good solution and does not bring more issues than benefits. I have an application that i use for managing some processes - roughly i would call it a "state machine" - where processes are started, and depending on their state (or stage) different actions can/must be taken but different users (like ordering stuff in amazon, which starts a process partially automated and partially manual, till the order is delivered and archived). This application has been implemented using Mendix Workflows. Now i want to release a new version of the app, with changes to the workflows (ordering of some steps has changed), but i would like to avoid compromising currently running jobs. From the workflow documentation i read that "new versions of the app may be deployed containing changes to the running workflow and affecting running workflow instances". If i want to avoid impacting already running workflows with the new version, and only new flows being started with the updated version, my idea would be to clone my WF_Script into a WF_Script_v2 (and implent my changes in the latter), such that both are deployed and new jobs will be started with the v2; then when all jobs running on the legacy version will be completed (in a few months time), i will remove the old one. Does this make sense? Is it a good practice?
asked
Matteo Renesto
1 answers
1
Hi Matteo Renesto,
If your changes include reordering or removing steps in the middle of the workflow, creating a copy like WF_Script_v2 is a safe and practical choice. This is a common approach in real projects to make sure running workflows don’t break.
Just remember having two workflows means extra work later. So, make sure to:
Write down what changed (documentation),
Test both versions properly, and
Plan when you’ll remove the old one.
But if your updates don’t break the old flow, it’s better to keep a single workflow and use simple conditions or branches instead. That’s cleaner and easier to maintain in the long run.