Skip to content

Recurring With Compensation #1199

Closed Answered by herme063
herme063 asked this question in Q&A
Discussion options

You must be logged in to vote

Alright, so it seems like I have to use saga:

builder
	.StartWith(ctx => ExecutionResult.Next())
	.Recur(data => TimeSpan.FromMinutes(5), _ => false)
	.Do(rec => rec
		.Saga(saga => saga
			.StartWith<Step1>()
			.WaitFor("Step1Completed", _ => "0")
			.Then<Step2>()
			.WaitFor("Step2Completed", _ => "0")
			.Then<Step3>())
		.CompensateWith<CleanUp>());

Cheers

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by herme063
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant