restatedev / examples

Restate examples
https://restate.dev
MIT License
45 stars 9 forks source link

Add compensations example to Typescript and Java patterns #73

Closed tillrohrmann closed 10 months ago

tillrohrmann commented 10 months ago

This PR adds an example for how to use compensations to leave the system in a consistent state in the presence of terminal exceptions (cancellations and deliberate usage of it). The example was added to the TS patterns and the newly created Java patterns. The compensations example is based on restatedev/restate-holiday.

This fixes #52.

tillrohrmann commented 10 months ago

Thanks a lot for your review @gvdongen, @slinkydeveloper and @pcholakov. I've addressed your comments. Will merge the PR once GHA gives green light.