Re: [rules-users] DSL to DRL File Conversion - Is it possible ?

2007-03-07 Thread Michael Neale

no in 3.0 version unfortunately. You can tell the parser to print out the
DRL - but it will just write it out the System.out (only for debuggin). Look
in RuleParser for that option.

In trunk - which will be the new version - there is a seperate step which
outputs DRL - but I don't think that made it into the M1 release - should be
in M2 though.

On 3/7/07, kingston [EMAIL PROTECTED] wrote:



Is there anyway to get the DRL syntax out of the DSL format?

Is there any Convenient API method Which takes rule in DSL format and the
DSL File Name as arguments and returns the DRL Syntax ?

--
View this message in context:
http://www.nabble.com/DSL-to-DRL-File-Conversion---Is-it-possible---tf3360408.html#a9347582
Sent from the drools - user mailing list archive at Nabble.com.

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


RE: [rules-users] Web service deployment

2007-03-07 Thread Jones, Alan R
Yes, my thoughts exactly -- the web service is packaged as an .aar which
is nothing more than a jar file. The workaround that i have seen
mentioned is to place the data object (Fact) inside a jar and place that
into  axis2\WEB-INF\lib. That only causes more headaches since
everything is generated as xml beans and there is some collision
problem.
 
I was wondering if it's possible to get the classes needed by Drools
onto the classpath another way at web service runtime? This is all very
strange since the rules do correctly see the very same objects when i
test them inside eclipse (sans a deployed web service).
 
I suppose JBoss Rules does not really work inside any J2EE container, I
thought it should be a simple matter with Tomcat.
 




aj 


 
Alan R Jones 
Boeing SIS Mission Systems 
Denver Engineering Center (BDEC) 
303.307.3415 

 



From: Michael Neale [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 06, 2007 6:39 PM
To: Rules Users List
Subject: Re: [rules-users] Web service deployment


sounds like the classes that are visible to axis are not visible to
rules - depends how you are packaging up your application - war or ear? 


On 3/7/07, Jones, Alan R [EMAIL PROTECTED] wrote: 

Hi,
 
Is there a way to deploy JBoss Rules so that it's exposed as a
web service in Axis2? I keep getting server side errors where Drools is
not able to resolve/recognize the object passed into the rule. How can I
get the objects on the classpath properly for Drools to find it?
 



aj 



___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users




___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] column binding vs field binding - any performance implications?

2007-03-07 Thread Edson Tirelli

 Vlad,

No noticeable difference in binding fields or columns, but there are 
really negative perf impacts in using eval(). I'm writing a blog about 
it. Please try to avoid. I know bellow is just a sample, but it would be 
so much better if written:


Record( field == xxx )

[]s
Edson


Olenin, Vladimir (MOH) wrote:


Hi,

I wonder if there are any performance implications of choosing column 
binding vs field binding (I’ll be using bound variable in eval). Eg, 
in such case:


Record($field : field)

eval ( $field.equals(“xxx”) )

vs

$r: Record()

eval ( $r.field.equals(“xxx”) )

Does it start to make difference only when some significant number of 
variable get bound?


Thanks,

Vlad



___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
 




--
Edson Tirelli
Software Engineer - JBoss Rules Core Developer
Office: +55 11 3124-6000
Mobile: +55 11 9218-4151
JBoss, a division of Red Hat @ www.jboss.com


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] RE: Rules with Lookup Tables...

2007-03-07 Thread jdepaul

I have configured 3.1.0M1 on my local machine with the corresponding IDE... 
now I need help with the rule syntax.  I have configured a DAO which will
return an ArrayList of values representing a list of values from the lookup
table - I tried this, but I'm having problems...:


rule GATE-IN Match

// This rule should match IF:
//  CUSTOMER_REFERENCE_NUMBER starts with 'HX', and 
//  ACTIVITY_LOCATION starts with US 
//  SH_CODE exists in lookup table idenfied by key MILT.CUSTNO

when
$GateIN : RKEM_Move (CUSTOMER_REFERENCE_NUMBER matches ^HX.*, 
 ACTIVITY_LOCATION matches
^US.*,
$list : (from
lookupDAO.getLookupValues(MILT.CUSTNO)) contains $GateIN.getSH_CODE()  )
  
then 
   System.out.println(Matched 001695568GP GATE-IN Match Rule - about to
inovke Service...);

end





Anstis, Michael (M.) wrote:
 
 I don't have the syntax at hand but Edson has previously posted about
 using from in similar circumstances.

-- 
View this message in context: 
http://www.nabble.com/Rules-with-Lookup-Tables...-tf3329159.html#a9360008
Sent from the drools - user mailing list archive at Nabble.com.

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] 'from accumulate' doesn't work on multiple columns?..

