Skip to content

ancestor-descendant-participants

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

Severity: error · Since: v1.0.0

For the failing example below, archidocs check prints:

shop/services.yaml:29:28 error ancestor-descendant-participants Service "shop:cart" and its descendant "shop:cart-api" are both participants

The same example also reports missing-step.

A Dynamic View tells its scenario with each Element at one level. With a Service and one of its own Components both taking part, the same software appears twice in the sequence chart, and a reader can’t tell which of the two a Step really reaches.

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 }
  • ancestor-descendant-relationship: An Element is linked to its own ancestor or descendant.
  • missing-step: A Dynamic View Step has no Relationship or derived edge between from and to (nor a via subscription of to to from), or the named relationship doesn’t connect them.

Documents the beta branch at cd98671, ahead of the latest release, v1.4.0.