Skip to content

Instantly share code, notes, and snippets.

@aymericbouzy
Created August 25, 2021 13:26
Show Gist options
  • Save aymericbouzy/95a9fb768d7fa8deb57f06db1171ebcb to your computer and use it in GitHub Desktop.
Save aymericbouzy/95a9fb768d7fa8deb57f06db1171ebcb to your computer and use it in GitHub Desktop.
new Saga()
.do(lockResource)
.withCompensatingAction(unlockResource)
.then(processPayment)
.withCompensatingAction(cancelPayment)
.then(addBillingItem);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment