To evaluate such rules; A simple expression rule engine can be developed using Java, XML and JEP (Java Expression Parser). For example; suppose we have financial_data.xml which looks like;
and sample rule.xml looks like;
total-assets = loans + others
Use java components which parses the rule.xml and financial-data.xml and replaces the rule expression with actual data and forms the string. This formulated string will in-turn passed as expression to JEP framework which gives us boolean result.
Could you please pass on more information regarding this subject so that we can better understand and start discussing?
This is a very interesting solution. I would like to jum more deep into this.
apply to anther domain,for example BP(business process flow) BI(Business Intelligence)
can be more useful?
Basically, this is an old idea and this is behind all rule based engines. Now, it is your choice where you decide to store both sections of data. DB is considered a better choice, it need not be "parsed", and you are hidden from performance optmization, etc. etc. Also, you dont have to bother symbols in XML tags, e.g., in the above example financial-data tag is okay, but when you put it in expression xml, this may also mean content of subtracted by content of tag, which will certainly lead to errors.
Above is just an example, there will be thousands such issues with implementing in XML.