Messages, activations, and lifecycles
| Message | Meaning and appearance |
|---|---|
| sync | Synchronous call; filled arrowhead. |
| async | Asynchronous message; open arrowhead. |
| return | Return message; dashed line and open arrowhead. |
| create | Introduces the destination at its first header. |
| destroy | Ends the destination lifeline with a termination marker. |
message Request Portal -> Auth sync "Validate credentials" { protocol "HTTPS" }Equal endpoints produce a self-message for sync, async, or return. Create/destroy require distinct endpoints. A participant introduced by create is unavailable before creation, and cannot receive messages after destruction.
Activation spans are explicit: activate Work Api starts a span, and deactivate Done Work closes it. Close nested activations in reverse order. Adding an activation span creates both events; Reveal in source helps place its closing event around the intended work.
The worker begins at Start worker and ends at Release worker. Toggle bottom headers: surviving Client and API repeat; the destroyed Worker does not. Show all also reveals the status detail owned by Check completion status. Scroll inside the diagram to see its full size. These previews use the editor’s actual layout and SVG renderer.
Read the complete AAL
aal sequence "0.1" dictionary "0.1.0"
interaction Jobs "Background job" {
participant Client "Client" { type actor }
participant Api "Jobs API" { type api icon "/deployment-icons/generic/integration.svg" }
participant Worker "Job worker" { type service }
sequence Run "Create and complete a job" {
participants [Client, Api, Worker]
message Submit Client -> Api sync "Submit job"
message Spawn Api -> Worker create "Start worker"
activate Work Worker
message Process Worker -> Worker sync "Process input"
message Result Worker -> Api return "Result ready"
deactivate Done Work
message Stop Api -> Worker destroy "Release worker"
message Respond Api -> Client return "Job complete"
message Check Client -> Api sync "Check completion status" { detail Status }
}
sequence Status "Check status" {
participants [Client, Api]
message Query Client -> Api sync "Read job status"
note Cached right [Api] "Status is cached independently of the worker"
message Reply Api -> Client return "Completed"
}
}
Fragments, guards, notes, and references
| Construct | Authoring rule |
|---|---|
| alt / else | Guarded alternatives, with optional final else. |
| opt | One optional branch. |
| loop | One repeated branch; preserve its entry lifetime state. |
| par | At least two parallel branches without conflicting lifecycle changes. |
| critical | One branch describing exclusive work. |
| break | One conditional exit; later events describe the non-breaking path. |
| note | Beside one participant, or over one or more participants. |
| ref | A named interaction frame, without a navigation link. |
Guards describe conditions; they are not executable expressions. Branch activation pairs must close within their branch. Continuing alternatives must agree on lifetimes; optional and break branches preserve entry state. Fragment nesting is independent of L1–L3 hierarchy depth.
Select a fragment to edit its guard labels, add an alt/par branch, or remove a branch. Select an event and use Move into branch to choose a readable destination. Invalid moves are rejected without changing the diagram.
Follow the branch compartments to distinguish alternatives, parallel work, optional receipts, retries, exclusive work, and cancellation. Scroll to see the complete sequence. Scroll inside the diagram to see its full size. These previews use the editor’s actual layout and SVG renderer.
Read the complete AAL
aal sequence "0.1" dictionary "0.1.0"
interaction Checkout "Checkout" {
participant Buyer "Buyer" { type actor }
participant Api "Checkout API" { type api }
participant Events "Order Events" { type queue }
sequence Order "Place an order" {
participants [Buyer, Api, Events]
message Place Buyer -> Api sync "Place order"
activate Processing Api
fragment Validation alt "Validate basket" {
branch Valid "basket valid" {
message Publish Api -> Events async "Order placed"
note Delivery over [Api, Events] "Asynchronous delivery"
}
else Invalid { message Reject Api -> Buyer return "Validation errors" }
}
fragment Work par "Independent work" {
branch Audit "audit" { message AuditEvent Api -> Events async "Audit" }
branch Metrics "metrics" { message Count Api -> Api sync "Count order" }
}
fragment Optional opt "Receipt" { branch Requested "requested" { ref Receipt [Api, Buyer] "Send receipt" } }
fragment Retry loop "Retry delivery" { branch Attempts "up to three attempts" { message RetryEvent Api -> Events async "Retry pending event" } }
fragment Exclusive critical "Finalize" { branch Lock "exclusive" { message Finalize Api -> Api sync "Finalize order" } }
deactivate Finished Processing
fragment Exit break "Stop on cancellation" { branch Cancelled "cancelled" { note Stop over [Buyer, Api] "Interaction ends here when cancelled" } }
message Complete Api -> Buyer return "Order confirmed"
}
}