workflow-bpmn-validator
Skill14 starsChanged 5 months agoApache-2.0View on GitHub
Validates Alfresco Activiti BPMN 2.0 process definition files and companion workflow model XML for structural correctness: required namespaces, task assignees, variable naming conventions, process variable promotion pattern, formKey alignment, and forbidden Activiti 6/Flowable patterns. Trigger automatically when generating or editing *.bpmn files or *-workflow-model.xml files.
In this repository51 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/aiup-alfresco.mdcCursor rule
- aca-extensionSkill
- actionsSkill
- aikauSkill
- aiup-alfrescoSkill
- alfresco-architect-agentSkill
- alfresco-debugger-agentSkill
- alfresco-migrator-agentSkill
- audit-config-validatorSkill
- auditSkill
- behavioursSkill
- bootstrap-loaderSkill
- content-modelSkill
- content-model-validatorSkill
- content-storeSkill
- docker-compose-healthcheck-injectorSkill
- docker-composeSkill
- event-api-topology-checkerSkill
- eventsSkill
- metadata-extractorSkill
- migration-advisorSkill
- permission-aware-query-builderSkill
- permission-model-validatorSkill
- permissionsSkill
- repository-patchSkill
- requirementsSkill
- rest-apiSkill
- rest-api-validatorSkill
- rule-conditionsSkill
- scaffoldSkill
- scheduled-jobsSkill
- sdk-version-detectorSkill
- share-configSkill
- subsystemSkill
- surfSkill
- testSkill
- transformsSkill
- web-scriptsSkill
- workflow-bpmn-validatorSkill
- workflowSkill
- audit-config-validatorSkill
- content-model-validatorSkill
- docker-compose-healthcheck-injectorSkill
- event-api-topology-checkerSkill
- migration-advisorSkill
- permission-aware-query-builderSkill
- permission-model-validatorSkill
- rest-api-validatorSkill
- sdk-version-detectorSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
23 rules. About 0 are common, 4 are distinctive, and 19 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
19
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 24
WARNING: if any <startEvent> is missing activiti:formKey in a non-trivial process (more than one user task)
- Very specific: line 25
Every <userTask> must have either activiti:assignee or activiti:candidateGroups:
- Distinctive: line 26
WARNING: if a user task has neither — it will never be claimable
- Very specific: line 27
WARNING: if a user task that represents an approval step is missing activiti:formKey
- Very specific: line 28
Every <exclusiveGateway> with multiple outgoing sequence flows must have <conditionExpression> on all but one outgoing flow:
- Very specific: line 29
ERROR: if an outgoing flow from an exclusive gateway has no condition and is not marked as default
- Very specific: line 30
Every <serviceTask> must have either activiti:class or activiti:expression or activiti:delegateExpression:
- Very specific: line 36
ERROR: if any call to execution.setVariable(...) or task.getVariableLocal(...) uses a variable name containing a colon (e.g.
- Very specific: line 37
ERROR: if any <conditionExpression> references a variable with a colon in the name (e.g.
- Very specific: line 42
ERROR: if the class is from org.flowable.*
- Very specific: line 44
INFO: if the class is custom (not from org.alfresco.*) — confirm it implements org.activiti.engine.delegate.TaskListener
- Very specific: line 48
Every <boundaryEvent> containing a <timerEventDefinition> must have:
- Very specific: line 54
If a companion *-workflow-model.xml exists in the same module's model/ directory:
- Very specific: line 56
Every activiti:formKey value in the BPMN must correspond to a <type name="..."> declared in the workflow model:
- Distinctive: line 57
ERROR: if a formKey references a type not present in the workflow model
- Distinctive: line 60
ERROR: if this import is missing
- Very specific: line 61
Every workflow task type must extend bpm:startTask, bpm:activitiOutcomeTask, or bpm:workflowTask:
- Very specific: line 62
WARNING: if a type in the workflow model has no recognized bpm: parent
- Very specific: line 63
ERROR: if any property in the workflow model uses <mandatory enforced="true"> — the integrity checker fires before addAspect() writes …
- Very specific: line 67
If a bootstrap-context.xml exists in the module's context/ directory:
- Very specific: line 68
WARNING: if it contains a <bean> with parent="dictionaryModelBootstrap" that lists a .bpmn file in its models property — BPMN files must be …
- Very specific: line 69
WARNING: if the workflowDeployer bean has <prop key="redeploy">true</prop> — this causes duplicate process definitions on every restart
- Distinctive: line 78
If no violations are found, confirm: "BPMN and workflow model are valid for ACS 26.1 / Activiti 5.x."
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Workflow BPMN Validator
Validate the given Alfresco Activiti BPMN process definition (and companion workflow model, if present) against these rules.
BPMN Namespace Validation
- Root element must be
<definitions>with BPMN 2.0 namespace:xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" - REQUIRED:
xmlns:activiti="http://activiti.org/bpmn"— must be present; Alfresco Activiti extensions use this namespace - ERROR if present: Any
org.flowable.*class reference inclassattributes of<activiti:taskListener>,<activiti:executionListener>, or<serviceTask activiti:class="...">. ACS 26.1 uses Activiti 5.22.x; the Flowable API is not on the classpath.
Process Structure Validation
<process>element must have:idattribute (camelCase identifier)nameattribute (human-readable)isExecutable="true"
- WARNING if any
<startEvent>is missingactiviti:formKeyin a non-trivial process (more than one user task) - Every
<userTask>must have eitheractiviti:assigneeoractiviti:candidateGroups:- WARNING if a user task has neither — it will never be claimable
- WARNING if a user task that represents an approval step is missing
activiti:formKey
- Every
<exclusiveGateway>with multiple outgoing sequence flows must have<conditionExpression>on all but one outgoing flow:- ERROR if an outgoing flow from an exclusive gateway has no condition and is not marked as
default
- ERROR if an outgoing flow from an exclusive gateway has no condition and is not marked as
- Every
<serviceTask>must have eitheractiviti:classoractiviti:expressionoractiviti:delegateExpression:- WARNING for service tasks with none of these attributes (becomes a no-op)
Variable Naming Validation
- Scan all
<activiti:string>blocks inside<activiti:field name="script">elements and inside<conditionExpression>elements - ERROR if any call to
execution.setVariable(...)ortask.getVariableLocal(...)uses a variable name containing a colon (e.g.acme:outcome). The correct form uses underscore (acme_outcome). Alfresco maps content model properties{prefix}wf:{propName}→ process variable{prefix}wf_{propName}(colon → underscore). - ERROR if any
<conditionExpression>references a variable with a colon in the name (e.g.${acme:count == 2}). Use${acme_count == 2}.
Task Listener Validation
- Any
<activiti:taskListener>or<activiti:executionListener>using aclassattribute:- ERROR if the class is from
org.flowable.* - Allowed built-in classes:
org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener,org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener - INFO if the class is custom (not from
org.alfresco.*) — confirm it implementsorg.activiti.engine.delegate.TaskListener
- ERROR if the class is from
Timer Event Validation
- Every
<boundaryEvent>containing a<timerEventDefinition>must have:cancelActivityattribute explicitly set to"true"or"false"— WARNING if missing- Timer duration in ISO 8601 format inside
<timeDuration>:PT{N}S,PT{N}M,PT{N}H,P{N}D, or combinations — ERROR if the format does not match ISO 8601
Workflow Model Alignment
If a companion *-workflow-model.xml exists in the same module's model/ directory:
- Every
activiti:formKeyvalue in the BPMN must correspond to a<type name="...">declared in the workflow model:- ERROR if a formKey references a type not present in the workflow model
- The workflow model must import the
bpmnamespace:<import uri="http://www.alfresco.org/model/bpm/1.0" prefix="bpm"/>- ERROR if this import is missing
- Every workflow task type must extend
bpm:startTask,bpm:activitiOutcomeTask, orbpm:workflowTask:- WARNING if a type in the workflow model has no recognized
bpm:parent
- WARNING if a type in the workflow model has no recognized
- ERROR if any property in the workflow model uses
<mandatory enforced="true">— the integrity checker fires beforeaddAspect()writes properties, causing a spuriousIntegrityException
Bootstrap Registration Check
If a bootstrap-context.xml exists in the module's context/ directory:
- WARNING if it contains a
<bean>withparent="dictionaryModelBootstrap"that lists a.bpmnfile in itsmodelsproperty — BPMN files must be registered viaparent="workflowDeployer", notdictionaryModelBootstrap - WARNING if the
workflowDeployerbean has<prop key="redeploy">true</prop>— this causes duplicate process definitions on every restart
Output
Report all violations with:
- File path and element ID (BPMN) or type name (workflow model)
- Rule violated
- Suggested fix
If no violations are found, confirm: "BPMN and workflow model are valid for ACS 26.1 / Activiti 5.x."
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

