Related to the work in Bpmn Workflow Linter / Validator API
I wanted to get the communities insights and feedback on the following working draft list of “linting” / validation rules for workflows/BPMNs.
The purpose is to collect a common set of rules that we struggle with at various times, in effort to create a common set of implemented and configurable rules that improve modeling for developers and analysts.
Please share any insights, rules, ideas, problems, etc that you have faced, fixed, or still struggle with!!
- Timer Limits: Minimum allowed, Longest allowed, etc
- Ensure the Executable is checked on pools/processes
- Extension Rules: Extension Rule that Targets a Element Type and has requirement on extension content
- Gateways have descriptions
- Sequence Flows that come out of a Gateway must have a description
- Start and End Events must have a description
- Only 1 Blank Start Event is allowed
- Limits on Call Activity: What processes can be called, and what input/outputs are expected: more likely to be valuable for outputs related to the specific process being called.
- Multi-Instance Loop Limits
- Async Before/After on a USer Task is likely a error, as a User Task is already async
- Elements with duplicate sequence flows going to same element
- Data Elements without a Name/Title
- Comment Annotations without a description
- Embedded Sub Process that does not have a title
- Message Flow from pool to pool that does not have a description
- Message Flow that does not have a description
- Boundary Event that does not have a Title
- Time Events with bad configuration or missing configuration
- Pool without a name value
- Tasks without a Name value
- Multi-Instance only allowed to be used on specific task types
- Async After on a End Event is likely not needed
- Certain types of Elements that are unreachable: No inbound or outbound flows: not all elements are bad when this occurs. But some types would: Tasks, Annotations, Sequence flows, intermediate and end events, etc.
- Warnings of a certain code that are listing of all Expressions: Providing a list of Expressions for easier review: “Show me all of the expressions in the workflow”
- Field Injection Rules for specific types of Java Classes
- Inputs Rules for specific types of Java Classes
- Limits of Listener Types: What types should and should not be allowed: “We do not want to support Expressions or script types”
- Script Language Control: “We only support Javascript as a language”
- Service Task / Send Task / Send Message Implementation Rules: Only specific types of implementations are supported: “Connectors are not allowed”
- HTTP-Connector Helpers to ensure proper fields and values are provided
- External Task Topic Limits: Only allow specific topic values
- Warning about Expressions not being supported on certain fields: Example: Form Key on a Start Event does not support a Expression
- Warnings about Listeners on Annotations: Data Store and Data Object
- User Task Priority Limits
- External Task Priority Limits
- Complex Gateway Warning: that it does not do anything…
- Script Compiler: Ensure script compiles
- Task IDs have the right name convention given their task type
- Expression Compiler
- Proper Message and Signal Setup
- BPMN Error Code Allowances
- Fake Joins: Checking for multiple incoming sequence flows
- Subprocess requiring a start event
- DMN limits
- Process Version Pattern allowance
- History Time to Live Pattern
- Candidate Starter Groups and User Rules
- User Task Rules
- Process ID/Process Key Naming rules.
- Event Based Gateway looping warning: Warning about race events and other common issues when you loop a event gateway
- Too many nested embedded sub-processes
- Multi-Task on Tasks that dont make much sense: Such as a Manual Task.
- Loop Characteristic Warning: Note that it does not actually do anything
- Tasks with a single sequence flow, and that sequence flow has a condition on it.
- Missing End events at end of scope/path
- Pool Lanes without name/text
- Use of Form Key or Use of Form Fields on User Tasks depending on allowed configuration pattern.
- Reserved Variable Names
- Only use Delegate Expressions when building for a Spring App (or else the DI wont work in the delegates)
- Call Activity and Business Rule Controls on Bindings, and Tenant ID,
- Call Activity control on the Business Key expression: Ensuring that the business key will always be the expected value being submitted to child processes.
- Link events must have a title/name
- Unreachable Compensations