Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample request: Saga #33

Closed
cretz opened this issue Sep 27, 2023 · 3 comments · Fixed by #46
Closed

Sample request: Saga #33

cretz opened this issue Sep 27, 2023 · 3 comments · Fixed by #46
Labels
enhancement New feature or request

Comments

@cretz
Copy link
Member

cretz commented Sep 27, 2023

Describe the solution you'd like

Basically a simple saga sample following principles in other SDKs and outlined at https://temporal.io/blog/compensating-actions-part-of-a-complete-breakfast-with-sagas and https://temporal.io/blog/saga-pattern-made-easy

@cretz cretz added the enhancement New feature or request label Sep 27, 2023
@aboelkassem
Copy link
Contributor

aboelkassem commented Dec 11, 2023

Hi @cretz
I have created a very basic sample for Saga pattern here https://github.com/aboelkassem/temporal-saga-dotnet
please let me know if it satisfies your implementation guide to be added to the samples

It basically follows up saga sample in typescript

@cretz
Copy link
Member Author

cretz commented Dec 11, 2023

Sure! Feel free to submit a PR. It looks like there were many things added in yours such as having saga as a separate class, compensation complete/error callbacks, not log-then-swallowing compensation errors, etc. I think for a simple example we can just have the workflow maintain a set of compensations it loops over in reverse on error to be almost exactly like the TypeScript one.

@aboelkassem
Copy link
Contributor

Thanks @cretz for allowing me to contribute
please check my PR #46 and let me know your thoughts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants