Package io.dapr.workflows.saga
Class Saga
java.lang.Object
io.dapr.workflows.saga.Saga
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Compensate all registered activities.void
registerCompensation
(String activityClassName, Object activityInput) Register a compensation activity.void
registerCompensation
(String activityClassName, Object activityInput, com.microsoft.durabletask.TaskOptions taskOptions) Register a compensation activity.
-
Constructor Details
-
Saga
Build up a Saga with its options.- Parameters:
option
- Saga option.
-
-
Method Details
-
registerCompensation
Register a compensation activity.- Parameters:
activityClassName
- name of the activity classactivityInput
- input of the activity to be compensated
-
registerCompensation
public void registerCompensation(String activityClassName, Object activityInput, com.microsoft.durabletask.TaskOptions taskOptions) Register a compensation activity.- Parameters:
activityClassName
- name of the activity classactivityInput
- input of the activity to be compensatedtaskOptions
- task options to set retry strategy
-
compensate
Compensate all registered activities.- Parameters:
ctx
- Workflow context.
-