Chapter 2 Project Design Tutorial : Test the Application

Test the Application
Learning Points
Now that the engine is running, you will use the ActiveMatrix BusinessWorks to simulate data coming into the application from account activity. You can use this testing technique on other projects too.
For more details on defining ActiveMatrix BusinessWorks processes see TIBCO BusinessWorks Process Design Guide.
Task N Test the Application
1.
With the project open in TIBCO Designer, open the DebitAccount process (so you can see the activities within it), and then select the Tester tab (on the left).
Now you have entered the testing environment. Entering the testing environment starts a TIBCO ActiveMatrix BusinessWorks engine.
2.
Click the Supply Input Data to Starter () button. You see the Input Data dialog.
3.
Double click in the AccountId field and enter ActA.

 
Concepts.Account.Account("ActA" /*extId String */,
                         20000.0 /*Balance double */,
                         0 /*Debits double */,
                         "Normal" /*Status String */,
                         10000.0 /*AvgMonthlyBalance double */);

 
4.
Double-click in the Amount field, and enter 3000. This amount will be debited each time you run a job. Click OK to save and dismiss the window.
5.
6.
Click the Start Testing Viewed Process () button. You see the Select Processes to Load dialog:
7.
Select DebitAccount(Current) (if it is not selected) and click Load and Start Current.
In the command window look for the following message:
   [FraudDetection] ############## Debiting account <ActA> by
   <3000.0> dollars. New balance is <17000.0>
The project is set up to "suspend" accounts that incur more than three debit transactions over a two-minute rolling window, where the sum of the debits totals more than 80% of the average monthly balance of the account. The average monthly balance is set to $10,000. So the third debit of $3,000 within two minutes triggers the rule.
8.
Run more jobs to trigger the FraudDetection rule action. Run each job as follows:
a.
In the test panel click the TestProcess/DebitAccount.process process instance.
b.
When the rule conditions are met, you see a message like the following:
[FraudDetection] #### Account id <ActA> STATUS set to <Suspended>
 
CongratulationsYou have completed the tutorial!