Class ChoreographySpec

java.lang.Object
com.tnsai.coordination.choreography.ChoreographySpec

public final class ChoreographySpec extends Object
Declarative specification of agent interactions for choreography-based coordination. Unlike orchestration (centralized control), choreography defines decentralized rules where each agent reacts to events autonomously.

Example usage:


 ChoreographySpec spec = ChoreographySpec.builder("order-processing")
     .initialEvent("order.placed")
     .interaction("validate", "system", "validator", "order.placed", "order.validated", "Validate order")
     .interaction("charge", "validator", "billing", "order.validated", "payment.done", "Charge payment")
     .interaction("ship", "billing", "shipper", "payment.done", "order.shipped", "Ship order")
     .build();