You need to sign in to do that
Don't have an account?
Brian Kessler
How can I debug a process or flow? Having trouble to create the automate pre-workshop...
Hi!
I'm currently working my way through Automate Pre-Workshop Tasks with Flow.
Evidently, either the Flow or Process Builder allowed me to enter some corrupt data into the GUI.
(Wouldn't it be nice to look at code in an IDE that would tell me this as I did it? ... but that's not exactly what I want to ask.)
When I try to test the Process/Flow combination manually, saving fails with the following output:
Alternatively, even knowing the step couldn't (or at least shouldn't) possibly pass verification, submission to trailhead results in:
Googling such errors yields no results (or at least nothing fruitful).
Can you please help me determine what I did wrong?
Also, if there are any tips for diagnosing and resolving such issues, I'd be glad to know them before such errors happen when I'm doing this for employers/clients.
(Though I'd much rather be doing this with Apex triggers and well-coded trigger handlers! ... and wouldn't it be nice if all these processes, flows, etc. transpiled to Apex...)
I'm currently working my way through Automate Pre-Workshop Tasks with Flow.
Evidently, either the Flow or Process Builder allowed me to enter some corrupt data into the GUI.
(Wouldn't it be nice to look at code in an IDE that would tell me this as I did it? ... but that's not exactly what I want to ask.)
When I try to test the Process/Flow combination manually, saving fails with the following output:
Workflow Action Failed to Trigger Flow The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 3010Y000000H8Et. Flow error messages: <b>An unhandled fault has occurred in this flow</b><br>An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information. Contact your administrator for help. Click here to return to the previous page.
Alternatively, even knowing the step couldn't (or at least shouldn't) possibly pass verification, submission to trailhead results in:
Challenge Not yet complete... here's what's wrong: There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_EXECUTE_FLOW_TRIGGER, The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 3010Y000000H8Et. Flow error messages: An unhandled fault has occurred in this flow An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information. Contact your administrator for help.: []
Googling such errors yields no results (or at least nothing fruitful).
Can you please help me determine what I did wrong?
Also, if there are any tips for diagnosing and resolving such issues, I'd be glad to know them before such errors happen when I'm doing this for employers/clients.
(Though I'd much rather be doing this with Apex triggers and well-coded trigger handlers! ... and wouldn't it be nice if all these processes, flows, etc. transpiled to Apex...)
Actually three of them:
So, the main advice I have to anyone walking in my footsteps:
1. Check for the emails which (hopefully) will be sent to your email address (you might want to set up a dedicated email address to receive them).
2. Read them carefully.
That said, I discovered that I was suffering from three problems:
1. The sample Chatter Action given in Automate Pre-Workshop Tasks with Process Builder (https://trailhead.salesforce.com/project/workshop_mgmt/workshop_mgmt_process_builder) : Add a Chatter Action is BAD.
Be sure to use Instructor__c, not Instructor__r.
2. The Instructor field we created in Get Started (https://trailhead.salesforce.com/project/workshop_mgmt/workshop_mgmt_get_started) is not required (which makes sense because you might not want to require the Instructor for other types of campaigns... though it is really questionable why you'd want to use a Campaign instead of a custom object).
If you neglect to enter this field when the type is set to "Dev Class", the Instructor's names will have null values, which causes the flow to crash.
Consider implementing a validation rule to ensure that if the Campaign's type is Dev Class, the Instructor is not blank.
(Also, it seems like a bug in Flow if it will crash because a template finds a null value in an optional field... It might make sense to crash business logic for unexpected nulls, but not templates!)
3. Back in the Flow created for Automate Pre-Workshop Tasks with Flow (https://trailhead.salesforce.com/project/workshop_mgmt/workshop_mgmt_flow), : Use the Contact Values to Populate the Campaign Members Collection : Step 2, I had a well hidden typo.
Exactly as displayed in the illustration, the value for my second variable appeared {!CampaignMemberRecord.C
Well, as you can see, that's not the complete value. If you read carefully, youd know the value should read {!CampaignMemberRecord.CampaignId} ... but I accidently entered {!CampaignMemberRecord.Contact}
While the typo was obviously mine, this reflects at least three serious issues with the Flow UX:
1. The interface obscures important information, even while wasting screen real estate.
2. The interface won't let me simply type or copy/paste the values I want into the field, but rather I must go through tedious selection process.
3. While it should havebeen evident tha a ContactId can never equal a CampaignId, the process did not provide this validation.
All Answers
Error Occurred During Flow "Add_Chapter_TAs_to_Class_Session": This error occurred when the flow tried to ...
Error Occurred During Flow "New_Class_Sessions": An error occurred when executing a flow interview.
Actually three of them:
So, the main advice I have to anyone walking in my footsteps:
1. Check for the emails which (hopefully) will be sent to your email address (you might want to set up a dedicated email address to receive them).
2. Read them carefully.
That said, I discovered that I was suffering from three problems:
1. The sample Chatter Action given in Automate Pre-Workshop Tasks with Process Builder (https://trailhead.salesforce.com/project/workshop_mgmt/workshop_mgmt_process_builder) : Add a Chatter Action is BAD.
Be sure to use Instructor__c, not Instructor__r.
2. The Instructor field we created in Get Started (https://trailhead.salesforce.com/project/workshop_mgmt/workshop_mgmt_get_started) is not required (which makes sense because you might not want to require the Instructor for other types of campaigns... though it is really questionable why you'd want to use a Campaign instead of a custom object).
If you neglect to enter this field when the type is set to "Dev Class", the Instructor's names will have null values, which causes the flow to crash.
Consider implementing a validation rule to ensure that if the Campaign's type is Dev Class, the Instructor is not blank.
(Also, it seems like a bug in Flow if it will crash because a template finds a null value in an optional field... It might make sense to crash business logic for unexpected nulls, but not templates!)
3. Back in the Flow created for Automate Pre-Workshop Tasks with Flow (https://trailhead.salesforce.com/project/workshop_mgmt/workshop_mgmt_flow), : Use the Contact Values to Populate the Campaign Members Collection : Step 2, I had a well hidden typo.
Exactly as displayed in the illustration, the value for my second variable appeared {!CampaignMemberRecord.C
Well, as you can see, that's not the complete value. If you read carefully, youd know the value should read {!CampaignMemberRecord.CampaignId} ... but I accidently entered {!CampaignMemberRecord.Contact}
While the typo was obviously mine, this reflects at least three serious issues with the Flow UX:
1. The interface obscures important information, even while wasting screen real estate.
2. The interface won't let me simply type or copy/paste the values I want into the field, but rather I must go through tedious selection process.
3. While it should havebeen evident tha a ContactId can never equal a CampaignId, the process did not provide this validation.