subgraph Phase 3: Case Processing Workflows (Analyst-Driven Decision Making) Error:…
- User
subgraph Phase 3: Case Processing Workflows (Analyst-Driven Decision Making) Error: Parse error on line 26: ...rocessing Workflows (Analyst-Driven Deci
- Assistant
Mermaid is very picky about the “header” line of a sub-graph:
• Whatever comes right after subgraph is treated as an identifier (like a variable name).
• That identifier must be a single “word” (no spaces, colons, parentheses, dashes, etc.) unless it is wrapped in quotes or you separate the identifier and the human-readable label.Your current line
subgraph Phase 3: Case Processing Workflows (Analyst-Driven Decision Making)contains spaces, a colon, and parentheses → Mermaid stops and throws the parse error you’re seeing.
Two clean ways to fix it:
────────────────────────────────────────────
- Give the sub-graph an ID and then a label
────────────────────────────────────────────
subgraph Phase3["Phase 3: Case Processing Workflows (Analyst-Driven Decision Making)"] %% …nodes… endHere
Phase3is the internal ID; the text in brackets is the label that shows in the diagram.──────────────────────────────────────────── 2) Quote the whole thing (v10+ syntax)
────────────────────────────────────────────subgraph "Phase 3: Case Processing Workflows (Analyst-Driven Decision Making)" %% …nodes… endEither approach eliminates the illegal characters in the identifier and Mermaid will parse it.
Drop one of those into your full script and the “Parse error on line 26” disappears. 🎉
- Give the sub-graph an ID and then a label
- User
graph TD %% Define Nodes with clear labels subgraph Phase 1: Application Intake & Initial Fingerprint Submission A["1.1 Applicant/Agency Submits Application (Experience Cloud Portal)"] --> B{"1.1 System Creates Applicant Profile (Public Sector Solutions)"}; B --> C["1.2 Applicant Receives Live Scan Instructions (Experience Cloud Portal / Email)"]; C --> D["1.2 Applicant Goes to Live Scan Center (External Action)"]; end
subgraph Phase 2: Fingerprint Results & Initial System Processing D --> E{"2.1 Fingerprint Results Received by CPMS <br/> (MuleSoft Integration)"}; E --> F{"2.1 System Attaches Results to Profile <br/> (Salesforce Automation)"}; F --> G{"2.1 Auto-Run AARS Check <br/> (MuleSoft Integration)"}; G -- "No AARS Match <br/> & No Criminal History" --> H["2.2 Auto-Clear Case <br/> (Agentforce / Flow)"]; H --> I["2.2 Auto-Generate & Deliver Clearance Letter <br/> (DocuSign Gen / Digital Engagement)"]; H --> J["2.2 Update Case Status: 'Cleared to Work' <br/> (Salesforce Flow)"]; G -- "Full/Partial AARS Match" --> K["2.3 Assign to Registry Research Unit (RRU) <br/> (Service Cloud Queue)"]; F -- "Fingerprints Rejected by DOJ/FBI" --> P["2.4 Auto-Generate Rejection Notice & Instructions <br/> (DocuSign Gen / Digital Engagement)"]; P --> Q["2.4 Applicant Resubmits Fingerprints (Back to Phase 1/D)"]; F -- "Criminal History Found <br/> & No AARS Match" --> L["2.3 Interpret Criminal History & Sort Case Type <br/> (Agentforce / Flow)"]; L --> M["2.3 Assign to Relevant Case Processing Unit <br/> (Service Cloud Queue)"]; end subgraph "Phase 3: Case Processing Workflows (Analyst-Driven Decision Making)" J --> Z1("Case Concluded (Cleared)"); K --> N["3.3 RRU Analyst Reviews AARS Match <br/> (AARS Integration)"]; M --> O["3.2 Analyst Reviews Case <br/> (Standard Exemption/CACI)"]; N --> P1{"3.3 Decision: True AARS Match?"}; O --> P2{"3.2 Investigation & Legal Review"}; P1 -- "No True Match <br/> & No Criminal History" --> I1["Auto-Clear & Letter (via 2.2 I)"]; P1 -- "No True Match <br/> & With Criminal History" --> M1["Assign to Case Processing Unit (via 2.3 M)"]; P1 -- "True Match" --> N1["3.3 Review Prior Admin Action & Determine Status"]; P2 -- "Legal Recommends Clearance" --> I2["Clearance Letter (via 3.2 I)"]; P2 -- "Legal Recommends Negative Outcome" --> O1["3.2 Statement of Facts Workflow <br/> (Salesforce Approvals / Flow)"]; N1 --> R1["3.3 Send AARS Outcome Letter"]; O1 --> S1["3.2 Generate Legal Case Tracking # & Update LCTS <br/> (MuleSoft Integration)"]; S1 --> T1["3.2 Send Decision Letter (Negative)"]; R1 --> Z2("Case Concluded (AARS Decision)"); T1 --> Z3("Case Concluded (Negative Decision)"); M -- "DSS Clearance/Simplified" --> U["3.1 Analyst Auto-Generates Clearance Letter"]; U --> V["3.1 Update Status: 'Cleared to Work'"]; V --> Z4("Case Concluded (DSS/Simplified)"); M -- "Mixed Case" --> W["3.4 Assign to Multiple Units for Parallel Review"]; W --> X{"3.4 Compile Final Decision <br/> (Complex Logic)"}; X -- "Clearance" --> V1["Update Status: 'Cleared to Work' (via 3.1 V)"]; X -- "Negative" --> T11["Send Decision Letter (Negative) (via 3.2 T1)"]; M -- "Conditional Exemption" --> Y["3.5 Set Up Conditional Approval"]; Y --> Y1["Transfer Conditions with Exemption"]; Y1 --> Z5("Case Concluded (Conditional)"); M -- "Transfer Exemption" --> Z["3.6 Process Transfer Request"]; Z --> Z_1["Apply Transfer Rules & Notify"]; Z_1 --> Z6("Case Concluded (Transfer)"); M -- "IHSS Workflow" --> Z_2["3.7 IHSS Application Review & Decision"]; Z_2 --> Z_3["Generate IHSS Outcome Letter"]; Z_3 --> Z7("Case Concluded (IHSS)"); end %% Legend classDef subprocess fill:#f9f,stroke:#333,stroke-width:2px; classDef decision fill:#ccf,stroke:#333,stroke-width:2px,stroke-dasharray: 5 5; classDef external fill:#afa,stroke:#333,stroke-width:2px; classDef system fill:#ddf,stroke:#333,stroke-width:2px; classDef end fill:#ffb,stroke:#333,stroke-width:2px,font-weight:bold; class A,B,C,E,F,G,H,I,J,K,L,M,N,O,P,P1,P2,N1,O1,S1,U,V,W,X,Y,Y1,Z,Z_1,Z_2,Z_3 system; class D external; class Z1,Z2,Z3,Z4,Z5,Z6,Z7 end;Error: Parse error on line 74: ...th:2px classDef end fill:#ffb,stroke ----------------------^
- Assistant
Mermaid’s
classDeflines are the culprit this time – specifically the property
stroke-dasharray: 5 5(notice the space) and, depending on the renderer version, the unsupported propertyfont-weight.
Mermaid treats the space as the beginning of a new token, so the next word (classDef) is read as if it were still part of the style block → parse error.Two quick ways to solve it:
────────────────────────────────────────────
- Remove the problematic style bits ────────────────────────────────────────────
%% <<< keep all of your diagram content above >>> %% Legend / styling -------------------------- classDef subprocess fill:#f9f,stroke:#333,stroke-width:2px; classDef decision fill:#ccf,stroke:#333,stroke-width:2px; %% <- no dasharray classDef external fill:#afa,stroke:#333,stroke-width:2px; classDef system fill:#ddf,stroke:#333,stroke-width:2px; classDef end fill:#ffb,stroke:#333,stroke-width:2px; %% <- no font-weight──────────────────────────────────────────── 2) Keep dash-array, but quote the value (no spaces inside) ────────────────────────────────────────────
classDef decision fill:#ccf,stroke:#333,stroke-width:2px,stroke-dasharray:5 5;(or
stroke-dasharray:5;if you just want a dashed outline)Most Mermaid renderers are fine with the five properties below; anything outside that can throw errors:
• fill • color • stroke • stroke-width • stroke-dasharray
font-weight,font-size, etc. are ignored (or error) in many versions.Once you trim / fix the
classDefsection the whole diagram parses and renders. 🎉 - User
class A,B,C,E,F,G,H,I,J,K,L,M,N,O,P,P1,P2,N1,O1,S1,U,V,W,X,Y,Y1,Z,Z_1,Z_2,Z_3 system; class D external; class Z1,Z2,Z3,Z4,Z5,Z6,Z7 end;
Error: Parse error on line 72: ...1,Z2,Z3,Z4,Z5,Z6,Z7 end; -----------------------^
- Assistant
endis a reserved keyword in Mermaid (it’s what closes a subgraph), so when the parser encounters it in the lineclass Z1,Z2,Z3,Z4,Z5,Z6,Z7 end;it thinks you’re accidentally trying to close something rather than assign a class.
Solution: use any other word as the class name—e.g.,terminus,finished,done, etc.%% --- Class definitions --- classDef terminus fill:#ffb,stroke:#333,stroke-width:2px; %% --- Class assignments --- class A,B,C,E,F,G,H,I,J,K,L,M,N,O,P,P1,P2,N1,O1,S1,U,V,W,X,Y,Y1,Z,Z_1,Z_2,Z_3 system; class D external; class Z1,Z2,Z3,Z4,Z5,Z6,Z7 terminus;Rename the
classDef endline the same way (or delete it if you keep the default style), and the parse error disappears. - User
%% Legend classDef subprocess fill:#f9f,stroke:#333,stroke-width:2px; classDef decision fill:#ccf,stroke:#333,stroke-width:2px,stroke-dasharray: 5 5; classDef external fill:#afa,stroke:#333,stroke-width:2px; classDef system fill:#ddf,stroke:#333,stroke-width:2px; classDef end fill:#ffb,stroke:#333,stroke-width:2px,font-weight:bold;
class A,B,C,E,F,G,H,I,J,K,L,M,N,O,P,P1,P2,N1,O1,S1,U,V,W,X,Y,Y1,Z,Z_1,Z_2,Z_3 system; class D external; class Z1,Z2,Z3,Z4,Z5,Z6,Z7 terminus;
Error: Parse error on line 75: ...th:2px classDef end fill:#ffb,stroke ----------------------^
- Assistant
The parser is still unhappy because:
- You kept a
classDef end …line.endis a reserved keyword → Mermaid thinks you’re closing a sub-graph, not declaring a class. - The style line
stroke-dasharray: 5 5contains a space after the colon; many renderers choke on that. font-weightisn’t allowed in classDef in most Mermaid versions.
Fix = rename the class, trim the style, and update the class assignment.
%% ───────── Legend / style definitions ───────── classDef subprocess fill:#f9f,stroke:#333,stroke-width:2px; classDef decision fill:#ccf,stroke:#333,stroke-width:2px,stroke-dasharray:5 5; %% ← no space after colon classDef external fill:#afa,stroke:#333,stroke-width:2px; classDef system fill:#ddf,stroke:#333,stroke-width:2px; classDef terminus fill:#ffb,stroke:#333,stroke-width:2px; %% ← renamed, no font-weight%% ───────── Class assignments ───────── class A,B,C,E,F,G,H,I,J,K,L,M,N,O,P,P1,P2,N1,O1,S1,U,V,W,X,Y,Y1,Z,Z_1,Z_2,Z_3 system; class D external; class Z1,Z2,Z3,Z4,Z5,Z6,Z7 terminus;With
terminus(or any name that isn’t a reserved word) and the cleaned-up styles, the diagram parses and renders correctly. 🎉 - You kept a
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.