Releases: Flow-Scanner/lightning-flow-scanner-core
Auto Layout & Process Builder
Release Notes - Version 3.9
Version 3.9 now includes 2 New Default Rules:
Rule (Configuration ID) | Description |
---|---|
Auto Layout (AutoLayout ) |
With Canvas Mode set to Auto-Layout, Elements are spaced, connected, and aligned automatically, keeping your Flow neatly organized thus saving you time. |
Process Builder (ProcessBuilder ) |
Salesforce is transitioning away from Workflow Rules and Process Builder in favor of Flow. Ensure you're prepared for this transition by migrating your organization's automation to Flow. Refer to official documentation for more information on the transition process and tools available. |
Custom Rule Loading
Release Note: Custom Rule Loading
We're excited to announce the latest enhancement to the Lightning Flow Scanner Core - the ability to create custom rules! With this new feature, users can now define and enforce organization-specific standards and best practices tailored to their unique requirements. Now also supports browser implementation!
Key Features:
- Custom Rule Interface: Define custom rules that adhere to the
IRuleDefinition
interface, specifying properties such as name, label, description, supported types, and more. - Flexible Rule Configuration: Configure custom rules alongside default rules using the rules section of the scanner's configurations, allowing for fine-grained control over rule enforcement.
- Exception Handling: Specify exceptions at the flow, rule, or result level to exclude specific scenarios from rule enforcement, providing flexibility in rule application.
Getting Started with Custom Rule Creation:
- Rule Structure: Define a custom rule class following the structure outlined in the Custom Rule Interface section of our documentation.
- Implement Execute Method: Implement the
execute
method within your custom rule class to perform the desired logic for rule enforcement. - Adhere to Interface: Ensure your custom rule class adheres to the
IRuleDefinition
interface, defining required properties and methods for a rule definition. - Configure Rules: To load custom rules using the Lightning Flow Scanner Core, you can utilize the
path
attribute within the rules section of your configurations. This attribute allows you to specify the path to your custom rule class.
{
"rules": {
"<RuleName>": {
"path": "<Path>"
}
}
}
By leveraging the path
attribute, you can easily incorporate custom rule definitions into the Lightning Flow Scanner Core, tailoring rule enforcement to your organization's specific requirements.
For more details and examples, refer to our Custom Rule Creation Guide
Bug Fix: Handling multiple loops in Compiler
Handles an issue with the handling of Flows that have multiple loops
Bugfix Scheduled Flows
Bugfix for supporting scheduled flows in our compiler by @junners
and improving error handling for incorrect rule configuration
DML In Loop / SOQL Query In Loop Improvement
Release Note: DMLStatementInLoop Rule Enhancements
We're happy to announce significant enhancements to the DMLStatementInLoop rule in this release. These updates aim to boost accuracy in identifying DML statements within loops, including nested structures. Notably, the rule has been divided into two separate components: DMLStatementInLoop and SOQLQueryInLoop.
Changes:
-
DMLStatementInLoop Rule:
- The rule has undergone refinement to enhance accuracy in identifying DML statements within loops.
- The traversal logic has been improved to account for nested loops, ensuring precise detection of DML statements within these structures.
- To enhance maintainability, the rule has been split into a separate class.
-
SOQLQueryInLoop Rule:
- Introducing a new rule, SOQLQueryInLoop, which identifies instances of SOQL queries executed inside loops. This addition promotes best practices and aids in optimizing code for governor limits.
-
Flow Compiler Class:
- A new class, the Flow Compiler, has been introduced to elevate the capabilities of our rule-checking process. This addition allows for more sophisticated and uniform analyses of Salesforce flows.
We believe that these changes significantly enhance the functionality and accuracy of the DMLStatementInLoop rule, providing users with a more powerful tool for identifying potential issues related to DML statements and SOQL queries in loops. As always, we remain committed to providing tools that empower Salesforce developers to create high-quality and efficient Flow solutions.
As always, we appreciate your feedback. Feel free to reach out if you have any questions or suggestions.
Thank you for using our product!
improved MissingFaultPath
Issue: The "MissingFaultPath" rule previously considered all elements in a flow, which led to inaccurate results.
Resolution: The rule has been updated to exclude any element that is already part of a Fault Path, resulting in more accurate assessments of missing fault handlers.
Version: 2.24
Date:6 november 2023
Impact: This bugfix ensures that elements correctly receive or do not receive fault handling recommendations based on their actual fault path relationships. It enhances the accuracy of the rule's assessments in flows.
dependency upgrades & output improvements
Some refactoring for readability, package upgrades for security. Furthermore implements a result details class which preprocesses the results and assigns type specific details.
Fix False positives 'FlowDescription' & 'MissingDescription' rules
New Rule: Copy of API Name
Copy of API Name
Having multiple elements called Copy_X_Of_Element will decrease the readability of the Flow. If you copy and paste them, make sure to update the API name of the new copy.
Configuration ID: CopyOf (View source code)
Flow Naming Conventions & API Versions
Introducing two new configurable rules!
- Old API Version
- Flow Naming Convention
Old API version
Newer API components may cause older versions of Flows to start behaving incorrectly due to differences in the underlying mechanics. The Api Version has been available as an attribute on the Flow since API v50.0 and it is recommended to limit variation and to update them on a regular basis.
Default Value: >50.0
Configuration example:
APIVersion:
{
severity: 'error',
expression: '===58'
}
Configuration ID: APIVersion
(View source code)
Flow naming conventions
Readability of flow is very important. Agreeing on and following the same naming conventions will ease collaboration.
Default Value: [A-Za-z0-9]+_[A-Za-z0-9]+
Configuration example:
FlowName:
{
severity: 'error',
expression: '[A-Za-z0-9]'
}
Configuration ID: FlowName
(View source code)