Chapter 2 Project Design Tutorial : Validate the Project, Configure and Build the Archive

Validate the Project, Configure and Build the Archive
Learning Points
In this task you turn your attention to deployment configuration. You configure an Enterprise Archive Resource (EAR) and a BusinessEvents Archive Resource (BAR).
What is a BusinessEvents Archive (BAR)?  A BAR contains all the deploytime data for one agent in a BusinessEvents project.
Multiple Agents (Rule Sessions) in an EAR  Each BAR in an EAR deploys as one inference agent. You would configure each BAR as appropriate for each inference agent’s needs.
What do you configure in a BAR?  When you configure an inference agent’s BAR for deployment, you can make various choices based on the resources in the project. If there are multiple BARs you can configure each one differently, according to need. Configuration choices determine the following:
What kind of object management to implement. Object management is a large topic and the most commonly used option is covered in Chapter 3, Cache Object Management Tutorial. For this tutorial, use the default option, In Memory, which means that objects are kept in memory only and are not persisted when the engine stops.
What is an event preprocessor?  A preprocessor is a rule function that processes incoming messages before BusinessEvents transforms them into Events. For example, a preprocessor might filter the messages so that only certain ones are used as events. Preprocessors are multi-threaded and you can choose from various threading and queue options, as appropriate to handle the work load. By default the threading uses the system-wide shared queue and threads. See the topic Working With Event Preprocessors in TIBCO BusinessEvents User’s Guide.
Task K Validate the Project, Configure and Build the Archive
1.
As you did in Task D, Validate the Project and Set a Default Event for a Destination, click the Validate All () button and validate the project to ensure that you haven’t introduced any errors since your last check. Remember that warnings do not necessarily indicate a problem. Correct any issues before continuing.
2.
Click the root folder to display the top level folders in the design panel, then right-click in the design panel, and select Add Resource > General > Enterprise Archive. BusinessEvents names it automatically based on the project name, FraudDetection.
3.
In the File Location field, specify the path to the EAR file and its name, for example, C:\temp\FraudDetection.ear. Click Apply. Your display should look similar to this:
4.
A Shared Archive (SAR) resource is added automatically. It contains resources that are available to the deployed application, such as a custom cache configuration file or a JDBC connection resource.
5.
Right-click in the design panel, and select Add Resource > BusinessEvents Workbench > BusinessEvents Archive.
6.
Name the BusinessEvents Archive resource (BAR) FraudDetection. In the Type field, select Inference, and click Apply.
7.
Select the Input Destinations tab. In the row for the URI /Channels/RV.channel/DebitTransaction, check the Enable checkbox. After deployment, BusinessEvents listens for messages from this destination and transforms them into events.
Another way to enable the DebitTransaction destination is to select Defaults in the Listener Set area. This option is useful if the project has several destinations and you just want to enable all the default destinations.
BusinessEvents checks the Default column if the default event for that destination is used in a rule set selected for deployment on the RuleSets tab.
8.
Now configure the InitializeAccount rule function to execute on startup. Select the Startup/Shutdown tab and in the Startup Actions area, click the Add () button. In the Select a Resource dialog, select InitializeAccount. Click OK to dismiss the dialog, then click Apply and save the project.
(In the Object Management tab, use the default setting, In Memory.)
9.
Click the FraudDetection EAR resource and in the Configuration tab, click Build Archive. You may be prompted to save the project. You should see the message "Enterprise Archive File has built correctly":
Summary and Next Steps
Before you deploy the EAR file, you will set up a simple Rendezvous publisher, using a ActiveMatrix BusinessWorks process, to provide test data to the application.