![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |
Add the PreProcessor Rule FunctionIn this task, you configure a rule function that replies to the request received from the HTTP channel. HTTP is a request-reply protocol, and this step is required so that the HTTP server is ready to process the next request from the readme.html form. This rule function executes when an event is received. (You’ll configure that connection later.)What is an event preprocessor? An event preprocessor is a rule function that processes incoming messages before TIBCO BusinessEvents transforms them into events. In this case the preprocessor is used to send a response to the HTTP server. In real-world applications, however, a preprocessor might filter the messages so that only certain ones are used as events, and it might do other event enrichment actions. 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 Event Preprocessors in TIBCO BusinessEvents Architect’s Guide.How are event preprocessors configured for use? A preprocessor is associated with a destination. It processes events arriving at that destination. See Add a Cluster Deployment Descriptor and Build the EAR File for details.
Applications that Use Concurrency Features Require Use of Locking Locking is used to ensure that multiple concurrent RTCs (whether in the same agent or different agents in a cache cluster) do not work with the same object at the same time, or read an out of date version of the object. This is especially important if you use Cache+Memory mode. Locking is usually done in event preprocessors. See Using Locks to Ensure Data Integrity Within and Across Agents in TIBCO BusinessEvents Architect’s Guide to understand how to use locking correctly.
• Event Preprocessors in TIBCO BusinessEvents Architect’s Guide.
• Event Preprocessors in TIBCO BusinessEvents Developer’s Guide
1.
2. You see the New Rule Function Wizard. In the Filename field, type PreProcessor. In the Description field, type Closes requests from the HTTP server. Click Finish.
3. Click the Form tab at the bottom of the editor.
4.
5.
6.
7. In the Body area, type: Event. (Event followed by a period). Notice that when you type the period (.) you see a list of all catalog functions in the Event category. Use the down arrow to scroll down the list of functions and stop at replyEvent. Its tooltip displays. Documentation for all catalog functions is provided in tooltips.
8. Click the replyEvent function to select it. Now the body looks like this:
9.
10. To specify the reply event, just type request again. The reply event can be any event in this case, so we can simply reply with the request event.You have configured a rule function that will send a reply to requests sent by the HTTP server (through the HTTP channel). Next you will configure rules that take action on assertion of CreateAccount and Debit events, depending on various conditions.
![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |