OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

cam message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [cam] Drools and CAM?


Ashique,
 
Good question.  When we did the original design for CAM we left this part open ended - in terms of just using XPath for simple content checking, and then SQL calls for data lookups and then Java calls for more complex validation needs.  We also explicitly wanted to avoid inventing yet-another-small-language - that's why we picked XPath as the base for simple condition checking.  But obviously XPath can only do so much.
 
DROOLS looks like it can give us a very nice extension mechanism for people - so they do not have to write Java code directly - rather they can invoke DROOLS and script this all inside the CAM template XML.
 
The sort of use case this is useful for is typically where you need to do totalling across child elements in the XML source, and then compare that sum to some other values.  In the simplest case something like making sure that the order total equals the sum of the order items, plus tax rate, plus shipping.
 
I'm planning to brain storm on this some more next few days - right now looks like we need three things in the CAM template -
 
1) includeScript statement in the <as:Header> to instanciate DROOLS and set of classes and objects
2) execScript statement in the <as:BusinessContext> to invoke set of DROOLS rules.
3) Ability to pass a set of objects from the XML XPath instance to DROOLS - eg (//myOrder/orderItems/*)
 
And of course while this is targetted at DROOLS - in principle this generic mechanism could work with other rules engines - if people wanted to swap to something else themselves...
 
Another thought is passing the DROOLS part of the CAM template itself (such as Registry retrieved rules) - or integrating to CAM functions - such as as:setValue('execScript()').
 
And then - better error handling - returning record response structures based on data from the XML instance.  Right now jCAM is using Saxon and XSL - but that again has limits to what it can do.
 
Do you have somethings in mind yourself?
 
Thanks, DW

-------- Original Message --------
Subject: RE: [cam] Drools and CAM?
From: "Tanveer Ashique" <TANVEER_ASHIQUE@bah.com>
Date: Mon, December 19, 2005 11:00 am
To: <cam@lists.oasis-open.org>

 
This sounds potentially useful - do you have any use case examples in mind?"
 
-- Ashique
---------------------------------------------------------------------
Ashique Tanveer
Associate
Booz Allen Hamilton / (Consultant: NIH, Bethesda)
----------------------------------------------------------------------
 

Subject: RE: [cam] Drools and CAM?
  • From: "David RR Webber \(XML\)" <david@drrw.info>
  • To: cam@lists.oasis-open.org
  • Date: Thu, 15 Dec 2005 08:22:59 -0700

More thinking out loud - the DROOLS/ GROOVY combo looks an easy play.
 
http://drools.org/Groovy+Semantic+Module 
 
Basically you declare the Groovy namespace - and then you can include Groovy XML syntax right into the middle of your CAM template.  This would be extremely useful for asserting facts during the processing of the
CAM template - and then checking those facts at a later point in the processing.
 
A simple call-out to DROOLS whenever CAM encounters the Groovy: namespace prefix loosk very viable.
I'm not sure what API DROOLS provides at the Java level to facilitate passing in the Groovy XML directly.  That's the next question to research here I guess!

DW

-------- Original Message --------
Subject: [cam] Drools and CAM?
From: "David RR Webber (XML)" <david@drrw.info>
Date: Thu, December 15, 2005 9:43 am
To: cam@lists.oasis-open.org

I've just been reviewing the DROOLS toolset - http://drools.org
 
This seems a useful potential adjunct to CAM for people that need more expressive power than XPath expressions alone can provide.
 
At this point I'm thinking a call-out capability where you can inline DROOLS scripting into the CAM - I'm thinking particularly in the <DataValidation> section where a clause can include <drools-rule> can a hand-off can occur to the DROOLS rule engine at that point.
 
This is fairly complex - but given the extensibility in DROOLS - it looks like a viable option for people.
 
Although - currently we are supporting calls to Java - so that mechanism can support pass-thru to the DROOLS engine - so we may already have this covered.
 
Just thinking out loud a bit here...!
 
DW
 
 
--------------------------------------------------------------------- To unsubscribe from this mail list, you must leave the OASIS TC that generates this mail. You may a link to this group and all your TCs in OASIS at: https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

 


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]