Add Flow Variables, Constants, and Formulas Table
- Dominant language
- TypeScript
- Stars
- 81
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
## Description
Currently, Flow Lens generates UML diagrams that show the flow's structure and logic, but doesn't include the variables, constants, and formulas that are typically shown in the left panel of Salesforce Flow Builder. Adding this information would make the generated diagrams more complete and useful for documentation and code review purposes.
## Proposed Solution
Add a new section to the UML diagram that displays a table containing:
- Variables (with their data types and initial values)
- Constants (with their data types and values)
- Formulas (with their expressions and data types)
Each element should include a diff indicator (+, -, Δ) to show changes between versions, similar to how nodes are currently handled.
The implementation would need to:
1. Extract the following from the Flow XML:
- `FlowVariable` elements (name, dataType, value)
- `FlowConstant` elements (name, dataType, value)
- `FlowFormula` elements (name, dataType, expression)
2. Add a new section to the UML output format
3. Implement diff comparison for these elements
4. Update the diagram generation to include the new table
### Open Questions:
- Are there any other different types of flow structure which should be rendered in a tabular format?
- Is is possible to render the table stuck to the left of the diagram?
- Would we want to consider publishing the table outside of the uml string - perhaps in a .md format? (this would render nicely in github action)
Contributor guide
Assessment
This issue has not been assessed yet.