![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |
Loading data from cache into the Rete does not trigger rules At least not in the way it would if the data was newly arriving in an event. In conjunction with other data, however, the presence of the loaded data can trigger rules, in the usual way.In TIBCO BusinessEvents Architect’s Guide see the following:See also TIBCO BusinessEvents Cache Fundamentals to understand more about cache modes.
1. In TIBCO BusinessEvents Studio, open the RuleFunctions > PreProcessor rule function.
2. Click the Source tab at the bottom of the editor to work in the Source view. (In the Project Design Tutorial you worked in the Form view. You could stay in that view, but it’s good become familiar with both views).
3. In the Scope section, replace Event request with Events.AccountOperations request. The section looks like this:
The reason you have to narrow the scope is that the base Event class does not have an AccountId property, so it cannot be used in the function you’ll add in the next step.
The Cluster.DataGrid.CacheLoadConceptByExtId() function loads any matching items from the cache into the Rete network. In this case, it loads any concept whose ExtId matches the AccountId in the incoming event. The loading is done before the event is asserted, so the Rete network will contain any matching Account concepts. The BadCreateAccount rule then fires and as in the Project Design Tutorial, to prevent creation of duplicate accounts.
![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |