FU

Thursday, April 29th, 2021 11:13 AM

Feature Flags and Workflows

With us, we find that the physical act of deploying a new version of a workflow takes minutes but the process around it sometimes takes a fair bit of time.

We’ve started using feature flags to turn on and off certain features of a workflow and release new versions of a workflow without having to deploy a new code set each time, and without the need to do so out of business hours. We do this with 2 workflow variables that take a 1 or 0 to flag a feature and a csv list of communities to turn the feature on or off for that area. Which is configured in the UI.

Do you use feature flags with your workflows and if so, are there any tips or tricks you’ve found helpful to get the most out of them?

1.2K Messages

3 years ago

That’s a very interesting idea!
No we don’t use feature flags, but I’ll steal that idea.

Question: why does it take time to deploy your workflows?
For now, we still have a light testing and review process, which means we have the flexibility to deploy and update workflows in production. Works well so far, but it’s interesting to configure features in this way.

1.2K Messages

Without getting too much into specifics, we’ve had to embed our workflow deployments into our DevOps pipelines the best we could given the constraints of Collibra (unfortunately the workflow manager and CLI were not fit for our purpose) so we have a fair bit of governance around new deployments.

This coupled with the added bonus of some of our workflows being enterprise wide ones across various divisions, makes it quite difficult to roll out a new feature to the entire business. Unfortunately, rolling out a completely new code set has a certain stigma attached to it.

A common service we get asked to provide when rolling out new capability is piloting with a small community first then rolling out to the wider mass and also the option to opt into a warranty period where the Division can rollback to a previous workflow version.

It’s a tricky one to balance across loads of Divisions but to avoid having multiple workflow definitions per Division/Use Case (which could easily be more than 10 workflows that do more or less the same thing) which would be a nightmare to manage and debug, feature flags was a lifesaver.

1.2K Messages

That’s very cool!
Have you read my post in the workflow manager? Workflow Manager for Eclipse - :bulb:Marketplace - The Data Citizens Community (collibra.com)
Maybe you would be interested to reuse the code. It’s quite simple actually, but makes code development, versioning and deployment so much easier.

1.2K Messages

3 years ago

Just gave it a read, now that’s seriously cool!

That would be great! It would be fantastic if you could share a some of what you’ve done.

Appreciate that you may not be able to share the code itself, but that’s cool, I’d love to have a view of some of the general steps you’ve followed.

I’ve only started posting regularly here recently but it’s great to see other citizens share a similar level of curiosity and innovation.

Have a good one!

1.2K Messages

3 years ago

I have used a version of feature flags before in workflows to do what you describe, which is usually ok if the the functionality isn’t too complex (otherwise you either have lots of decision gates checking these variables, or lots of scripts with hidden if statements, which can be hard for new developers to easily see).

One thing I try to do is to create “modular” workflows, which do a few simple things and having the specific logic in those, and then reuse those in other workflows and passing in the variable flags from the calling workflow.

As an example, I have a generic email workflow, which gives the user a form to select the stakeholders and determine the subject / message, however the options used to call it allow for a number of these things to be pre-filled by the calling workflow (e.g. the standard subject and message the user can fill in) and also allows the workflow to either be given a list by the calling workflow for the senders or allows the option for it to get the stakeholders directly from the Asset itself. Through doing this, instead of re-creating some version of a mail task with a form for users to select from, or copying and pasting XML across areas, one version of the code is managed and it can be called using the different “feature flag” options to provide a number of use cases.

Hope this helps.
Dan

1.2K Messages

That’s very reassuring to hear, thanks for sharing!

Modular workflows is an idea that is deeply rooted in a lot of what we’re doing too. Means we’re not deploying as much new code in production with every release.

Also found that a more modular approach has significantly reduced the lifetime of each workflow instance on our side meaning we rarely have to deal with the out of box timeout and escalation logic for workflows which is pretty poor in its current state.

Cheers mate!

Loading...