Skip to content

Add Compensation Workflow Pattern Example #1550

@cicoyle

Description

@cicoyle

Similar to this compensation workflow pattern example in the java sdk, we should have an example of how to do compensation logic in dotnet.

Here is the example code.
Here is the readme for it.
Here are the docs for it.

We can still improve it after the fact, but we should have a clear example how users can implement this workflow pattern.

We can eventually add something like the following, but in dotnet:

ctx.CallActivityWithCompensation(ctx, 
        "BookFlight", nil,
        "CancelFlight", nil)
if err != nil {
        // Compensate
        return err
    }

The ask for now is to simply show users how they can implement this pattern in an example.

RELEASE NOTE:
ADD Workflow Compensation Pattern Example

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @WhitWaldo@cicoyle

      Issue actions

        Add Compensation Workflow Pattern Example · Issue #1550 · dapr/dotnet-sdk