Skip to content

Remove ponos.Workflow and use Process instead

Refs https://redmine.teklia.com/issues/2830

This will be the last important part in the ponos migration inside the backend. We can now get rid of the ponos.Workflow class and all its associated recipe management.

The Workflow class must be deleted, so a migration should:

  • migrate all Task references towards Process
  • move the farm field on Process
  • move the finished datetime
  • and add the started datetime, which can also be nullable, but should default to Workflow.created for existing ones (refs https://gitlab.com/teklia/requests/-/issues/98)
  • trash the table and all its content

Regarding the methods on Workflow, a few things must be done too:

  • move the state property (and associated methods) up to Process
  • delete the build_tasks method, as we are getting rid of recipe
    • this means the Process.build_workflow method must directly create tasks instead of building a recipe.

This could be done in 2 MRs:

  1. remove the recipe and build & workflow + tasks directly from Process
  2. migration to get rid of Workflow
Edited by Bastien Abadie