google / google/flow-lens

Prevent Processing of Non-Canvas-Based Flow Types

Open
#27 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
81
Forks
11
PR merge metrics
No merged PRs in 30d

Description

## Problem
Flow Lens currently attempts to process all Salesforce flow files, including those that don't use the Lightning Flow Canvas for their layout (e.g., Process Builder flows). This can lead to errors or incorrect/meaningless diagram generation since these flows don't contain proper layout information.

## Background
Different types of Salesforce automation tools create different types of flow files. While they all use the `.flow-meta.xml` format, not all of them contain layout information that can be meaningfully visualized:

1. Process Builder flows (typically have `processType: 'InvocableProcess'`)
2. Potentially other types that don't use the Lightning Flow Canvas

## Proposed Solution
Add a validation step in the flow processing pipeline that checks for indicators of non-processable flows:

Add clear error messaging when skipping non-processable flows:
```
Skipping {flowName}: Process Builder flows cannot be visualized as they don't use the Lightning Flow Canvas
```

## Research Needed
1. Compile a comprehensive list of flow types that don't use the Lightning Flow Canvas
2. Identify reliable indicators in the flow XML that can determine if a flow is canvas-based
3. Determine if there are any exceptions where non-canvas flows should still be processed
4. Investigate if there are any canvas-based flows that might be incorrectly filtered out by the proposed checks

## Additional Considerations
- Should we attempt to create alternative visualization methods for non-canvas flows?
- How should we handle flows that change type over time (via Git history)?

## Related Documentation
- [Salesforce Flow Types](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_visual_workflow.htm)
- [Process Builder Migration](https://help.salesforce.com/s/articleView?id=platform.flow_migrate_to_flow.htm&language=en_US&type=5)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.