Which is the best way to handle version for long running workflows?

Hi Team,

I have a long running subscription lifecycle workflow. Can you please suggest best practices to accommodate any feature additions to it?

Using workflow versions can solve for workflows which are submitted new, how can we patch new code additions to older running workflows? Please advise.

1 Like

Use Workflow.getVersion (Java) or workflow.GetVersion (Go) APIs to version workflow code. See their documentation for specifics. Let us know if the documentation is not clear.

Thanks Maxim, I am only seeing a getter method for it, is it possible to set the workflow version?

The getter sets the version to the value of maxSupported parameter. Please read the documentation it explains the semantic of the API.

1 Like