{
    "schemaVersion": "2.0",
    "diagramKind": "sequence",
    "id": "editorial-request-sequence",
    "title": "Editorial request interaction",
    "language": "en",
    "nodes": [
        {
            "id": "client",
            "type": "lifeline",
            "title": "Editor",
            "occurrenceIds": [
                "c1",
                "c2",
                "c3",
                "c4",
                "c5"
            ]
        },
        {
            "id": "service",
            "type": "lifeline",
            "title": "Editorial API",
            "occurrenceIds": [
                "s1",
                "s2",
                "s3",
                "s4",
                "s5",
                "s6",
                "s7"
            ]
        },
        {
            "id": "worker",
            "type": "lifeline",
            "title": "Render worker",
            "occurrenceIds": [
                "w1",
                "w2",
                "w3",
                "w4"
            ]
        }
    ],
    "fragments": [
        {
            "id": "result-alt",
            "type": "combined-fragment",
            "operator": "alt",
            "title": "Validation result",
            "operands": [
                {
                    "id": "approved",
                    "guard": "[approved]",
                    "occurrenceIds": [
                        "s2",
                        "w1",
                        "w2",
                        "s3"
                    ]
                },
                {
                    "id": "rejected",
                    "guard": "[rejected]",
                    "occurrenceIds": [
                        "s4",
                        "c2"
                    ]
                }
            ]
        },
        {
            "id": "notify-opt",
            "type": "combined-fragment",
            "operator": "opt",
            "title": "Notification",
            "operands": [
                {
                    "id": "notify",
                    "guard": "[subscribed]",
                    "occurrenceIds": [
                        "s6",
                        "c4"
                    ]
                }
            ]
        },
        {
            "id": "followup-par",
            "type": "combined-fragment",
            "operator": "par",
            "title": "Follow-up",
            "operands": [
                {
                    "id": "audit",
                    "occurrenceIds": [
                        "s7",
                        "w3"
                    ]
                },
                {
                    "id": "receipt",
                    "occurrenceIds": [
                        "w4",
                        "c5"
                    ]
                }
            ]
        }
    ],
    "edges": [
        {
            "id": "request",
            "type": "sync-message",
            "from": "client",
            "to": "service",
            "title": "Submit request",
            "sendOccurrenceId": "c1",
            "receiveOccurrenceId": "s1"
        },
        {
            "id": "render",
            "type": "sync-message",
            "from": "service",
            "to": "worker",
            "title": "Render",
            "sendOccurrenceId": "s2",
            "receiveOccurrenceId": "w1"
        },
        {
            "id": "rendered",
            "type": "return-message",
            "from": "worker",
            "to": "service",
            "title": "Artifacts",
            "sendOccurrenceId": "w2",
            "receiveOccurrenceId": "s3",
            "replyTo": "render"
        },
        {
            "id": "rejected",
            "type": "async-message",
            "from": "service",
            "to": "client",
            "title": "Reject",
            "sendOccurrenceId": "s4",
            "receiveOccurrenceId": "c2"
        },
        {
            "id": "response",
            "type": "return-message",
            "from": "service",
            "to": "client",
            "title": "Result",
            "sendOccurrenceId": "s5",
            "receiveOccurrenceId": "c3",
            "replyTo": "request"
        },
        {
            "id": "notify",
            "type": "async-message",
            "from": "service",
            "to": "client",
            "title": "Notify",
            "sendOccurrenceId": "s6",
            "receiveOccurrenceId": "c4"
        },
        {
            "id": "audit",
            "type": "async-message",
            "from": "service",
            "to": "worker",
            "title": "Audit",
            "sendOccurrenceId": "s7",
            "receiveOccurrenceId": "w3"
        },
        {
            "id": "receipt",
            "type": "async-message",
            "from": "worker",
            "to": "client",
            "title": "Receipt",
            "sendOccurrenceId": "w4",
            "receiveOccurrenceId": "c5"
        }
    ]
}
