Hello.
I have a flow of facts in JSON format from different systems. It is impossible to create POJO for every type of facts because format can be vary in time. The only option I've find is to convert JSON to Map<String, Object> and to deal with the maps from rules. But that way is impractical for the people who should create rules because they are from different technologies (.net, different CRMs, JS and so on). The question is: can I implement custom object accessor and how? I've fond very limited info on
google.com.
More detailed:
Now I have to write rules like that (Map usage):
rule "Hiprio rule"
when
$e : Map (get("value") > 5)
then
$e.put("priority", 3);
end
But it would be great if people get ability to write someting like that:
rule "Hiprio rule"
when
$e : Fact (value > 5)
then
$e.priority = 3;
end
It will be simle and undrestandable for the people who should create rules (taking in account that property access path can be more complicated).
Could you provide me a direction where I can dig to reach that (if it possible with current Drools version).
Thank you in advance.