Trying to update a workflow implementation while some instances are running
will trigger a
This is because Zenaton has currently no way to know how to use an updated implementation
to continue execution of already running workflow instances.
Zenaton lets you easily update a workflow as described below, but keep in mind your modifications will apply only to new instances.
Let's assume you currently have a
As you will have different versions running, you MUST version your sources.
This is how to do it:
MyWorkflowclass inheriting from the provided
from zenaton.workflows.version import Version from .version_workflow_v0 import VersionWorkflowV0 from .version_workflow_v1 import VersionWorkflowV1 class MyWorkflow(Version): def versions(self): return [ VersionWorkflowV0, VersionWorkflowV1 ]
That's all you need!
After that, if you write another version
you just have to add it to your sources and add it to
You do NOT have to change the implementation of your client that will still use
(eg. to launch a workflow, you will still use
_vconvention is only a suggestion. You can decide on a different naming convention.