Retriable transactions are the zero-or-more saga steps after the pivot, where business-rule failures are no longer expected. If a transient technical failure occurs, the transaction can be invoked repeatedly until it succeeds. Because coordination does not need to handle failures for these steps, they can often run concurrently. section 9.2.2 section 9.2.3
Figure 9.4 A saga’s steps are grouped into three phases: zero or more compensatable transactions, which can be rolled back and so have a compensating transaction, a single pivot transaction, which is saga’s go/no-go point, and zero or more retriable transactions, which are transactions that are guaranteed to complete.
Use the three-phase model to locate retriable work: it follows the pivot transaction, after compensatable steps. section 9.2.2
Table 11.1 The definition of the FTGO Create Order Saga
Saga canvas |
|||
System operation: |
createOrder(…) |
||
Step |
Participant |
Transaction |
Compensating transaction |
1 |
Order Service |
(orderId, orderTotal) = createOrder(…) |
rejectOrder(orderId) |
2 |
Consumer Service |
verifyConsumer(…) |
- |
3 |
Kitchen Service |
createTicket(…) |
rejectTicket(…) |
4 |
Accounting Service |
authorizeCard(…) |
- |
5 |
Order Service |
approveOrder() |
- |
6 |
Kitchen Service |
approveTicket() |
- |
In the Create Order Saga, approving the order and ticket are retriable steps after credit-card authorization, the pivot. section 11.1.1
