Compare Active Version of flows not the newest Flow
When comparing flows please compare the active version of flows, not the newest version. This would align with how change sets handle flow.
Example:
Version 2 and 3 exist in source. Version 2 is active and version 3 is draft. I want to deploy Version 2 that is active not the inactive flow.
-
With Flow Navigator, you can now choose which version of the Flow to deploy.
Learn more about Flow Navigator in this article: https://docs.gearset.com/en/articles/8989393-getting-started-with-flow-navigator
-
Justin Catterson commented
Gearset team,
Your comment is a bit misleading; this is possible if the feature within Gearset is developed, it does not require a change from Salesforce. Retrieving the correct version is entirely plausible via the Metadata API; you just need to know the proper version. I would like this to be a setting.
The Metatadata documentation states under fullName how to pull a specific version.
The tooling api can help identify the active version to pull. Here is a tooling api query which identifies the correct versionsfdx force:data:soql:query -t -q "Select Id,DeveloperName,LatestVersion.VersionNumber,ActiveVersion.VersionNumber from FlowDefinition where Developername in (...)"
Then, retrieve the specific version
https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_visual_workflow.htm
-
If you are using v43 of the Salesforce metadata API to compare and deploy, this should be possible. If you are using v44+, the new Salesforce specification of the latest APIs removed support for that, so to achieve what is being asked here requires Salesforce's API to change before Gearset would be able to support this.
Is using v43 in the metadata filter an option for you? -
Matt Smelser commented
When comparing flows please compare the active version of flows, not the newest version. This would align with how change sets handle flow.
Example:
Version 2 and 3 exist in source. Version 2 is active and version 3 is draft. I want to deploy Version 2 that is active not the inactive flow.