Expressional Inference Rule Engine Add-on FAQ
FAQ
How to Use Expressional Inference Rule Engine Programmatically?
If you want (e.g., you want to infer goal value by rule document in either authoring tier or delivery tier instead of hard-coded way), you can also access the Expressional Inference Rule Engine programmatically like the following example:
// You can get the InferenceEngine through HippoServiceRegistry. InferenceEngine inferEngine = HippoServiceRegistry.getService(InferenceEngine.class); // Or in delivery tier, you can access it through HstServices.getComponentManager() too: inferEngine = HstServices.getComponentManager().getComponent(InferenceEngine.class.getName(), InferenceEngineModule.MODDULE_NAME); if (inferEngine != null) { Object goalValue = inferEngine.executeInference(RULES_DEMO_VISITOR_INTEREST_TYPE); }
.