Visual Workflow allows us to automate business processes by building applications, known as Flows. UsingFlows, users can: (1) collect information; or, (2) they can update, edit, or create records in Salesforce. Furthermore, Flows can execute logic, interact with the Salesforce database, call Apex classes, Platform Events, and guide users through various screens to streamline the process of collecting and updating data. Once a Flow is built, an Admin can make the Flow available to the right users or systems.
Just like most things in life, however, Visual Workflow is not immune to bugs :(; and, neither is it any easier to debug Visual Workflows :(. Salesforce, however, does offer handful of debugging tools – such as, a user can use Fault Email sent by Salesforce (not very helpful in every case); or, use Screen elements (adding a temporary element); or, last but not least, leverage standard Debug Log. Each option, however, has its pros and cons. If one lacks experience on how to read a Debug Log then, using screen elements is quite helpful in debugging a flow. Setting Debug Log is quite easy but understanding/reading each and every line of Debug Log message/outcome is relatively challenging. If you are interested in developing mastery on how to read Debug Logs (Only FLow part) in Salesforce then, please read this article.
You might have created a Flow with multiple screens, assignment or Record elements. After development, the second step is to test the Flow, to make sure that it is working as per the design (obviously based on business requirements).
Before Summer’18 release, we were using Screen elements to make sure that Flow is passing correct data to next element.
In the above example, I am using Screen element just to debug/test the Flow to make sure that it is passing correct data – i.e. Lead ID, in my case – to the next element Add to Campaign (Record Create) element.
After Summer’18 release, however, with just a few clicks, you can now debug your Flow with a built-in debug tool within the Cloud Flow Designer! No need to add Screen elements to test the outcome. Cloud Flow Designer now offers a debug option to help you test and troubleshoot your flows. Easily set input variables, quickly restart flows and view all the gory details of what’s happening in real time as your flow executes. The new feature includes following capabilities:
- Easily specify the values of input variables. After running the flow, you can quickly change those values and rerun the flow.
- Choose whether sub-flow elements are running the latest version of each referenced flow.
- View step-by-step details of all operations, actions, and variable assignments as the flow execute them.
- At any time, even mid-run, quickly restart the flow so that you can try a different branch.
In this article, I am going to show you how one can use new Flow debugging technique that allows you to debug in the Cloud Flow Designer. Let us start with a business use case. Read the rest of this entry!