Skip to content

Instantly share code, notes, and snippets.

@shortjared
Created July 28, 2020 18:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shortjared/fcdf51fd7fa49e58dc89e69d61ac863e to your computer and use it in GitHub Desktop.
Save shortjared/fcdf51fd7fa49e58dc89e69d61ac863e to your computer and use it in GitHub Desktop.
const definition = this.mapperTask()
.next(setPending)
.next(waitForNSeconds)
.next(setInProgress)
.next(this.deliverTransactionTask())
.next(
new Choice(this, 'Delivery success?)
.when(Condition.stringEquals(STATUS, COMPLETE), setComplete)
.when(Condition.stringEquals(STATUS, FAILED), setFailed)
.otherwise(setPending)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment