State management for Flows

AttributeTypeDescriptionPackage Types Applicable

enableFlowActivation

boolean

Enable Flows automatically in Production

  • source

  • diff

  • unlocked

While installing a source/diff package, flows by default are deployed as 'Inactive' in the production org. One can deploy flow as 'Active' using the steps mentioned here, however, this requires the flow to meet test coverage requirement.

Also making a flow inactive, is convoluted, find the detailed article provided by Gearset

sfp has automation built in that attempts to align the status of a particular flow version as kept inside the package. It automatically activates the latest version of a Flow in the target org (assuming the package has the latest version). If an earlier version of package is deployed, it skips the activation.

At the same time, if the package contains a Flow with status Obsolete/InvalidDraft/Draft, all the versions of the flow would be rendered inactive.

This feature is enabled by default, if you would like to disable the feature, set enableFlowActivation to false on your package descriptor

// Demonstrating package by disabling flow activation
{
  "packageDirectories": [
      {    
      "path": "src/order-management",
      "package": "order-management",
      "versionNumber": "2.0.10.NEXT",
      "enableFlowActivation" : false
    }

Last updated