MissingFaultPath bug fix for Wait nodes
v5.9 — Fix MissingFaultPath rule for Wait nodes
This release fixes issue #272, contributed by @chazwatkins, where the MissingFaultPath rule incorrectly flagged all "Wait" nodes.
The bug was caused because the rule did not distinguish between different Wait subtypes. In Salesforce flows, only "Wait For Conditions" nodes can have fault paths. "Wait for Amount of Time" (WaitDuration) and "Wait Until Date" (WaitDate) nodes cannot have fault paths. This fix updates the MissingFaultPath rule to properly ignore WaitDuration and WaitDate subtypes, while continuing to check for applicable cases.
Salesforce Wait Nodes Overview
1. Wait for Conditions
- Lets a flow pause until certain conditions are true.
- This is essentially an event-based pause and can have error handling logic attached — so a fault path is valid here.
- For more details, refer to the Salesforce documentation on Wait for Conditions.
2. Wait for Amount of Time (WaitDuration)
- Pauses flow for a fixed amount of time.
- This is purely time-based with no real failure conditions that Salesforce would allow fault handling for.
- Therefore, no fault path option is provided.
- For more information, see the Salesforce documentation on Wait for Amount of Time.
3. Wait Until Date (WaitDate)
- Pauses flow until a given date/time.
- Also purely time-based → no fault path.
- For further details, check the Salesforce documentation on Wait Until Date.
Changes
- Added
isValidSubtypemethod to properly handle applicable element subtypes. - Updated MissingFaultPath rule execution logic.