Skip to content

ancestor-descendant-participants

Severity: error

An Element and its own ancestor are both participants of a Dynamic View.

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-placed
views:
dynamic:
purchase:
title: Purchase
participants: [cart]
steps:
- { from: web, to: cart-api }

Tell the scenario at one level: use the ancestor throughout, or its descendants throughout.

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-placed
views:
dynamic:
purchase:
title: Purchase
participants: [cart]
steps:
- { from: web, to: cart }