java - DROOLS Rule Engine : Making network calls within Drools -
one of transactional systems work upon deals data-gathering multiple external systems, , making business decision based upon (transactional entity + gathered-data).
currently , follow following steps:
gathering data multiple sub-systems.
using (gathered data + transactional entity) input drools, , deriving business decision out of it.
one major cons of above approach have gather data beforehand (expensive network calls) without bothering usefulness of data.
what trying delay service calls moving rule execution layer. intention leverage drools decision tree avoid making service call if can take decision on available data (within transactional entity itself).
just want thought process validated (i.e, making service call part of rules execution practice or not.).
can please share pros/cons around same. leads appreciated
you cannot reason facts don't have (yet). if facts have let decide else need can write rules according following trivial example.
rule "x , y, not z" when dimension( $id: id, coord == "x" ) dimension( id == $id, coord == "y" ) not dimension( id == $id, coord == "z" ) fetch , insert missing dimension end rule "x, y , z" ... end
note process of fetching , inserting must not executed synchronously. can insert request event queue - use java.
Comments
Post a Comment