Skip to content

MissingFaultPath bug fix for Wait nodes

Choose a tag to compare

@RubenHalman RubenHalman released this 07 Oct 19:27
· 73 commits to main since this release

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)

Changes

  • Added isValidSubtype method to properly handle applicable element subtypes.
  • Updated MissingFaultPath rule execution logic.