Skip to content
This repository was archived by the owner on Jan 10, 2024. It is now read-only.
This repository was archived by the owner on Jan 10, 2024. It is now read-only.

Syntax error in WebSequence diagrams #76

@jgwinner

Description

@jgwinner

Description

I'm not sure if this is a bug in mermaid, an issue with my DSL, or a bug in the exporter.

When I generate a WebSequence export, the lines look like this:

title ANS - Dynamic - AllFlows

actor <<Person>>\nAPI User as API User
participant <<Component>>\nAPI Gateway as API Gateway
participant <<Component>>\nManages Event definition as Manages Event definition

Yet in Notion.so, it generates this error:

Unknown error: Error: Lexical error on line 5. Unrecognized text.
... - AllFlows"actor <<Person>>\nAPI User
_______________________^

If I fix that by removing <<Person>>\n it'll generate the same errors for <<Component>>\n

Is this a Mermaid bug, or a Structurizr issue?

Also, I find Structurizr uses -> when I think the expectation is ->> and -->> but maybe that's me?

Steps to reproduce

  1. Create a Structurizr dynamic view.
  2. Export via structurizr.sh export -w ANS.dsl -f websequencediagrams
  3. Create a Mermaid code block in Notion.so
  4. type 'sequenceDiagram' and press enter.
  5. Paste in the *.wsd file from step 2

Screenshot

image

Fixing that gives:

image

Code sample

workspace "test WebSequence" {

    model {
        customer = person "Customer"
        onlineBookStore = softwareSystem "Online book store" {
            webapp = container "Web Application"
            database = container "Database"
        }

        customer -> webapp "Browses and makes purchases using"
        webapp -> database "Reads from and writes to"
    }

    views {
        
        dynamic onlineBookStore {
            title "Request past orders feature"
            customer -> webapp "Requests past orders from"
            webapp -> database "Queries for orders using"
            autoLayout lr
        }
    }
    
}

Configuration

structurizr-cli: 1.33.1
structurizr-java: 1.26.1
structurizr-dsl: 1.32.0
structurizr-export: 1.16.1
structurizr-import: v1.5.0
Java: 11.0.20.1/Homebrew (/opt/homebrew/Cellar/openjdk@11/11.0.20.1/libexec/openjdk.jdk/Contents/Home)
OS: Mac OS X 14.0 (aarch64)

Severity

Minor

Priority

Low

Resolution

I have no budget and there's no rush, please fix this for free

More information

I might be able to fix myself, but we may be subscribing to the cloud service anyway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions