The sequence diagram below summarizes what happens when you exercise the completed tutorial project. You will learn more the details as you complete the tutorial steps.In summary: A debit message for a certain account arrives through a BusinessEvents channel. As a result, a Debit event is created and asserted into working memory, which triggers a rule to apply the debit to the account. The debit, combined with recent debits for that account, triggers the fraud detection rule to set the account status to "Suspended" and send out an alert. See Tutorial Scenario for details about what causes the status to become Suspended.
1. A debit message arriving through a BusinessEvents channel is transformed into a debit event. (At design time you create an event type for this purpose, with the appropriate properties.) The debit event instance is then asserted into working memory. This means that it is added to the Rete network, an in-memory network of objects based on the Rete algorithm which enables fast matching of facts with rule dependencies.
2. The presence of this new event in the working memory causes the inference engine to check for rules that are designed to be triggered when this event is asserted.
3. A Debit rule checks if the account status is "Suspended" and if not, debit the account balance by the debit amount. The rule then consumes the event. It is important to consume events when they are no longer needed so that they don’t trigger rules to fire when the conditions are met again.
4. A FraudDetection rule checks the recent account activity, stored as history of the Account concept, and the fraud detection criteria stored in a scorecard. The rule calculates if the frequency and amount of the debits signals fraud.
5. A CheckNegativeBalance rule checks the account balance after a debit and if it is negative (less than zero) the rule sets the account status to "Suspended." This rule is not triggered in the example shown, because the balance has not fallen below zero.
6. In the example shown above, fraud is detected. The rule sets the Account status to Suspended and it sends out an alert. In a real world scenario, this alert would go to the desktop of an employee for follow up. To keep the tutorial simple, the rule just prints a message to the console.
Copyright © TIBCO Software Inc. All Rights Reserved.