EventsSourcing-on-Azure-Functions icon indicating copy to clipboard operation
EventsSourcing-on-Azure-Functions copied to clipboard

[Example] Add cross-account bank transfers

Open MerrionComputing opened this issue 6 years ago • 6 comments

In the "bank account" example add a cross account transfer to show how the transaction itself can be backed by an event stream and that can be acted on as a form of saga.

MerrionComputing avatar Jan 30 '20 16:01 MerrionComputing

This could also demonstrate the idea of the causation identifier which would link the source withdrawal and the target deposit to the transfer command identifier.

MerrionComputing avatar Jan 30 '20 17:01 MerrionComputing

Events:-

  • Transfer initiated
  • Source funds withdrawn
  • Target funds deposited
  • Refund initiated
  • Source funds refunded
  • Refund failed

MerrionComputing avatar Mar 07 '21 17:03 MerrionComputing

Projections:-

  • Transfer State (Initiated -> Funded -> Transferred / Transfer Failed -> Refunded -> Refund failed)

MerrionComputing avatar Mar 07 '21 19:03 MerrionComputing

Classifications:-

  • Failed refunds (these might require manual intervention)

MerrionComputing avatar Mar 07 '21 20:03 MerrionComputing

Commands:-

  • Transfer money
  • Cancel in-progress transfer

MerrionComputing avatar Mar 08 '21 14:03 MerrionComputing

Queries:-

  • GetTransferState - Get the current state from the "Transfer State" projection

MerrionComputing avatar Mar 14 '21 10:03 MerrionComputing