In the basic Fraud Detection project (see Chapter 2, Project Design Tutorial), one or optionally two Account instances are created on startup using startup rule functions.Startup rule functions execute on all active agents as they start up, unless you use application logic to perform a check before taking action.Three instances of the agent will now be deployed in three engines, so you must ensure that the Account instance or instances are created only once (otherwise runtime exceptions will occur).To do so, you will modify the InitializeAccounts rule to use a try catch block. The block will prevent concepts from being created if they already exist.Caching and Engine Concurrency (multi-engine) The design of your project must take multi-engine features and cache object management into account.How entities are shared between agents In a multi-engine configuration:
● Event instances are clustered between agents—they are not shared. That is, each event instance is present on only one agent in a group.
● Scorecards are not shared between agents. Each inference agent maintains its own set of scorecards and the values in each agent can differ.Avoiding concurrent changes As needed by the project, take care when making changes that affect the ontology instances to prevent another agent in the group from making concurrent changes. Read Designing With Multiple Active Inference Agents in TIBCO BusinessEvents User’s Guide for more details.
1.
System.debugOut("############### Created account ActA ################");
4. Similarly wrap the lines that create ActB, if you created this optional account (see Optional Exercise: Create a Concept Instance Using a Standard Function). The complete section for ActB is shown below (formatted to fit):
Note that you cannot copy the line beginning Instance.createInstance from the above code sample into the rule editor. If you have not created the account ActB, you can skip this step. If you want to add a second concept now, see Optional Exercise: Create a Concept Instance Using a Standard Function for instructions on adding a concept instance using the Instance.createInstance() function.
5. Click Apply.
6. Click the FDCache resource and select the Configuration tab.
7. In the File Location field, Specify a location and name for the EAR file. The tutorial uses C:\temp\FDCache.ear.
8. You should see the message "Enterprise Archive File has built correctly." If you do not, validate your project to identify and correct any errors and try again.
Copyright © TIBCO Software Inc. All Rights Reserved.