[rules-users] How to use "from" CE in XML format of rules?

qmars765 at gmx.de qmars765 at gmx.de
Wed Mar 21 16:19:00 EDT 2007


Dear list,

I am using 3.1M Release and use the new “from” CE: I invoke a DAO to determine some values from Backend used in the rule: 

rule ” At least 3 RFQs for material type 1”	 

when
		$pr: PurchaseRequest(materialType == "1", currentStatus == PurchaseRequestStatus.PRE_APPROVE)
		$dao : PurchaseRequestFacade()		
		$rfqs: Integer(intValue < 3) from $dao.getRFQsFor($pr)		
then
	blockedPRs.add($pr);
end

So far everything works great, but 

unfortunately I need to have the rules in XML format: the XML Rules will be modified via WEB-UI by Business-Users using XMLBeans API in the WEB-Application. I like the DRL format more and write initially the rules first in DRL and then use the XMLDumper-Class statically to generate the XML Version of the rules. But while converting from DRL to XML, I get following error message for the above rule when parsing "from" CE:

no visitor implementation for : class org.drools.lang.descr.FromDescr : org.drools.lang.descr.FromDescr at 176cad3


Is “from” CE not supported in XML format? I just need the above rule in XML, but I don’t know how to write it? I also checked the XSD in the 3.1M release jar distribution, but there is stil the old version of the XSD without the "from" CE. 
 
Alternatively if “from” is not supported yet in XML at all, is it a way to formulate the above rule alternatively without “from” without changing the application design too much? 

Or is it a way to manage the rules and their design/parameters in LHS (read, write, modify) in DRL-Format via API? This would be actually my favorite solution :-) I read quickly over the planned Drools BRMS-Blog, But not sure If I can use the BRMS to build a WEB Application on top of it for managing the design of rules?

Many thanks in advance for your help,

Kioumars 


-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: www.gmx.net/de/go/mailfooter/topmail-out



More information about the rules-users mailing list