Home / Model Expert Homepage / Model Expert Help / aiExpert / Worked Example #1 – Getting advice on a BPMN Process diagram
Import an MDG to create a Reference Model
Importing and exporting Reference Models
Editing RM Connector type properties
Stereotypes inheriting from other Element Types
Customizing Reference Model Properties
Customizing Reference Model Element Properties
Table of contents
Worked Example #1 – Getting advice on a BPMN Process diagram
Table of contents
This worked example takes you though the whole process of checking a BPMN process diagram using aiExpert.
In it we will
- See the initial diagram
- Detail the Model Query we are using
- Show the details of the data we send to the AI model
- Show the results from the model query, as a diagram, and as a detailed list
- Then, follow the same process, but with a diagram which has been updated, following the advice above
Initial Diagram
This is our starting point BPMN 2.0 process diagram:
There are clearly lots of issues with this diagram, which even a new process modeler can see. But it’s useful to start with a model which we know has some issues, just to see of the Ai can pick them up.
Model Query
The model Query we will use is one copied from the built-in model queries. It has been specially designed to look at the details of BPMN process diagrams.
Query information | Value | Explanation |
Query name | BPMN2.0 best practice GPT5 | Just a helpful name. Same as the element name in EA, where all this data is saved |
Query Notes | Checks the structure of a single BPMN 2.0 process, to see of if conforms to some named best practice standards | Helps the user when they decide which Model Query to run |
Language | English | National Language for the response |
Data collector | Structure | Which Data Collector to use. See Data Collectors |
Model | gpt-5-mini | Which model to use. Currently limited to ChatGPT 5- mini or Gemini |
Instructions | You are an expert in the style and structure of BPMN 2.0 Process models. | See Creating and Editing your own queries |
Rules | Here are some parts of a BPMN Process. Check if they conform to the best practices for the structure BPMN processes. Use the 7PMG styles rules. Also use the Bruce Silver ‘BPMN Method and style’ guidelines When you respond, grade the severity from 1 – a minor issue, to 5 – a serious problem. Always include the name of each element with any feedback, not the ID. |
The important part. Clear instructions on what you want the AI to do. |
Data sent to the AI
The data sent to the AI is in 5 parts:
- Some technical stuff about how to manage the query
- The Instructions. The AI pays very close attention to this
- The Rules
- Your data
- A specification of the exact format we want the data to come back in. This allows us to process the data which comes back, for example, to highlight elements in a diagram which have issues.
In this case, we used the ‘Structure’ data collector, which provides a medium about of data about the elements and their connectors, but not so much that the Ai gets confused.
Specifically, the data was:
Name of diagram is: Handle customer registration Elements: - ID=17266 (DataStore) 'Customer details' -> related by connector: Dependency (DataAssociation) to elementIDs:17279 - ID=17269 (EndEvent) 'EndEvent1' - ID=17270 (Activity) 'Remove bad customer' -> related by connector: ControlFlow (SequenceFlow) to elementIDs:17277 - ID=17276 (Activity) 'Send normal email' -> related by connector: ControlFlow (SequenceFlow) to elementIDs:17267 - ID=17267 (EndEvent) 'Normal customer created' - ID=17264 (EndEvent) 'Important customer created' - ID=17272 (Activity) 'Contact important customer' -> related by connector: ControlFlow (SequenceFlow) to elementIDs:17264 - ID=17273 (Gateway) 'Evaluate' -> related by connector: ControlFlow (SequenceFlow) to elementIDs:17276,17272,17270 - ID=17279 (Activity) 'Evaluate customer' -> related by connector: ControlFlow (SequenceFlow) to elementIDs:17273 - ID=17275 (Activity) 'Log customer details' -> related by connector: Dependency (DataAssociation) to elementIDs:17266 -> related by connector: ControlFlow (SequenceFlow) to elementIDs:17279 - ID=17268 (StartEvent) 'Customer registered' -> related by connector: ControlFlow (SequenceFlow) to elementIDs:17275 - ID=17280 (Lane) 'Lane1' contains 17276,17275 - ID=17271 (Lane) 'Lane2' contains 17273,17279 - ID=17274 (Activity) 'Create new widget' -> related by connector: Dependency (DataAssociation) to elementIDs:17265 - ID=17277 (Gateway) 'Gateway1' -> related by connector: ControlFlow (SequenceFlow) to elementIDs:17274 - ID=17278 (Lane) 'Lane3' contains 17277,17270,17274 - ID=17265 (DataStore) 'DataStore1' -> related by connector: Dependency (DataAssociation) to elementIDs:17270 |
Results
In the graphical view, we see this:
Serious issues are highlighted in red, less serious ones in yellow.
The details of the feedback are below: The final column has our observations on the response from the Ai model: whether we agree or not.
Element | Severity | Issue | Suggested Fix | Observations |
Evaluate (Gateway) | Â 4 | The gateway ‘Evaluate’ has three outgoing sequence flows but no gateway type documented and no conditional expressions or a default flow. According to BPMN Method & Style and 7PMG rules, exclusive/inclusive gateways must show conditions on outgoing flows (and a default where appropriate). Without conditions the model is ambiguous and may not be executable or easily understood. | Specify the gateway type (e.g., Exclusive XOR or Inclusive OR). If Exclusive, add condition expressions to each outgoing flow and mark one flow as the default (if needed). If Inclusive or Parallel, change the gateway marker accordingly and, for Inclusive, ensure conditions are present to indicate when branches are taken. | We did not send the Gateway type to the model, so I suppose we should expect this. Maybe re-run the query, but send more date (use the Detail data collector next time?) |
Create new widget (Activity) | 4 | The activity ‘Create new widget’ has no outgoing sequence flow and is not an End Event. Per BPMN best practice, activities should have an outgoing sequence flow (or be followed by an end event) so the process always reaches a defined end. This creates an incomplete branch of the process | Add an outgoing sequence flow from ‘Create new widget’ to an appropriate follow-up activity or to an End Event. Alternatively, if the activity actually represents a terminal step, replace it with an appropriate End Event (named to reflect the outcome). | Fair comment. ‘Create new widget’ has no outbound flows. The model does not mention that the name of this activity seems to have nothing to to with the rest of the process |
EndEvent1 (End Event) | 3 | The end event ‘EndEvent1’ is present in the diagram but has no incoming or outgoing connectors. Unconnected elements make the model confusing and are typically either accidental remnants or incomplete modeling. | Either remove ‘EndEvent1’ if it is not required, or connect it with the intended incoming sequence flow so it represents a valid end of a process path. | Good feedback |
Lane 1(Lane) | 3 | Lanes ‘Lane1’, ‘Lane2’, and ‘Lane3’ are defined but there is no enclosing Pool/Process indicated. Also several flow nodes (for example the Start Event ‘Customer registered’) are not assigned to any lane. BPMN best practice is to place lanes inside a pool and assign all flow nodes to the appropriate lane to convey responsibilities clearly. | Create an explicit Pool (Process) that contains the lanes. Assign every flow node to the correct lane (move ‘Customer registered’ and any other unassigned nodes into the appropriate lane). Ensure lane names reflect the responsible role/organization. | This is a very strict reading of the BPMN standards, so on that basis is correct. I wonder about adding an exception into the ‘rules’ for this query, so it ignores this? |
Gateway1 | 2 | The element name ‘Gateway1’ (and other generic names such as ‘Lane1’, ‘Lane2’, ‘DataStore1’) are generic identifiers. Bruce Silver and 7PMG guidelines recommend meaningful, business-oriented names to improve readability and maintainability. | Rename gateways, lanes and data stores to meaningful, business-oriented names (for example ‘Bad-customer handling gateway’ instead of ‘Gateway1’; lanes named by role like ‘Customer Service’, ‘Fraud Team’, etc.; data store named ‘Customer master store’). | Correct |
Customer Registered (Start Event) | The Start Event ‘Customer registered’ exists but is not placed inside any lane, and there is at least one process branch (via ‘Create new widget’) that does not terminate in an End Event. BPMN best practice is to ensure every process path from a Start Event reaches an End Event and that start/end events are properly assigned to lanes. | Assign ‘Customer registered’ to the appropriate lane. Ensure that every outgoing path from the Start Event reaches a properly defined End Event (add end events or connect remaining activities to existing end events). | I didn’t know this. But it’s exactly what ‘BPMN Method and Style’ says | |
Gateway 1 | 4 | The gateway ‘Gateway1’ follows ‘Remove bad customer’ and only has a single outgoing flow to ‘Create new widget’. Its purpose and type are unclear. Using a gateway with a single outgoing sequence flow is suspicious and often indicates an incorrect or unnecessary gateway, or a missing alternative flow. Gateways should reflect explicit branching/merging logic. | If no branching is required, remove ‘Gateway1’ and connect ‘Remove bad customer’ directly to ‘Create new widget’. If branching is intended, add the missing outgoing flows and appropriate conditions, and set the gateway type to match the intended semantics. | Correct |
Customer details (Data Store) | 2 | The data store ‘Customer details’ is shown with DataAssociations to activities ‘Evaluate customer’ and ‘Log customer details’, but the direction and intent of reads vs writes are not explicit. Bruce Silver recommends clearly indicating when data is read, updated or written, and using DataObjects vs DataStore appropriately. | Explicitly indicate the data association direction (data input vs data output) on each DataAssociation. Use a DataObject for transient process data and DataStore for persistent/shared data. Add annotations or documentation to show whether activities read or update ‘Customer details’. | This is another case where the Model was not given enough information in the data. Another reason to maybe use a higher-specification data collector. |
Editing the process, and re-running
Taking the advice from aiExpert, our improved process looks like this:
This time, we sent more data, using the ‘Detail’ data collector.