Expressional Inference Rule Engine Add-on FAQ
Info: Bloomreach provides Enterprise support for this feature to Bloomreach Experience customers. The release schedule for this feature may differ from the core product release cycle.
FAQ
How do I use the Expressional Inference Rule Engine programmatically?
To access the Expressional Inference Rule Engine in your code—for example, to infer a goal value using a rule document in either the authoring or delivery tier—use the following approach:
// Retrieve the InferenceEngine instance from the HippoServiceRegistry. InferenceEngine inferEngine = HippoServiceRegistry.getService(InferenceEngine.class); // In the delivery tier, you can also obtain it from the HstServices component manager: inferEngine = HstServices.getComponentManager().getComponent(InferenceEngine.class.getName(), InferenceEngineModule.MODDULE_NAME); if (inferEngine != null) { Object goalValue = inferEngine.executeInference(RULES_DEMO_VISITOR_INTEREST_TYPE); }
This example shows how to obtain the InferenceEngine and execute inference using a specific rule type.