Lets assume we have a sample domain configured (see Hyperon Studio sample domain):
We have a rating plan configured: FULL - Rating Plan for summer 2016. This plan has multiple coverages attached, e.g. BI, COLL, COMP. Each coverage has its attributes, e.g. POSITION, LIMIT1, LIMIT2, PREMIUM.
We will now evaluate a position of a coverage BI on the screen (attribute POSITION).
To get value from Hyperon engine simply inject Hyperon Engine (part of Hyperon Runtime Library) into your Spring Component/Service:
@Autowiredprivate HyperonEngine engine;
prepare a running context:
HyperonContext ctx = new HyperonContext(
"coverage.code", "COLL"
);
( main)[SampleComponent] - my value:
ParamValue (1)
1. [8]
As you can see on the screen above, attribute POSITION is configured to be evaluated by parameter ($p): demo.motor.coverage.position. So execution (2) is done by this parameter.
Now we would like to list all coverages attached to this plan. To do this simple execute following code: