It’s getting hard out here for a Developer. Up until this point, an Advanced Administrator who knew Apex, API, and seven other Developer words could pass the Developer Cert and become a not-really-bona-fide Developer with a shiny Salesforce.com Certified Developer badge next to his or her name.
Now, along comes Visual Workflows or ‘Flows,’ and Advanced Administrators can now make “flows that step users through screens for collecting and updating data,” as the Salesforce Visual Workflow Implementation guide notes.
Didja catch that? Collecting and updating data. Right now Salesforce Developers around the globe collectively just felt an evil, icy chill crawl up their spine.
A HUGE shout out to Varadarajan “Raja” Rajaram, Salesforce.com Product Guru/Engineer, and whatever team he worked with, for creating flows. Check out an awesome #DF12 youtube video on flows by Varadarajan.
Seriously though, I got my first chance to build a flow for a client this past week involving Opportunity Product Line Items, a custom object and a many-to-many join object between Opportunity and the Custom Object, and it was amazing working on a process functionality that felt like it should be a trigger with a ton of lines of Apex code, but it was all click, clack, drag, and drop.
All I can say is wow! I can already think of least two other projects where a flow would be the perfect solution.
The Elements of Flow
The main elements of flow are selected from the Palette and dragged on the canvas.
- Step: a placeholder for drafting out a process
- Screen: to display text and/or collect input data from the User
- Decision: to conditionally route a flow
- Assignment: to make changes to the value of a flow variable
- Record Create
- Record Update
- Record Lookup
- Record Delete
- Subflows: re-use a flow as part of a larger flow; also useful for breaking large flows into smaller chunks for easier de-bugging
- Apex Plug-In: a piece of Apex code can be included in a flow (ok, maybe Developers still have some use :p)
- Connector: to control how the flow is executed and are represented as arrows
- Constant: define a fixed value that can be used throughout your flow
- Variable: create updatable values to use in a flow
- Formula: calculate a value using numeric elements in your flow
- Text Template: create text to use in your flow
- Choice: a standalone choice option that you can reference or reuse throughout your flow
- Dynamic Choice: looks up data from an object’s records and dynamically generates a set of choices at runtime
- Global Constants: system values such as True, False, or Empty String
Note: one of the very cool options with Flow is to create resources on the fly, as you are building a screen, a decision, or any Data element. No more cancelling out of the Element to go create a variable you didn’t even know you needed until that moment.
“The Explorer tab is a library of all elements and resources added to the flow.
- Double-click items in the list to edit them.
- Single-click an item to view its details and usage in the Description pane.
- Use the Explorer’s search options to quickly find an element or resource in the flow.
- If you hover over a canvas-visible element on the Explorer, you can click its to see its location on the canvas.”
Area for Improvement
It feels like the debugging functionality could be a little more intuitive. I got this clear-as-mud error message multiple times.
It does send an email to your user email inbox, but a debug mode in the Flow interface would be a HUGE upgrade. Also, at the very least, the error message should contain text along the lines of, ‘an email has been sent to [User.Email].’
Watch out when you migrate your flow, custom objects, and fields to production. If you don’t edit the field level security for each new custom field, you will receive an ‘Unhandled Fault’ error. It took me a little (annoying) while to figure that out after comparing the working flow in the Sandbox and the failing flow in Production before I realized that particular fact. Booooo!
Try it out
Now, I’m not the brightest Advanced Administrator on the network, but setting up a Developer Org and following the four step-by-step examples from the Cloud Flow Designer Workbook to create four different flows really helped me to understand the power of this new tool.
Bravo, to Salesforce.com and the Product Development team responsible!