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 in class attributes 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:
id attribute (camelCase identifier)
name attribute (human-readable)
isExecutable="true"
WARNING if any <startEvent> is missing activiti:formKey in a non-trivial process (more than one user task)
Every <userTask> must have either activiti:assignee or activiti: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
Every <serviceTask> must have either activiti:class or activiti:expression or activiti: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(...) or task.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 a class attribute:
INFO if the class is custom (not from org.alfresco.*) — confirm it implements org.activiti.engine.delegate.TaskListener
Timer Event Validation
Every <boundaryEvent> containing a <timerEventDefinition> must have:
cancelActivity attribute 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:formKey value 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 bpm namespace:
<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, or bpm:workflowTask:
WARNING if a type in the workflow model has no recognized bpm: parent
ERROR if any property in the workflow model uses <mandatory enforced="true"> — the integrity checker fires before addAspect() writes properties, causing a spurious IntegrityException
Bootstrap Registration Check
If a bootstrap-context.xml exists in the module's context/ directory:
WARNING if it contains a <bean> with parent="dictionaryModelBootstrap" that lists a .bpmn file in its models property — BPMN files must be registered via parent="workflowDeployer", not dictionaryModelBootstrap
WARNING if the workflowDeployer bean 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."
1---2name: workflow-bpmn-validator-23description: Workflow BPMN Validator4---567# Workflow BPMN Validator89Validate the given Alfresco Activiti BPMN process definition (and companion workflow model, if present) against these rules.1011## BPMN Namespace Validation1213- Root element must be `<definitions>` with BPMN 2.0 namespace:14 `xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"`15- **REQUIRED**: `xmlns:activiti="http://activiti.org/bpmn"` — must be present; Alfresco Activiti extensions use this namespace16- **ERROR if present**: Any `org.flowable.*` class reference in `class` attributes 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.1718## Process Structure Validation1920- `<process>` element must have:21 - `id` attribute (camelCase identifier)22 - `name` attribute (human-readable)23 - `isExecutable="true"`24- **WARNING** if any `<startEvent>` is missing `activiti:formKey` in a non-trivial process (more than one user task)25- Every `<userTask>` must have either `activiti:assignee` or `activiti:candidateGroups`:26 - **WARNING** if a user task has neither — it will never be claimable27 - **WARNING** if a user task that represents an approval step is missing `activiti:formKey`28- Every `<exclusiveGateway>` with multiple outgoing sequence flows must have `<conditionExpression>` on all but one outgoing flow:29 - **ERROR** if an outgoing flow from an exclusive gateway has no condition and is not marked as `default`30- Every `<serviceTask>` must have either `activiti:class` or `activiti:expression` or `activiti:delegateExpression`:31 - **WARNING** for service tasks with none of these attributes (becomes a no-op)3233## Variable Naming Validation3435- Scan all `<activiti:string>` blocks inside `<activiti:field name="script">` elements and inside `<conditionExpression>` elements36- **ERROR** if any call to `execution.setVariable(...)` or `task.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).37- **ERROR** if any `<conditionExpression>` references a variable with a colon in the name (e.g. `${acme:count == 2}`). Use `${acme_count == 2}`.3839## Task Listener Validation4041- Any `<activiti:taskListener>` or `<activiti:executionListener>` using a `class` attribute:42 - **ERROR** if the class is from `org.flowable.*`43 - Allowed built-in classes: `org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener`, `org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener`44 - **INFO** if the class is custom (not from `org.alfresco.*`) — confirm it implements `org.activiti.engine.delegate.TaskListener`4546## Timer Event Validation4748- Every `<boundaryEvent>` containing a `<timerEventDefinition>` must have:49 - `cancelActivity` attribute explicitly set to `"true"` or `"false"` — **WARNING** if missing50 - 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 86015152## Workflow Model Alignment5354If a companion `*-workflow-model.xml` exists in the same module's `model/` directory:5556- Every `activiti:formKey` value in the BPMN must correspond to a `<type name="...">` declared in the workflow model:57 - **ERROR** if a formKey references a type not present in the workflow model58- The workflow model must import the `bpm` namespace:59 `<import uri="http://www.alfresco.org/model/bpm/1.0" prefix="bpm"/>`60 - **ERROR** if this import is missing61- Every workflow task type must extend `bpm:startTask`, `bpm:activitiOutcomeTask`, or `bpm:workflowTask`:62 - **WARNING** if a type in the workflow model has no recognized `bpm:` parent63- **ERROR** if any property in the workflow model uses `<mandatory enforced="true">` — the integrity checker fires before `addAspect()` writes properties, causing a spurious `IntegrityException`6465## Bootstrap Registration Check6667If a `bootstrap-context.xml` exists in the module's `context/` directory:68- **WARNING** if it contains a `<bean>` with `parent="dictionaryModelBootstrap"` that lists a `.bpmn` file in its `models` property — BPMN files must be registered via `parent="workflowDeployer"`, not `dictionaryModelBootstrap`69- **WARNING** if the `workflowDeployer` bean has `<prop key="redeploy">true</prop>` — this causes duplicate process definitions on every restart7071## Output7273Report all violations with:74- File path and element ID (BPMN) or type name (workflow model)75- Rule violated76- Suggested fix7778If no violations are found, confirm: "BPMN and workflow model are valid for ACS 26.1 / Activiti 5.x."
Run npx skillmds@latest add aborroy/workflow-bpmn-validator-2 in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Workflow BPMN Validator It is listed under Productivity on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
aborroy (@aborroy) published this skill. Their other Agent Skills are listed on their SkillMD profile.