incubator-seata-go
incubator-seata-go copied to clipboard
Compensatory and forward operations in seata-go Saga
This is a subtask under the #618
Description:
This feature request involves implementing compensatory and forward operations for the state machine. In the current Java implementation, part of the compensatory logic resides in the CompensateTriggerHandler. In seata-go, we won't initially implement the CompensateTrigger state but instead externalize the corresponding logic.
Implementation Details:
1. Compensatory Operation:
- Externalize compensatory logic from the
CompensateTriggerHandler. In the initial phase, avoid implementing theCompensateTriggerstate but focus on preparing the groundwork for compensatory operations.
2. Forward Operation:
- Implement forward operations for the state machine. The relevant code is concentrated within
StateMachineEngine#forwardin the Java implementation.
Next Steps:
-
Compensatory Operation:
- Externalize the compensatory logic from the
CompensateTriggerHandler. While postponing the implementation of theCompensateTriggerstate, ensure that the groundwork for compensatory operations is established.
- Externalize the compensatory logic from the
-
Forward Operation:
- Implement the forward operations for the state machine. Refer to the logic present in
StateMachineEngine#forwardin the Java codebase for guidance.
- Implement the forward operations for the state machine. Refer to the logic present in
By following these steps, we aim to introduce compensatory and forward operations in the seata-go state machine. Externalizing compensatory logic and implementing forward operations will contribute to the overall functionality of the state machine.