Appearance
Common errors
This page lists mistakes that show up often when writing or editing PML, the compiler diagnostics they produce, and how to fix them. If your process does not compile, scan this page before guessing.
Diagnostics come at two severities. Errors stop the compile, so the graph does not update until they are fixed. Warnings do not: the process still compiles and renders, and the warning stays in the editor as a reminder.
No node with id 'X' (warning) - target id does not match any node
This is the most common PML diagnostic. It means a NEXT or AND is pointing at an id that does not exist. The usual cause is that the target was written as a short label or paraphrase of a node's description, not the exact id.
It is a warning, not an error. The process still compiles and the rest of the graph still renders. Nothing is drawn for the unknown id, and the connection pointing at it is left out. The reference keeps a warning squiggle in the editor until you declare the node. Declare it and both the node and its connection appear.
How identifiers work (short version)
- Implicit id = the node's description, exactly, in quotes.
EVENT 'Ignore the doorbell'has implicit id'Ignore the doorbell'. - Explicit id = a single unquoted token between the keyword and the description.
EVENT IgnoreDoor 'Ignore the doorbell'has explicit idIgnoreDoor. The description is no longer usable as an id once an explicit one is set.
Targets in NEXT and AND must be one of these — spelled the same way the node declared it.
Example of the mistake
pml
LANE User
START 'Start' NEXT
GATEWAY 'Choice' NEXT 'Open' 'Yes' AND 'IgnoreDoor' 'No'
EVENT 'Open the door' NEXT 'End'
EVENT 'Ignore the doorbell' NEXT 'End'
END 'End'Compiler warnings:
line 3, char 22: No node with id 'Open'
line 3, char 40: No node with id 'IgnoreDoor'The graph renders without 'Open' and 'IgnoreDoor' and without the two gateway branches leading to them, leaving the gateway with no outgoing connections. Both targets are paraphrases. The nodes declare themselves as 'Open the door' and 'Ignore the doorbell', so those exact strings (or explicit ids assigned to them) are what NEXT / AND have to use.
Fix 1 — use the node's exact description as the implicit id
pml
LANE User
START 'Start' NEXT
GATEWAY 'Choice' NEXT 'Open the door' 'Yes' AND 'Ignore the doorbell' 'No'
EVENT 'Open the door' NEXT 'End'
EVENT 'Ignore the doorbell' NEXT 'End'
END 'End'The quoted strings after NEXT and AND now match the descriptions of the declared nodes character-for-character.
Fix 2 — give the nodes explicit ids and reference those
pml
LANE User
START 'Start' NEXT
GATEWAY 'Choice' NEXT OpenDoor 'Yes' AND IgnoreDoor 'No'
EVENT OpenDoor 'Open the door' NEXT 'End'
EVENT IgnoreDoor 'Ignore the doorbell' NEXT 'End'
END 'End'Notice the ids are unquoted single tokens in every position — declaration and reference. Quoting them would turn them back into implicit-id lookups by description and fail.
Position after NEXT / AND: target first, edge label second
The syntax is NEXT target 'edge label' (and the same after AND). The first thing is always the node you are pointing at; the second is the optional label painted on the arrow. Flipping them is easy to do:
pml
GATEWAY 'Choice' NEXT 'Yes' 'Approve'Here 'Yes' is the target (the id of the next node) and 'Approve' is the edge label. Writing NEXT 'Approve' 'Yes' would make the compiler look for a node whose id is 'Approve'.
If you are not sure which is which: the target must correspond to a real node in the process; the edge label can be any text.
END cannot have a NEXT
pml
END 'End' NEXT 'Somewhere'END is a terminator; it has no outgoing flow. Remove the NEXT (and have another node point into the END instead).
An attachment connected across lanes
An attachment and every node its NEXT names belong to the same lane. Naming a node in another lane is an error. The graph does not render until it is fixed.
pml
LANE user1
START 'Start' NEXT
ACTIVITY 'Review' NEXT
LANE user2
ACTIVITY 'Archive' NEXT
END 'End'
DATA 'Form' NEXT 'Review'Compiler error:
line 9, char 17: Attachment 'Form' in lane user2 cannot connect to 'Review' in lane user1'Form' follows LANE user2 and belongs to user2. 'Review' belongs to user1. Collecting attachments at the end of a process puts every one of them in the lane declared last.
Fix - declare the attachment in the lane it belongs to
pml
LANE user1
START 'Start' NEXT
ACTIVITY 'Review' NEXT
DATA 'Form' NEXT 'Review'
LANE user2
ACTIVITY 'Archive' NEXT
END 'End'Repeating the lane keeps the attachments together at the end:
pml
LANE user1
START 'Start' NEXT
ACTIVITY 'Review' NEXT
LANE user2
ACTIVITY 'Archive' NEXT
END 'End'
LANE user1
DATA 'Form' NEXT 'Review'A gateway with more than three branch labels
A gateway carries at most three distinct link descriptions across its outgoing connections. Branches that repeat a description leave the gateway together, so the limit counts distinct descriptions, not connections. A fourth distinct description is an error.
pml
GATEWAY 'Choice' NEXT 'Approve' 'Yes' AND 'Reject' 'No' AND 'Hold' 'Maybe' AND 'Escalate' 'Later'Compiler error:
line 2, char 8: Gateway 'Choice' has 4 branch labels, the maximum is 3Fix - reuse a label, or split the decision over two gateways
pml
GATEWAY 'Choice' NEXT 'Approve' 'Yes' AND 'Reject' 'No' AND 'Hold' 'Maybe' AND 'Escalate' 'Maybe''Hold' and 'Escalate' share the 'Maybe' label and leave the gateway together.
Duplicate identifiers
Two nodes that resolve to the same id collide, even if one is explicit and the other implicit — they share a namespace. Typical cause: two START nodes (both implicitly called 'Start'), or two activities with the same description.
Assign explicit ids to disambiguate:
pml
START Customer 'Start' NEXT ...
START Supplier 'Start' NEXT ...See Identifiers for the full rules.