The flows between services are realized by calling (consuming) routes and sending and receiving messages
Calling a route, or receiving a message, will serve as a trigger to call other routes or send messages
Calling a route is done by using the keyword consume followed by the service name, the resource name and the route name linked by dots
consume Bank.account.accountBalance
Listening for a message is done by using the keyword receive followed by the channel name and the message name linked by dots
receive InvoicePaymentChannel.invoicePaymentMessage
Sending a message is done by using the keyword send followed by the channel name and the message name linked by dots
send PaymentChannel.paymentMessage
Triggering the consumption of routes and the sending of messages
From the definition of a route it is possible to declare the consumption of routes or the sending of messages.
The call of this route will be considered as the trigger for the call of these routes and the sending of these messages
route payment{ url:"invoice/id:String/payment" request: InvoicePaymentDTO consume Bank.account.accountBalance send PaymentChannel.paymentMessage }
}
In the same way, from the declaration of the reception of a message, it is possible to declare the consumption of routes or the sending of messages.
Receiving this message will be considered as the trigger for the call of these routes and the sending of these messages
receive InvoicePaymentChannel.invoicePaymentMessage{ send PaymentChannel.paymentMessage }
An example
Service cooperation generated graph from Invoice service
Sequence diagram triggered by Invoice.invoices.invoices (payment route on ressource Invoices on service Invoice)