ConvertToFlow App Migrates Process Builder Processes and Workflow Rules to Flow

This new version of the converter (the original is here) has been updated to convert more kinds of Process Builder workflows to Flows, leveraging features added to Flow in the last 2 releases. It also now converts Workflow Rules.

Important Notes

  1. ConvertToFlow creates a clone of your process and deploys it as a Record-Triggered Autolaunched Flow. This flow shows up in the Flow List like any other flow. ConvertToFlow does not modify or deactivate the process builder process or workflow rule that it’s cloning, so when you activate the new flow, keep in mind that if you don’t deactivate the original, you’ll have two identical processes firing on the same event. We did this for safety, but you really need to keep this in mind. If there’s demand, we can create an option to delete or auto-deactivate the original process so you never have two of them.
  2. The newly created flow has an api Name that has ‘converted_’ prepended to it, and it has the same label as the original process:

Looking at a Typical Conversion

Let’s take a look at what a conversion looks like. Here’s a simple PB process:

Here’s what the converted version looks like:

Let’s look at some of the improvements on the Process Builder side. Since the original version was released, Flow has added a bunch of matching features.

ConvertToFlow converts processes that have the “Only Specified Changes” checkbox checked:

The setting of the checkbox is represented in Flow Builder here:

ConvertToFlow converts processes that are using related record references

Here’s an example of a process that has a reference to a related record:

Here’s the converted version:

ConvertToFlow converts processes that use Scheduled Actions

If the process has no more than 1 scheduled action per decision ‘row’, ConvertToFlow can convert it. Here’s an example of a process with 2 scheduled paths:

Here’s what it looks like after conversion:

Converting Workflow Rules

This update to ConvertToFlow adds the ability to create Flows from Workflow Rules. Most WFR are supported, although Flow doesn’t support Outbound Messages yet and is not expected to support Recursion. Here’s a video showing some conversions:

Support for Process Builder Processes that Launch Flows

The latest update of Convert To Flow adds support for Process Builder processes that launch flows, converting them to Triggered Flows that use a Subflow.

NOTE: this requires a Winter ’22 Org.

The Newly Generated Flow Will Use Before-Save Triggers If Possible

If the source process or rule does a straightforward field update, a high-performance Before-Save trigger will be used. If the source process does something that’s not allowed Before the Save, an After-Save trigger will be used.

Important Notes

  1. ConvertToFlow creates a clone of your processes and rules and deploys it as a Record-Triggered Autolaunched Flow. This flow shows up in the Flow List like any other flow. ConvertToFlow does not modify or deactivate the process builder process or workflow rule that it’s cloning, so when you activate the new flow, keep in mind that if you don’t deactivate the original, you’ll have two identical processes firing on the same event. We did this for safety, but you really need to keep this in mind. If there’s demand, we can create an option to delete or auto-deactivate the original process so you never have two of them.
  2. The newly created flow has an api Name that has ‘converted_’ prepended to it, and it has the same label as the original process:

Save Order Considerations

Some Flows generated from Processes and Workflow Rules may behave slightly differently because of differences in the save order. See “Save-Order Considerations”, below. Currently ConvertToFlow always creates After-Save Triggers. Note the different points in the save order used by Process Builder, Workflow Rules, and After-Save Triggers in the list below.

As can be seen, the sensitive functionality is Escalation Rules and Entitlement Rules. Entitlement Rules execute after Process Builder and Workflow Rules but before Record-Triggered Flows that execute After Save. Escalation Rules execute after Workflow Rules but before Record-Triggerd Flows that execute After Save.

Not Yet Supported

ConvertToFlow does not:

  • generate Before-Save Triggers.
  • convert PB Processes that have more than one set of Scheduled Actions on a single row
  • convert Workflow Rules that use Outbound Messages or Recursion.
  • respect the Notify Assignee checkbox on the New Task action in Workflow Rules

Troubleshooting

Remote Site Settings issues

If you see this kind of error:

This page has an error. You might just need to refresh it. [LWC component’s @wire target property or method threw an error during value provisioning. Original error: [error returning from _getWFRDataApexIO Exception: Unauthorized endpoint, please check Setup->Security->Remote site settings. endpoint = https://saas-force-2107-dev-ed–c.visualforce.com/services/Soap/m/42.0%5D%5D Failing descriptor: {markup://c:flowPickerFSC}

Just as it says, you need to create a Remote Site Setting that points to your own org. In the example above, you would go to Remote Site Settings in Setup and create this:

Deployment Never Completes Issue

If retrieval works, but deployment of the converted flow seems to hang, it may be because of this: Your Apex Tests are all run when the metadata deploys even though Convert To Flow is deploying just a single piece of Flow metadata and no code. We recently changed Deploy to do this because with the previous setting that bypassed test runs, you couldn’t do Convert To Flow on production orgs (which don’t allow test runs to be bypassed for this situation).

What makes this confusing is that the test failure error isn’t getting delivered to Convert To Flow.

To see if this problem is caused by test failures, you can check your deployment status, which might look like this:

In this case, an unrelated class called DataManager, which is already installed on the org, has some broken test classes that are preventing Convert To Flow from successfully deploying.

You can also verify whether or not you have a broken Apex Class by clicking the Compile all classes link found here:

If you have _any_ compile failures, you will get this Deployment Never Completes error.

To get past this, you either need to fix the test class code or delete the class in question.

Install

Step 1

This component requires that you first install or upgrade the Flow Base Packs

Step 2

Install (Production) V1.2.3 9-22-21

Install (Sandbox) V1.2.3 9-22-21

Troubleshoot Installation Issues

Old Versions

Install V1.2.2 9-19-21 removed a demo flow that was calling

Install V1.2 9-10-21 Added Before-Save and Subflow Support IMPORTANT: this version requires a Winter ’22 org to successfully convert Process Builder Processes that themselves launch flows.

Install ConvertToFlow V1.1.0.0 7-14 Added WFR Conversion.

V 1.0.4.0 Unlocked 6/23 First package

Source

view source