Skip to content

Instantly share code, notes, and snippets.

@aleksandar-b
Last active April 1, 2022 11:58
Show Gist options
  • Save aleksandar-b/9bdcaf0556cf10875994b7c85d7f7f4d to your computer and use it in GitHub Desktop.
Save aleksandar-b/9bdcaf0556cf10875994b7c85d7f7f4d to your computer and use it in GitHub Desktop.
// cause => effect
user()
.correlationId('userId')
.stateOfAffairs(UserHasRegistered).causes(KycVerified)
.stateOfAffairs(UserHasRegistered,KycVerified).causes(AccountCreated)
.stateOfAffairs(UserHasRegistered,KycVerified,AccountCreated).causes(UserHasTopUp)
.stateOfAffairs(UserHasRegistered,KycVerified,AccountCreated,UserHasTopUp).causes(CreditCardCreated)
.stateOfAffairs(UserHasRegistered,KycVerified,AccountCreated,UserHasTopUp,CreditCardCreated).causes(OnboardFinished)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment