OK you are really bending what you would use rules for, I really wouldn't recommend that. flattening the object model would allow you to write rules over it, but as it stands, its just going to be a bit difficult for you.
catalogObject :
CatalogObject( )
eval( catalogObject.getElementValue("depth" ) == null || catalogObject.getElementValue("depth" ) == "" )
Ok, Thanks for the help on the drl syntax.
So this works.
rule "UCCnet_DVE_Depth_All"
when
catalogObject : CatalogObject( )
eval( catalogObject.getElementValue( "depth") == null || catalogObject.getElementValue( "depth") == "" )
then
logWriter.logDebug( "Package Depth is Blank");
end
But how do I get the drl parser to accept something like this:
rule "UCCnet_DVE_Depth_All"
when
catalogObject : CatalogObject( )
String s = catalogObject.getElementValue( "depth");
eval( s == null || s == "" )
then
logWriter.logDebug( "Package Depth is Blank");
end
I am getting an Unexpected token 's' InvalidRulePackage
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users