return-on-async
A Dynamic View return Step resolves to an async Relationship, which has no reply.
Severity: error · Since: v1.0.0
What check reports
Section titled “What check reports”For the failing example below, archidocs check prints:
shop/services.yaml:28:11 error return-on-async Relationship "shop:mailer → shop:orders" is async, so it has no return; model a callback as its own RelationshipAn async Relationship doesn’t wait for an answer, so there is no reply to draw. If the other side calls back later, that is a Relationship of its own and belongs in the Model.
Failing example
Section titled “Failing example”shop/services.yaml:
services: web: name: Web relationships: - to: cart cart: name: Cart components: cart-api: name: Cart API orders: name: Orders events: name: Events type: broker mailer: name: Mailer relationships: - to: orders interaction: async via: events channel: order-placedviews: dynamic: purchase: title: Purchase steps: - { from: orders, to: mailer, return: true }Remove the return Step, or model the callback as a Relationship of its own and add a Step for it.
shop/services.yaml:
services: web: name: Web relationships: - to: cart cart: name: Cart components: cart-api: name: Cart API orders: name: Orders events: name: Events type: broker mailer: name: Mailer relationships: - to: orders interaction: async via: events channel: order-placedviews: dynamic: purchase: title: Purchase steps: - { from: orders, to: mailer }Related rules
Section titled “Related rules”return-without-relationship: A Dynamic View return Step has no Relationship the other way, from itstoto itsfrom.via-on-sync:viaorchannelon a sync Relationship.
Documents the beta branch at cd98671, ahead of the latest release, v1.4.0.