Scenario

This tutorial implements these different scenarios:

Each of these scenarios is triggered by a different external event from an HTTP channel.

The create an account scenario is shown in Figure 1.1, “Create Account Scenario”. This scenario creates an account from information in the create account event if the account does not already exist.

Create Account Scenario

Figure 1.1. Create Account Scenario


The debit account scenario is shown in Figure 1.2, “Debit Account Scenario”. This scenario performs the following steps when a debit account event is received:

  1. If the account is disabled, no action is taken.

  2. Debit the account with the amount in the event. The maximum amount that will be debited is the current account balance.

  3. If the balance is now zero, disable the account.

  4. If fraud is detected, disable the account.

Debit Account Scenario

Figure 1.2. Debit Account Scenario


To establish whether fraud is suspected, the frequency, and amount of debits in a rolling time window is used. Fraud is suspected when either of the following criteria is met:

Accounts with suspected fraud are disabled.

The enable account scenario is shown in Figure 1.3, “Enable Account Scenario”. This scenario simply enables an account if it exists and is disabled when an enable account event is received.

Enable Account Scenario

Figure 1.3. Enable Account Scenario