I have some state in the saga and trying to implement status check retries until I get some satisfactory value in a message I receved.
Say, I have something like this:
.During(Pending,
When(StatusChecked)
.TransitionTo(somethingThatDependsOnStatusCheckedData)
I can only feed a specific state to TransitionTo
but I want it to transition depending on the received message content, is it possible?
For received message content, you can use the conditional expression on the When
clause.
During(Pending,
When(StatusChecked, context => context.Data.IsMessageCondition)
.Then(...));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With