In the model, I have Send Task followed by Receive Task used for communicating with another microservice. Based on the output from the Receive Task, either re-trigger the Send Task once again or proceed further with the flow.
I have also defined a compensation for the Send Task. If the Send Task is executed twice, then on triggering the compensation flow, the compensation for the Send Task also gets triggered twice.
However I want the compensation for the Send Task to be executed only once irrespective of the number of times the Send Task gets executed, Could you please advise on how this can be achieved.