Skip to content

Conversation

cicoyle
Copy link
Contributor

@cicoyle cicoyle commented May 29, 2025

Adding docs for a new workflow pattern: compensating workflows

I added a java example here. This is just a first pass implementation that could be improved upon, but wanted to document the new pattern

@hhunter-ms can you add a diagram to my PR and tweak it as you see fit?

cicoyle added 2 commits May 29, 2025 14:29
Signed-off-by: Cassandra Coyle <[email protected]>
Signed-off-by: Cassandra Coyle <[email protected]>
@msfussell
Copy link
Member

@marcduiker - Let's think over a diagram we could add into the docs and presentation deck

Copy link
Contributor

@marcduiker marcduiker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've created a diagram for this, but this will be part of another PR since I want to update all the workflow related diagrams #4679 .

Copy link
Member

@msfussell msfussell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marcduiker - Can you provide a diagram illustrating compensation?

Copy link
Member

@msfussell msfussell Jul 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use this to make the compensation examples consistent across all the programming language examples. Here is my suggestions for Task Chaining section

  1. Line 142 - in JS example add comment "# Apply custom compensation logic here
  2. In both the Java and Go examples add error handlers in the Task Chaining examples to show where to perform compensation with comment "// Apply custom compensation logic here"

  1. In all the code examples in this section let's add error handling with a comment to say "// Apply custom compensation logic here", for example in the parallel task execution etc. This way it forces users down the correct path.

@marcduiker
Copy link
Contributor

I've added the image in this PR. Let's merge that first so we can add it to the doc here.

@marcduiker marcduiker dismissed their stale review August 29, 2025 09:07

I've made the updates, no work from Cassie required.

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

Successfully merging this pull request may close these issues.

3 participants