Scenarios where you could encounter error
- Saving a record
- Running an apex test class manually or via a deployment
- Performing an update/insert though the API (i.e Data Loader) etc
Resolve inability to save Record
- Error Email: Creator of the flow would have received an error email with detailed step by step information and error message. Great way to see if the issue could be data or implementation related.
- Capture debug logs, (make sure to set debug level as FINEST for workflow) Sometimes the debug log will tell you exactly which element of the Flow is failing and why is it failing.
- Use debug screen where you can display Request and Response details,
press Ctrl + Shift + M (on a windows PC) or command + shift + M (on Mac) inside the flow designer.
- Use Workbench REST Explorer to capture more details about process/flow metadata.
1. Get the version Id from the error message
2. Login to Workbench
3. Go to Utilities > REST Explorer >> Perform a GET
4. Add the following to the URI field and change the Id with the FlowId you are investigating /services/data/v36.0/tooling/sobjects/flow/30124000000PcNDAA0 [NOTE: v36.0 refers to the API version and as new tooling API features are released, version may need changing]
5. Click Execute
6. Open the 'attributes' folder
7. Check the 'ProcessType', if the value is 'Flow' then this is a normal flow, if the value is 'Workflow', this is a Process. Here you can also see the MasterLabel, which should provide you with the name of the flow/process.
8. Explore the Flow Metadata tree to see what a specific element is doing, this is more useful when it's a Process Builder Flow since the error email and other error messages sometime refer to the auto-generated name like myRule1_1.
NOTE: Executing a DELETE in REST explorer will in fact delete the flow if inactive. Please be careful when using DELETE option in REST Explorer.
Most common error messages or issues encountered with flows