2007-03-07 Thread Olenin, Vladimir (MOH)
This is as a follow up for the previous question It looks like I made a
wrong assumption that 'accumulate' can work on multiple columns:

 

Integer ( intValue  0) from accumulate (

Record ( f1 == $f1, f2  10, $value1 :
value )

Record ( f1 == $f1, f2 = 10, $value2 :
value )

Init ( int sum = 0; ),

Action ( sum += $value1 - $value2 ),

Result ( new Integer (sum) )

)

 

I'm getting an error ('then' is expected or smth like that at the point
where the second 'Record' is defined) and the only way to remove the error
is to declare one and only one Column constraint... So, it is not possible
then to use multiple columns in 'accumulate'? If not, then it would be even
more interesting to get some idea on how to approach the kind of problem I
mentioned in the previous post.

 

Thanks,

 

Vlad

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] 'from accumulate' doesn't work on multiple columns?..

2007-03-07 Thread Mark Proctor
currently 'accumulate' only works on single column, eventually we hope 
to have it working with multipe patterns - but it's not in the near 
future road map. Unless a community member wants to work on the feature :)


Mark
Olenin, Vladimir (MOH) wrote:


This is as a follow up for the previous question It looks like I 
made a wrong assumption that 'accumulate' can work on multiple columns:


 


Integer ( intValue  0) from accumulate (

Record ( f1 == $f1, f2  10, 
$value1 : value )


Record ( f1 == $f1, f2 = 10, 
$value2 : value )


Init ( int sum = 0; ),

Action ( sum += $value1 - $value2 ),

Result ( new Integer (sum) )

)

 

I'm getting an error ('then' is expected or smth like that at the 
point where the second 'Record' is defined) and the only way to remove 
the error is to declare one and only one Column constraint... So, it 
is not possible then to use multiple columns in 'accumulate'? If not, 
then it would be even more interesting to get some idea on how to 
approach the kind of problem I mentioned in the previous post.


 


Thanks,

 


Vlad



___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
  


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Web service deployment

2007-03-07 Thread Burr Sutter

I've done this for JBossWS (not Axis) running on the JBoss AS.

Let me know if you are interested in the example.

Burr


Michael Neale wrote:
sounds like the classes that are visible to axis are not visible to 
rules - depends how you are packaging up your application - war or ear?


On 3/7/07, *Jones, Alan R * [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


Hi,
 
Is there a way to deploy JBoss Rules so that it's exposed as a web

service in Axis2? I keep getting server side errors where Drools
is not able to resolve/recognize the object passed into the rule.
How can I get the objects on the classpath properly for Drools to
find it?
 



aj



___
rules-users mailing list
rules-users@lists.jboss.org mailto:rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users




___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
  

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] RE: Rules with Lookup Tables...

2007-03-07 Thread Edson Tirelli
 I'm not sure I understood what you are trying to do, but syntax is 
more like:


rule ...
when
   // getting the codes from the table
   Code( $shCode : sh_code ) from lookupDAO.getLookupValues( 
MILT.CUSTNO )


   // matching the objects if the code
   $gateIN : RKEM_Move( CUSTOMER_REFERENCE_NUMBER matches ^HX.*,
  ACTIVITY_LOCATION matches 
^US.*,

  list contains $shCode )
then
  // do something
end

  There are other ways of writing this, but I would like to have your 
rule written down in english before suggesting something else... :)


  []s
  Edson

jdepaul wrote:

I have configured 3.1.0M1 on my local machine with the corresponding IDE... 
now I need help with the rule syntax.  I have configured a DAO which will

return an ArrayList of values representing a list of values from the lookup
table - I tried this, but I'm having problems...:


rule GATE-IN Match

// This rule should match IF:
//  CUSTOMER_REFERENCE_NUMBER starts with 'HX', and 
//  ACTIVITY_LOCATION starts with US 
//  SH_CODE exists in lookup table idenfied by key MILT.CUSTNO	


when
		$GateIN : RKEM_Move (CUSTOMER_REFERENCE_NUMBER matches ^HX.*, 
ACTIVITY_LOCATION matches

^US.*,
$list : (from
lookupDAO.getLookupValues(MILT.CUSTNO)) contains $GateIN.getSH_CODE()  )
		  
	then 
	   System.out.println(Matched 001695568GP GATE-IN Match Rule - about to

inovke Service...);

end





Anstis, Michael (M.) wrote:
 


I don't have the syntax at hand but Edson has previously posted about
using from in similar circumstances.
   



 




--
Edson Tirelli
Software Engineer - JBoss Rules Core Developer
Office: +55 11 3124-6000
Mobile: +55 11 9218-4151
JBoss, a division of Red Hat @ www.jboss.com


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] problem in comparing two dynamic values inside

2007-03-07 Thread Sikkandar Nawabjan
Your logic in the condition is wrong.

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users