How to Deploy Flows from v44

What's New 

From Salesforce's API version v44.0 (Winter '19 Release), flows are handled in a slightly different way by the Metadata API. These are the main points to consider when moving flows with Copado:
  1. Flows no longer include the version number. You will not see any version when selecting the flow in the metadata grid. Only the flow name will be displayed. When the flow name is selected in the grid, the latest version (active or inactive) will be retrieved, committed and deployed.
  2. As part of the above mentioned upgrade, Flow Definitions are no longer necessary when deploying. If the latest version of the Flow selected in the grid is inactive, the Flow Definition file will not contain any version number and the deployment will fail. If the latest version of the flow doesn't exist in the target org, you will get the error below when deploying:
"[FlowDefinition XXXX] Invalid version number: X"
Do not select the Flow Definition when committing and deploying flows with Copado.

There is a new 'status' tag in the Flow.xml file that specifies the activation status of the flow. Valid values are:
  • Active.
  • Draft - In the UI, this status appears as Inactive.
  • Obsolete - In the UI, this status appears as Inactive. 
  • InvalidDraft - In the UI, this status appears as Draft. 
The flow will be deployed as active or inactive depending on the value of that tag in the xml file of the flow. 

Considerations When Deploying to Production

In your production org, you can enable the option to deploy processes and flows as active. This option applies to processes and autolaunched flows that are deployed to production orgs via change sets and Metadata API. 

Before enabling this option and deploying a process or autolaunched flow as active, please bear in mind that your production org must meet flow test coverage requirements. 75% of the active processes and autolaunched flows in your org must be covered by at least one Apex test. The required percentage is the same as the code coverage requirement for Apex code. Also keep in mind that flow test coverage requirements don't apply to flows that have screens. For more information about flow test coverage, please refer to Salesforce's documentation

Enabling Deployment Processes and Flows as Active

  1. From the Setup, enter Automation in the Quick Find box.
  2. Select Process Automation Settings
  3. Scroll down to the bottom of the page and enable the Deploy processes and flows as active checkbox. 

Please note that you can deploy any pending deployments or user stories that contain flow after the upgrade to API version 44 without having to perform any further actions from your side.

How did we do?