Skip to content
TheChatArchiveThe Chat Archive
o3-2025-04-16· OpenAIHugging Face LMArena Human Preference 140K

subgraph Phase 3: Case Processing Workflows (Analyst-Driven Decision Making) Error:…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Metallama-4-maverick-17b-128e-instruct’s answer.
  1. User

    subgraph Phase 3: Case Processing Workflows (Analyst-Driven Decision Making) Error: Parse error on line 26: ...rocessing Workflows (Analyst-Driven Deci

  2. 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:

    ────────────────────────────────────────────

    1. Give the sub-graph an ID and then a label
      ────────────────────────────────────────────
    subgraph Phase3["Phase 3: Case Processing Workflows (Analyst-Driven Decision Making)"]
        %% …nodes…
    end
    

    Here Phase3 is 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…
    end
    

    Either 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. 🎉

  3. 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 ----------------------^

  4. Assistant

    Mermaid’s classDef lines are the culprit this time – specifically the property
    stroke-dasharray: 5 5 (notice the space) and, depending on the renderer version, the unsupported property font-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:

    ────────────────────────────────────────────

    1. 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 classDef section the whole diagram parses and renders. 🎉

  5. 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; -----------------------^

  6. Assistant

    end is a reserved keyword in Mermaid (it’s what closes a subgraph), so when the parser encounters it in the line

    class 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 end line the same way (or delete it if you keep the default style), and the parse error disappears.

  7. 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 ----------------------^

  8. Assistant

    The parser is still unhappy because:

    1. You kept a classDef end … line. end is a reserved keyword → Mermaid thinks you’re closing a sub-graph, not declaring a class.
    2. The style line stroke-dasharray: 5 5 contains a space after the colon; many renderers choke on that.
    3. font-weight isn’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. 🎉

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.