Re: [rules-users] priority based on object properties

2011-07-19 Thread Wolfgang Laun
A rule's salience can be defined with an arbitrary expression which
may include variables bound to mathced fact fields.

It should be possible to compute the effective salience from a base
salience (according to the rule) plus an offset value derived from
field values.

-W


On 18 July 2011 21:44, Simon Chen simonche...@gmail.com wrote:

 Hi all,

 I am curious if we can inform Drools' execution based on properties
 within objects.

 In particular, the salience value is defined for each rule, in the
 sense that rule A has priority over rule B to execute. I am wondering
 if we can define some kinda of salience metric, such that object X has
 higher priority than object Y to be executed in the same rule.

 To give an example, I am (still) playing with implementing shortest
 path using a few rules. I have a rule for selecting a shortest path on
 a node (among all the paths received from its neighbors) to a source
 node, and another rule for propagating the shortest path on a node to
 neighboring nodes. When I have many nodes in my graph, I found that
 the paths propagated (via the second rule) are not always the
 shortest, while Dijkstra's algorithm always propagate from the node
 with the shortest distance to the source. The effect is that my rules
 are wasting most of the time propagating paths that would be dropped
 in the end anyway...

 Any ideas?

 Thanks.
 -Simon
 ___
 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] jaxb generated fact loaded into Guvnor throws errors when using the ' is contained in the comma separated list' operator

2011-07-19 Thread Michael Anstis
Can you try without Guvnor, i.e. native DRL and KnowledgeBases?

This will help us identify whether this is a Guvnor issue of Drools engine.

Thanks.

2011/7/19 sreeram.vadlam...@wellsfargo.com

 Hi Mike,

 ** **

 Thank You for your responses.

 ** **

 My apologies.

 ** **

 I did miss copying the closing bracket.the issue still exists though . I
 suspect whether the way the code has been generated by jaxb has anything to
 do with it.

 ** **

 In the xml, the field is all upper case as 

 xs:element type=xs:string name=ACTIVITYCODE/

 ** **

 I see that JAXB generated the code as follows.

 ** **

 @XmlElement(name = ACTIVITYCODE, required = true)

 protected String activitycode;

 ** **

   /**

  * Gets the value of the activitycode property.

  * 

  * @return

  * possible object is

  * {@link String }

  * 

  */

 public String getACTIVITYCODE() {

 return activitycode;

 }

 ** **

 /**

  * Sets the value of the activitycode property.

  * 

  * @param value

  * allowed object is

  * {@link String }

  * 

  */

 public void setACTIVITYCODE(String value) {

 this.activitycode = value;

 }

 ** **

 rule Row 1 dds

ruleflow-group None

dialect mvel

 when

 factClass : FACTCLASS( ACTIVITYCODE in (A, B))

 ** **

 ** **

 ** **

 *From:* rules-users-boun...@lists.jboss.org [mailto:
 rules-users-boun...@lists.jboss.org] *On Behalf Of *Michael Anstis
 *Sent:* Monday, July 18, 2011 2:15 PM
 *To:* Rules Users List
 *Subject:* Re: [rules-users] jaxb generated fact loaded into Guvnor throws
 errors when using the ' is contained in the comma separated list' operator
 

 ** **

 Unless you have copied and pasted incorrectly, the rule should read:-

 3.  |   rule Row 1 dds

 4.  |   ruleflow-group None

 5.  |   dialect mvel

 6.  |   when

 7.  |   factClass : FACTCLASS( ACTIVITYCODE in (A, B)
 *) \\0--- note closing bracket*

 8.  |   then

 9.  |   factClass.setRATE( 5.25 );

 10. |   end

 ** **

 On 18 July 2011 20:57, Michael Anstis michael.ans...@gmail.com wrote:***
 *

 There is a closing bracket missing in the generated DRL.

 This is a bug. Please raise a JIRA and assign to me and I'll fix for
 5.3.0.Beta1.

 With kind regards,

 Mike

 2011/7/14 sreeram.vadlam...@wellsfargo.com

 Hello ,

  

 I am using 5.2.0.CR1 version of Guvnor .

  

 I have a jaxb generated class loaded through the model jar into Guvnor to
 be used as a fact in the Guided Decision Table editor.

  

 When I use a field ACTIVITYCODE  of type String from the JAXB generated
 class  with  ‘ is contained in the comma separated list'  operator, I get
 compilation errors. 

  

 Unable to Analyse Expression ACTIVITYCODE == A || ACTIVITYCODE == B:
 [Error: no such identifier: ACTIVITYCODE] [Near : {... ACTIVITYCODE == A
 || ACTIVI }] ^ [Line: 1, Column: 1]

  

 But when I use equal to operator to compare value to just a string value,
 it compiles fine. 

  

 This rule fails.

  

 *3.  *|   rule Row 1 dds

 4.  |   ruleflow-group None

 5.  |   dialect mvel

 6.  |   when

 7.  |   factClass : FACTCLASS( ACTIVITYCODE in (A, B)*
 ***

 8.  |   then

 9.  |   factClass.setRATE( 5.25 );

 10. |   end

  

 The below rule compiles fine.

  

  

 *3.  *|   rule Row 1 dds

 4.  |   ruleflow-group None

 5.  |   dialect mvel

 6.  |   when

 7.  |   factClass : FACTCLASS ( ACTIVITYCODE ==A) 

 8.  |   then

 9.  |   factClass.setRATE( 5.25 );

 10. |   end

  

 Is this issue being caused by jaxb generated class? If so, is there a way
 to fix this problem?

  

 When I use a regular pojo that is not jaxb generated, the 

  

 is contained in the comma separated list'  operator works fine.

  

 Can someone provide any direction or thoughts on this?

  

 Thanks,

  

 Ram

  

  

  

  

 ** **

 ___
 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


___
rules-users mailing list

Re: [rules-users] concurrent modification of a rule by more than one user in Guvnor

2011-07-19 Thread Michael Anstis
Hi,

We implement an optimistic lock at the asset level.

Multiple users can open the same asset (subsequent users should receive a
warning) however if one attempts to save after another they should receive
an error that their view was out of date.

We do not implement row-level locking on decision tables.

With kind regards,

Mike

On 19 July 2011 03:11, puja nandamuri med_9...@yahoo.com wrote:

 Hi All,

 I am currently testing 5.2.0.CR1 version of Guvnor.


 Can multiple users modify a rule in Guvnor at the same time? what are the
 issues involved in say, two users trying to change

 1. the same row in a decision Table at the same time and saving it.

 2. different rows in a decision table at the same time and saving it.

 Are there any documentation or articles to get more information on
 concurrent access within Guvnor?

 Thank You,

 ram.

 ___
 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] PDFs of Drools 5.2.final: pictures too big

2011-07-19 Thread itchupe
Okay, thank you for your answers. I did not realise it's a known issue, sorry
about that.
I'll see what I can do.

thanx and cheers.

--
View this message in context: 
http://drools.46999.n3.nabble.com/PDFs-of-Drools-5-2-final-pictures-too-big-tp3179659p3181829.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] PDFs of Drools 5.2.final: pictures too big

2011-07-19 Thread Michael Anstis
Marianna,

That's alright, we can't expect everybody to know every issue we have.

What's nicer is if community members want to help resolve some ;)

With kind regards,

Mike

On 19 July 2011 09:46, itchupe itch...@gmail.com wrote:

 Okay, thank you for your answers. I did not realise it's a known issue,
 sorry
 about that.
 I'll see what I can do.

 thanx and cheers.

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/PDFs-of-Drools-5-2-final-pictures-too-big-tp3179659p3181829.html
 Sent from the Drools: User forum 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] PDFs of Drools 5.2.final: pictures too big

2011-07-19 Thread itchupe
hi again

could you maybe please point me to the JIRA that I could do (b)?

(b) Attach a list of all affected images (what user-guide, what section,
what image etc) to a JIRA for us to eventually look at.

(not quite ready  setup for (a) yet)

kind regards




--
View this message in context: 
http://drools.46999.n3.nabble.com/PDFs-of-Drools-5-2-final-pictures-too-big-tp3179659p3181866.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] PDFs of Drools 5.2.final: pictures too big

2011-07-19 Thread Michael Anstis
Sure,

If the documents containing the issues relate to Expert, Fusion etc then:
https://issues.jboss.org/browse/JBRULES

Otherwise if the document relates to Guvnor:
https://issues.jboss.org/browse/GUVNOR

On 19 July 2011 10:07, itchupe itch...@gmail.com wrote:

 hi again

 could you maybe please point me to the JIRA that I could do (b)?

 (b) Attach a list of all affected images (what user-guide, what section,
 what image etc) to a JIRA for us to eventually look at.

 (not quite ready  setup for (a) yet)

 kind regards




 --
 View this message in context:
 http://drools.46999.n3.nabble.com/PDFs-of-Drools-5-2-final-pictures-too-big-tp3179659p3181866.html
 Sent from the Drools: User forum 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] jaxb generated fact loaded into Guvnor throws errors when using the ' is contained in the comma separated list' operator

2011-07-19 Thread Wolfgang Laun
This is a bug in the core, and a regression from 5.1.1.

Any field called prop or PROP with getters and setters written as
getPROP and setPROP is not recognized in certain constraint expressions
written as PROP.

-W


2011/7/19 Michael Anstis michael.ans...@gmail.com

 Can you try without Guvnor, i.e. native DRL and KnowledgeBases?

 This will help us identify whether this is a Guvnor issue of Drools engine.

 Thanks.

 2011/7/19 sreeram.vadlam...@wellsfargo.com

 Hi Mike,

 ** **

 Thank You for your responses.

 ** **

 My apologies.

 ** **

 I did miss copying the closing bracket.the issue still exists though . I
 suspect whether the way the code has been generated by jaxb has anything to
 do with it.

 ** **

 In the xml, the field is all upper case as 

 xs:element type=xs:string name=ACTIVITYCODE/

 ** **

 I see that JAXB generated the code as follows.

 ** **

 @XmlElement(name = ACTIVITYCODE, required = true)

 protected String activitycode;

 ** **

   /**

  * Gets the value of the activitycode property.

  * 

  * @return

  * possible object is

  * {@link String }

  * 

  */

 public String getACTIVITYCODE() {

 return activitycode;

 }

 ** **

 /**

  * Sets the value of the activitycode property.

  * 

  * @param value

  * allowed object is

  * {@link String }

  * 

  */

 public void setACTIVITYCODE(String value) {

 this.activitycode = value;

 }

 ** **

 rule Row 1 dds

ruleflow-group None

dialect mvel

 when

 factClass : FACTCLASS( ACTIVITYCODE in (A, B))

 ** **

 ** **

 ** **

 *From:* rules-users-boun...@lists.jboss.org [mailto:
 rules-users-boun...@lists.jboss.org] *On Behalf Of *Michael Anstis
 *Sent:* Monday, July 18, 2011 2:15 PM
 *To:* Rules Users List
 *Subject:* Re: [rules-users] jaxb generated fact loaded into Guvnor
 throws errors when using the ' is contained in the comma separated list'
 operator

 ** **

 Unless you have copied and pasted incorrectly, the rule should read:-

 3.  |   rule Row 1 dds

 4.  |   ruleflow-group None

 5.  |   dialect mvel

 6.  |   when

 7.  |   factClass : FACTCLASS( ACTIVITYCODE in (A, B)
 *) \\0--- note closing bracket*

 8.  |   then

 9.  |   factClass.setRATE( 5.25 );

 10. |   end

 ** **

 On 18 July 2011 20:57, Michael Anstis michael.ans...@gmail.com wrote:**
 **

 There is a closing bracket missing in the generated DRL.

 This is a bug. Please raise a JIRA and assign to me and I'll fix for
 5.3.0.Beta1.

 With kind regards,

 Mike

 2011/7/14 sreeram.vadlam...@wellsfargo.com

 Hello ,

  

 I am using 5.2.0.CR1 version of Guvnor .

  

 I have a jaxb generated class loaded through the model jar into Guvnor to
 be used as a fact in the Guided Decision Table editor.

  

 When I use a field ACTIVITYCODE  of type String from the JAXB generated
 class  with  ‘ is contained in the comma separated list'  operator, I get
 compilation errors. 

  

 Unable to Analyse Expression ACTIVITYCODE == A || ACTIVITYCODE == B:
 [Error: no such identifier: ACTIVITYCODE] [Near : {... ACTIVITYCODE == A
 || ACTIVI }] ^ [Line: 1, Column: 1]

  

 But when I use equal to operator to compare value to just a string value,
 it compiles fine. 

  

 This rule fails.

  

 *3.  *|   rule Row 1 dds

 4.  |   ruleflow-group None

 5.  |   dialect mvel

 6.  |   when

 7.  |   factClass : FACTCLASS( ACTIVITYCODE in (A, B)
 

 8.  |   then

 9.  |   factClass.setRATE( 5.25 );

 10. |   end

  

 The below rule compiles fine.

  

  

 *3.  *|   rule Row 1 dds

 4.  |   ruleflow-group None

 5.  |   dialect mvel

 6.  |   when

 7.  |   factClass : FACTCLASS ( ACTIVITYCODE ==A) 

 8.  |   then

 9.  |   factClass.setRATE( 5.25 );

 10. |   end

  

 Is this issue being caused by jaxb generated class? If so, is there a way
 to fix this problem?

  

 When I use a regular pojo that is not jaxb generated, the 

  

 is contained in the comma separated list'  operator works fine.

  

 Can someone provide any direction or thoughts on this?

  

 Thanks,

  

 Ram

  

  

  

  

 ** **

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

Re: [rules-users] PDFs of Drools 5.2.final: pictures too big

2011-07-19 Thread Geoffrey De Smet
Let's not waste time fixing this image by image.
It should be done in the docbook style, here's the issue:
https://issues.jboss.org/browse/JDOCBOOKSTYLE-19
Documentation: large images should scale to print for PDF output
I 'll process any patch to fix that :)

Op 19-07-11 11:07, itchupe schreef:
 hi again

 could you maybe please point me to the JIRA that I could do (b)?

 (b) Attach a list of all affected images (what user-guide, what section,
 what image etc) to a JIRA for us to eventually look at.

 (not quite ready  setup for (a) yet)

 kind regards




 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/PDFs-of-Drools-5-2-final-pictures-too-big-tp3179659p3181866.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users


-- 
With kind regards,
Geoffrey De Smet


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


Re: [rules-users] Dynamic facts

2011-07-19 Thread Wolfgang Laun
On 19 July 2011 07:07, Marc Heinz marc.he...@no-log.org wrote:

 Hello everyone,

 I need some enlightening about Drools dynamic facts (a term used in the
 documentation, for facts that could be updated from outside the rule
 engine).

 The current documentation always list the insert method of a
 StatefulKnowledgeSession being able to take an additional boolean
 argument, stating that the corresponding fact supports the
 PropertyChangeSupport related methods.

 However, it seems that this method do not exists anymore for already some
 time now...


It's still there in KnowledgeHelper - not in the stable part of the API,
though. But using this method is not a good choice, IMHO.


 After googling for a while it appears that some possible workaround were
 modifyInsert (apparently removed from the API as well) and the
 @propertyChangeSupport meta-data annotation, but I didn't manage to make
 it work (actually I wasn't able to find any reference from it in the API,
 so I guess that it is also not available anymore).


It should work, e.g.:

  declare SomeType
@propertyChangeSupport(true)
  end

Although in 5.2.0 there are some severe issues when building using a change
set, which might make this disappear.



 So, this left us with the session.update method. Which seems to works
 great, except that it will invalidate the whole fact into the working
 memory, even if only some of the fields were changed.


AFAIK, there never was any logic for restricting updates of the Rete
structures according to individual field-oriented change notifications.



 Is this some current limitation of Drools? Does it have something to do
 with those Shadows Fact? (that would be somehow immutable?)


No.



 If we effectively can't fire update targeted to some specific fields, this
 has probably some big implications on performances (even for simple fact
 with only a few fields).


No. Rete has been designed to cope with just that.



 It would also means that one should always aim at
 the finest granularity for better performances,


No - if I understand this correctly as being a corollary of the preceding
statements.

-W

by somehow flattening
 the object structure into the knowledge base (which in turn could make
 complicated to reuse those same Pojo in other frameworks, such as
 hibernate).

 Did I miss something?

 Any feedback deeply appreciated,

 Thanks!

 M. H.
 ___
 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] PDFs of Drools 5.2.final: pictures too big

2011-07-19 Thread Michael Anstis
+1

On 19 July 2011 10:35, Geoffrey De Smet ge0ffrey.s...@gmail.com wrote:

 Let's not waste time fixing this image by image.
 It should be done in the docbook style, here's the issue:
https://issues.jboss.org/browse/JDOCBOOKSTYLE-19
Documentation: large images should scale to print for PDF output
 I 'll process any patch to fix that :)

 Op 19-07-11 11:07, itchupe schreef:
  hi again
 
  could you maybe please point me to the JIRA that I could do (b)?
 
  (b) Attach a list of all affected images (what user-guide, what section,
  what image etc) to a JIRA for us to eventually look at.
 
  (not quite ready  setup for (a) yet)
 
  kind regards
 
 
 
 
  --
  View this message in context:
 http://drools.46999.n3.nabble.com/PDFs-of-Drools-5-2-final-pictures-too-big-tp3179659p3181866.html
  Sent from the Drools: User forum mailing list archive at Nabble.com.
  ___
  rules-users mailing list
  rules-users@lists.jboss.org
  https://lists.jboss.org/mailman/listinfo/rules-users
 

 --
 With kind regards,
 Geoffrey De Smet


 ___
 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] Dynamic facts

2011-07-19 Thread Marc Heinz

Thank you for your response, Wolfgang.

 The current documentation always list the insert method of a
 StatefulKnowledgeSession being able to take an additional boolean
 argument, stating that the corresponding fact supports the
 PropertyChangeSupport related methods.

 However, it seems that this method do not exists anymore for already
 some
 time now...


 It's still there in KnowledgeHelper - not in the stable part of the API,
 though. But using this method is not a good choice, IMHO.

Hum ok, the documentation stills need to be updated though...

 It should work, e.g.:

   declare SomeType
 @propertyChangeSupport(true)
   end

 Although in 5.2.0 there are some severe issues when building using a
 change
 set, which might make this disappear.

Understood, I may give it another try. But in all cases, I don't feel
comfortable in relying on features that are not described in the API, nor
the documentation.

 If we effectively can't fire update targeted to some specific fields,
 this
 has probably some big implications on performances (even for simple fact
 with only a few fields).


 No. Rete has been designed to cope with just that.

I'm not sure to fully understand this statement... If i take the following
rules:
=
rule Single rule check age
when
p : Person( age  18 )
then
System.out.println(Single rule fired);
end

rule Rule 1 of n
when
p : Person( name.equals(Adam) )
then
System.out.println(Rule 1 of n fired);
end

// [...] hundred of others similar rules that will perform a check on the
// name attribute.
=

And with the following java code:

Person p = new Person();
p.setAge(22);
p.setName(Adam);
FactHandle fh = ksession.insert(p);
ksession.fireAllRules();
p.setAge(23);
ksession.update(fh, p);
ksession.fireAllRules();

This will actually produce the output:
Rule 1 of n fired
Single rule fired
Rule 1 of n fired
Single rule fired

So, despite I have only updated one attribute of the fact (the age of a
Person), all rules have been fired again, even if they had nothing to do
with the said attribute, which could possibly produce a huge overhead.

I maybe misunderstood some basic concept here... But is there a way to
prevent that?

For example, I expect a different behavior when using a
PropertyChangeSupport object that would fire events only for specific
fields (but I wasn't able to test it yet)...

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


Re: [rules-users] Dynamic facts

2011-07-19 Thread Wolfgang Laun
On 19 July 2011 13:42, Marc Heinz marc.he...@no-log.org wrote:


 rule Single rule check age
 when
p : Person( age  18 )
 then
System.out.println(Single rule fired);
 end

 rule Rule 1 of n
when
p : Person( name.equals(Adam) )
then
System.out.println(Rule 1 of n fired);
 end

 // [...] hundred of others similar rules that will perform a check on the
 // name attribute.
 =

 And with the following java code:

 Person p = new Person();
 p.setAge(22);
 p.setName(Adam);
 FactHandle fh = ksession.insert(p);
 ksession.fireAllRules();
 p.setAge(23);
 ksession.update(fh, p);
 ksession.fireAllRules();

 This will actually produce the output:
 Rule 1 of n fired
 Single rule fired
 Rule 1 of n fired
 Single rule fired

 So, despite I have only updated one attribute of the fact (the age of a
 Person), all rules have been fired again, even if they had nothing to do
 with the said attribute, which could possibly produce a huge overhead.

 I maybe misunderstood some basic concept here... But is there a way to
 prevent that?


Reevaluation of all patterns referring to the type of  a fact/object that
has been changed is a fundamental principle of production rule systems.

For example, I expect a different behavior when using a
 PropertyChangeSupport object that would fire events only for specific
 fields (but I wasn't able to test it yet)...


Reaction to a property change event is just
  wm.update( factHandle, object )

-W


 Thanks,
 Marc
 ___
 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


[rules-users] Drools Integration for which Camel Version?

2011-07-19 Thread Andre
hey, 
 with version do you test the camel integration? cause it only works with
camel 2.6 at my project...

--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-Integration-for-which-Camel-Version-tp3182385p3182385.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Integration for which Camel Version?

2011-07-19 Thread Mark Proctor
On 19/07/2011 13:45, Andre wrote:
 hey,
   with version do you test the camel integration? cause it only works with
 camel 2.6 at my project...
2.4 and above
https://github.com/droolsjbpm/droolsjbpm-build-bootstrap/blob/master/pom.xml

camel.version2.4.0/camel.version

springframework.version2.5.6/springframework.version


Mark
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Drools-Integration-for-which-Camel-Version-tp3182385p3182385.html
 Sent from the Drools: User forum 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] Dynamic facts

2011-07-19 Thread Vincent Legendre

 AFAIK, there never was any logic for restricting updates of the Rete 
 structures according to individual field-oriented change notifications.

As far I remember, JRules does.
And it could be great to add/restore this possibility in drools (is 
there a JIRA somewhere where we can vote?).

For Marc's question, I think there could be a confusion between a 
production/inference system like drools, and something that looks like a 
database trigger. And yes, if you really want to detect fields changes 
individually, fields must be inserted as individual objects in the WM.

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


Re: [rules-users] priority based on object properties

2011-07-19 Thread Simon Chen
Wolfgang,

How does the offset thing work exactly? Do we set one salience value
for a rule and another offset value based on the fact fields? Or do we
have one expression for salience, in the form of X+Y, where X is a
static numeric value and Y is a formula based on the facts?

It seems to me that the latter case is not much different, because all
activations must be sorted based on the derived salience.

The former case might be useful, as Drools can potentially first
roughly sort the activations based on salience values, and then sort
the smaller subsets of activations based on their offset values.

Thanks.
-Simon



2011/7/19 Wolfgang Laun wolfgang.l...@gmail.com:
 A rule's salience can be defined with an arbitrary expression which
 may include variables bound to mathced fact fields.

 It should be possible to compute the effective salience from a base
 salience (according to the rule) plus an offset value derived from
 field values.

 -W


 On 18 July 2011 21:44, Simon Chen simonche...@gmail.com wrote:

 Hi all,

 I am curious if we can inform Drools' execution based on properties
 within objects.

 In particular, the salience value is defined for each rule, in the
 sense that rule A has priority over rule B to execute. I am wondering
 if we can define some kinda of salience metric, such that object X has
 higher priority than object Y to be executed in the same rule.

 To give an example, I am (still) playing with implementing shortest
 path using a few rules. I have a rule for selecting a shortest path on
 a node (among all the paths received from its neighbors) to a source
 node, and another rule for propagating the shortest path on a node to
 neighboring nodes. When I have many nodes in my graph, I found that
 the paths propagated (via the second rule) are not always the
 shortest, while Dijkstra's algorithm always propagate from the node
 with the shortest distance to the source. The effect is that my rules
 are wasting most of the time propagating paths that would be dropped
 in the end anyway...

 Any ideas?

 Thanks.
 -Simon
 ___
 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


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


[rules-users] [Drools4]: Filter executed rules by *.drl file

2011-07-19 Thread magendo
Before I start do explain my problem I should say that I have already
searched through the older posts and found similiar problems but not exactly
the following one:

My Application has multiple RuleFiles (*.drl each with its own package)
which can be dynamically added/removed. Based on a context (lets say String
foo = bar) only the rulepackage which fits to bar should be executed.
Usually that isnt a problem, because drools just executes the rules with the
fitting facts. But in this case all the rules in the rulepackages check the
same type of facts.

Currently I am using an AgendaFilter (if rulepackage == xyz { accept =
true}) to achieve this goal, but firstly it doesnt effect inserting of facts
(LHS of every rule is executed) and secondly I have read that it should only
be used for unit testing, since it couples java code with rule behavior.

While reading older posts I have found two possible solutions that could
work:

1. Using a contextObject which has foo and is checked in the first rule of
each rulepackage. This first rule and the remaining rules in the rulepackage
have the same agenda group. So if the first rule doesnt fit, the other rules
wont be executed, either (does this really work? ;)).

2. Putting every rulepackge in its own rulebase. Then I would check the
context in java and execute the fitting rulebase.

Let's say I have about 300 *.drl files. Which solution would be better? 

Maybe there is a better solution 3) of which I didnt think yet. Then dont
hesitate and tell it to me :)


Thanks in advance for any help.

--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools4-Filter-executed-rules-by-drl-file-tp3182568p3182568.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Integration for which Camel Version?

2011-07-19 Thread Andre
thx
  with version 2.7.0 this happens.. 
rror occurred while running main from: org.apache.camel.spring.Main
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.camel.maven.RunMojo$1.run(RunMojo.java:415)
at java.lang.Thread.run(Thread.java:636)
Caused by: java.lang.NoSuchMethodError:
org.springframework.jms.listener.DefaultMessageListenerContainer.setTaskExecutor(Ljava/util/concurrent/Executor;)V
at
org.apache.camel.component.jms.JmsEndpoint.configureListenerContainer(JmsEndpoint.java:189)
at
org.apache.camel.component.jms.JmsEndpoint.createConsumer(JmsEndpoint.java:213)
at
org.apache.camel.component.jms.JmsEndpoint.createConsumer(JmsEndpoint.java:157)
at
org.apache.camel.component.jms.JmsEndpoint.createConsumer(JmsEndpoint.java:67)
at
org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:61)
at
org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:75)
at org.apache.camel.impl.RouteService.warmUp(RouteService.java:128)
at
org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:1832)
at
org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:1758)
at
org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1548)
at
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1440)
at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1336)
at
org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:164)
at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1314)
at
org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:203)
at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:101)
at
org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:238)
at
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
at
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:428)
at
org.springframework.context.support.ClassPathXmlApplicationContext.init(ClassPathXmlApplicationContext.java:139)
at
org.springframework.context.support.ClassPathXmlApplicationContext.init(ClassPathXmlApplicationContext.java:93)
at
org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:185)
at org.apache.camel.spring.Main.doStart(Main.java:139)
at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
at org.apache.camel.impl.MainSupport.run(MainSupport.java:136)
at org.apache.camel.impl.MainSupport.run(MainSupport.java:322)
at org.apache.camel.spring.Main.main(Main.java:72)
... 6 more



--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-Integration-for-which-Camel-Version-tp3182385p3182611.html
Sent from the Drools: User forum 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] BPMN editor not working

2011-07-19 Thread Jamie
I'm trying to move from Drools 5.1.1 to 5.2 and I'm reworking my .rf files
into .bpmn files, but I've run into an issue - I use the wizard to create a
new file like MainFlow.bpmn.  After I create it, I open it using the BPMN2
process editor and all is well.  However, if I add anything to the diagram
and close it, I get an error when I try to reopen it.  An exception
occurred while reading in the RuleFlow XML:null See the error log for more
details.

Any ideas what might be wrong?  Where would I find the error log?

--
View this message in context: 
http://drools.46999.n3.nabble.com/BPMN-editor-not-working-tp3182776p3182776.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] [Drools4]: Filter executed rules by *.drl file

2011-07-19 Thread magendo

magendo wrote:
 
 1. Using a contextObject which has foo and is checked in the first rule of
 each rulepackage. This first rule and the remaining rules in the
 rulepackage have the same agenda group. So if the first rule doesnt fit,
 the other rules wont be executed, either (does this really work? ;)).
 

Well, that doesnt even seem to work. Here are 2 examples I tried out:

rule one
auto-focus
agenda-group foobar
when 
 foo != bar
then
 drools.getWorkingMemory().clearAgendaGroup(foobar);
end

rule all the other rules
agend-group foobar
when some conditions
then some consequences
end

This way the some conditions part is still executed in the lhs of all the
other rules, altough I cleared the agendagroup foobar (I guess that
happens because the rhs is only executed after fireallrules()).

There must be a way to affect the lhs of the other rules before
fireallrules() is executed?!

Btw. my LHS is quite expensive thats why I dont wont to execute it 100 times
when only the right one is needed.




--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools4-Filter-executed-rules-by-drl-file-tp3182568p3182842.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] [Drools4]: Filter executed rules by *.drl file

2011-07-19 Thread Michael Anstis
In your scenario, I believe the best (better) approach would be to use a
control fact (first in your RHS). Your context can become a Fact itself:-

rule one
when
Foo( value == bar )
...other patterns
then
...do your thang
end

rule two
when
Foo( value == bar )
...other patterns
then
...do your other thang
end

On 19 July 2011 16:25, magendo robert.heisenb...@yahoo.com wrote:


 magendo wrote:
 
  1. Using a contextObject which has foo and is checked in the first rule
 of
  each rulepackage. This first rule and the remaining rules in the
  rulepackage have the same agenda group. So if the first rule doesnt fit,
  the other rules wont be executed, either (does this really work? ;)).
 

 Well, that doesnt even seem to work. Here are 2 examples I tried out:

 rule one
 auto-focus
 agenda-group foobar
 when
  foo != bar
 then
  drools.getWorkingMemory().clearAgendaGroup(foobar);
 end

 rule all the other rules
 agend-group foobar
 when some conditions
 then some consequences
 end

 This way the some conditions part is still executed in the lhs of all
 the
 other rules, altough I cleared the agendagroup foobar (I guess that
 happens because the rhs is only executed after fireallrules()).

 There must be a way to affect the lhs of the other rules before
 fireallrules() is executed?!

 Btw. my LHS is quite expensive thats why I dont wont to execute it 100
 times
 when only the right one is needed.




 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Drools4-Filter-executed-rules-by-drl-file-tp3182568p3182842.html
 Sent from the Drools: User forum 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] BPMN editor not working

2011-07-19 Thread Jamie
I found the log and the problem.  Here's a snippet of the log:

!ENTRY org.drools.eclipse 4 120 2011-07-19 11:04:57.102
!MESSAGE Internal error in Drools Plugin: 
!STACK 0
java.lang.NullPointerException
at org.jbpm.bpmn2.xml.di.BPMNPlaneHandler.end(BPMNPlaneHandler.java:75)
at
org.drools.xml.ExtensibleXmlParser.endElement(ExtensibleXmlParser.java:414)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601)
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.endElement(XMLSchemaValidator.java:795)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1774)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2930)

The issue is that the flow didn't have an ID.  This feels like a bug to me.

--
View this message in context: 
http://drools.46999.n3.nabble.com/BPMN-editor-not-working-tp3182776p3182871.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] [Drools4]: Filter executed rules by *.drl file

2011-07-19 Thread Vincent Legendre
In my opinion, for 300 drl files, the better is to use a specific KB for 
each DRL (or some KAgent).
This way you don't have to pollute your rules with control facts (and 
you can eventually re-use some part of DRL files into multiple context 
KB), and the RETE is tightened to the strict minimum (no eval of useless 
constraints).

Moreover, I am not sure if drools compiler can really handle some 
removal or addition of rules dynamically in a existing KB without having 
to recompile all rules (so keeping up-to-date a big KB can be costly).

If you (still) want to use your solution 1 (ie control facts), you can 
also use rule inheritance (which make a rule inherit the conditions of 
another parent rule, and the parent rule will contain the check on the 
control fact) :
  rule context-rule
   enabled false // this rule won't fire by itself
when
  Context(task = bar)
then
  // not used anyway
  end

rule X extends context-rule
when
 // specific conditions
then
 // fired when specific conditions AND context-rule's conditions 
are met
end
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] concurrent modification of a rule by more than one user in Guvnor

2011-07-19 Thread Sreeram.Vadlamudi
Hi Mike,

We tried this out by testing with 2 users logging into Guvnor and changing 
rules.

When the 2 users opened the same rule one after the other, the second user did 
not get any warning . the first user was able to save his changes successfully, 
but the second user got an error indicting that the asset is out of Date and 
lost his changes .

We did confirm that users get similar error when they work on different rows of 
the same decision table .That is apparently because the lock is at the asset 
level and not at row level as has been stated in your email.

No warning seen even for decision Table when second user tried to open the same 
Table.

Thank You,

Ram
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Michael Anstis
Sent: Tuesday, July 19, 2011 1:35 AM
To: Rules Users List
Subject: Re: [rules-users] concurrent modification of a rule by more than one 
user in Guvnor

Hi,

We implement an optimistic lock at the asset level.

Multiple users can open the same asset (subsequent users should receive a 
warning) however if one attempts to save after another they should receive an 
error that their view was out of date.

We do not implement row-level locking on decision tables.

With kind regards,

Mike
On 19 July 2011 03:11, puja nandamuri 
med_9...@yahoo.commailto:med_9...@yahoo.com wrote:
Hi All,

I am currently testing 5.2.0.CR1 version of Guvnor.


Can multiple users modify a rule in Guvnor at the same time? what are the 
issues involved in say, two users trying to change

1. the same row in a decision Table at the same time and saving it.

2. different rows in a decision table at the same time and saving it.

Are there any documentation or articles to get more information on concurrent 
access within Guvnor?

Thank You,

ram.

___
rules-users mailing list
rules-users@lists.jboss.orgmailto: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] Drools Integration for which Camel Version?

2011-07-19 Thread Joe White
Check your version of spring. Camel 2.7 requires Spring 3.x

-Original Message-
From: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Andre
Sent: Tuesday, July 19, 2011 8:07 AM
To: rules-users@lists.jboss.org
Subject: Re: [rules-users] Drools Integration for which Camel Version?

thx
  with version 2.7.0 this happens.. 
rror occurred while running main from: org.apache.camel.spring.Main
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.camel.maven.RunMojo$1.run(RunMojo.java:415)
at java.lang.Thread.run(Thread.java:636)
Caused by: java.lang.NoSuchMethodError:
org.springframework.jms.listener.DefaultMessageListenerContainer.setTask
Executor(Ljava/util/concurrent/Executor;)V
at
org.apache.camel.component.jms.JmsEndpoint.configureListenerContainer(Jm
sEndpoint.java:189)
at
org.apache.camel.component.jms.JmsEndpoint.createConsumer(JmsEndpoint.ja
va:213)
at
org.apache.camel.component.jms.JmsEndpoint.createConsumer(JmsEndpoint.ja
va:157)
at
org.apache.camel.component.jms.JmsEndpoint.createConsumer(JmsEndpoint.ja
va:67)
at
org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenCo
nsumerRoute.java:61)
at
org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:
75)
at
org.apache.camel.impl.RouteService.warmUp(RouteService.java:128)
at
org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelCon
text.java:1832)
at
org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(Defau
ltCamelContext.java:1758)
at
org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultC
amelContext.java:1548)
at
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelConte
xt.java:1440)
at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.ja
va:1336)
at
org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.ja
va:164)
at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java
:1314)
at
org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext
.java:203)
at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCame
lContext.java:101)
at
org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(Camel
ContextFactoryBean.java:238)
at
org.springframework.context.event.SimpleApplicationEventMulticaster.mult
icastEvent(SimpleApplicationEventMulticaster.java:97)
at
org.springframework.context.support.AbstractApplicationContext.publishEv
ent(AbstractApplicationContext.java:303)
at
org.springframework.context.support.AbstractApplicationContext.finishRef
resh(AbstractApplicationContext.java:911)
at
org.springframework.context.support.AbstractApplicationContext.refresh(A
bstractApplicationContext.java:428)
at
org.springframework.context.support.ClassPathXmlApplicationContext.init
(ClassPathXmlApplicationContext.java:139)
at
org.springframework.context.support.ClassPathXmlApplicationContext.init
(ClassPathXmlApplicationContext.java:93)
at
org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:1
85)
at org.apache.camel.spring.Main.doStart(Main.java:139)
at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
at org.apache.camel.impl.MainSupport.run(MainSupport.java:136)
at org.apache.camel.impl.MainSupport.run(MainSupport.java:322)
at org.apache.camel.spring.Main.main(Main.java:72)
... 6 more



--
View this message in context:
http://drools.46999.n3.nabble.com/Drools-Integration-for-which-Camel-Ver
sion-tp3182385p3182611.html
Sent from the Drools: User forum 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] concurrent modification of a rule by more than one user in Guvnor

2011-07-19 Thread Michael Anstis
Ram,

All asset types when opened by a subsequent user *should* provide a warning.

Can you please raise a JIRA for this?

Thanks,

Mike

2011/7/19 sreeram.vadlam...@wellsfargo.com

 Hi Mike,

 ** **

 We tried this out by testing with 2 users logging into Guvnor and changing
 rules.

 ** **

 When the 2 users opened the same rule one after the other, the second user
 did not get any warning . the first user was able to save his changes
 successfully, but the second user got an error indicting that the asset is
 out of Date and lost his changes .

 ** **

 We did confirm that users get similar error when they work on different
 rows of the same decision table .That is apparently because the lock is at
 the asset level and not at row level as has been stated in your email.

 ** **

 No warning seen even for decision Table when second user tried to open the
 same Table.

 ** **

 Thank You,

 ** **

 Ram  

 *From:* rules-users-boun...@lists.jboss.org [mailto:
 rules-users-boun...@lists.jboss.org] *On Behalf Of *Michael Anstis
 *Sent:* Tuesday, July 19, 2011 1:35 AM
 *To:* Rules Users List
 *Subject:* Re: [rules-users] concurrent modification of a rule by more
 than one user in Guvnor

 ** **

 Hi,

 We implement an optimistic lock at the asset level.

 Multiple users can open the same asset (subsequent users should receive a
 warning) however if one attempts to save after another they should receive
 an error that their view was out of date.

 We do not implement row-level locking on decision tables.

 With kind regards,

 Mike

 On 19 July 2011 03:11, puja nandamuri med_9...@yahoo.com wrote:

 Hi All,

 I am currently testing 5.2.0.CR1 version of Guvnor.


 Can multiple users modify a rule in Guvnor at the same time? what are the
 issues involved in say, two users trying to change

 1. the same row in a decision Table at the same time and saving it.

 2. different rows in a decision table at the same time and saving it.

 Are there any documentation or articles to get more information on
 concurrent access within Guvnor?

 Thank You,

 ram.

 ___
 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


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


[rules-users] Unexpected variable binding behavior and conditional logic

2011-07-19 Thread ChrisG
Apologies if this has been addressed elsewhere: I couldn't find anything
quite like my issue.

My (greatly simplified and completely made-up) example:

Let's say I have this java class:

public class BaseballPitcher
{
 public String getName();
 public boolean isRightHanded();
 public boolean isKnuckleBaller();
}

Multiple instances of this class are created with a variety of combinations
for the name and two boolean parameters.
Now I have a rule:

rule Match pitchers: righties or knuckle-ballers
when
$kbPitcher1 : BaseballPitcher($name: name, $righty: rightHanded == true
|| 
   $knuckleballer: knuckleBaller == true)
$kbPitcher2:  BaseballPitcher(name != $name, rightHanded == $righty,
knuckleBaller == $knuckleballer)
then
// Do something with these two pitchers $kbPitcher1 and $kbPitcher2
end

I am getting the curious result that this rule fires its conclusion when
$kbPitcher1 is in fact NEITHER right-handed nor a knuckle-baller (i.e.
rightHanded == false  knuckleBaller == false). 

I've worked around this by changing the first condition in either of the
following two ways:
 *// eval() the condition*
$kbPitcher1 : BaseballPitcher($name: name, $righty: rightHanded,
$knuckleballer: knuckleBaller, 
  *eval(isRightHanded() == true || isKnuckleBaller() == true)*)
...or
 *// bind the variables before checking values*
$kbPitcher1 : BaseballPitcher($name: name, $righty: rightHanded,
$knuckleballer: knuckleBaller, 
  *rightHanded == true || knuckleBaller == true*)

Does this make sense?  Both are easy workarounds, and I believe the second
option (i.e. the one NOT using the eval) is the better solution from a
performance perspective, allowing the engine to index the these facts rather
than dynamically evaluate the condition every time.

But I'm a little surprised the first approach didn't work.  Any ideas why
not?

--
View this message in context: 
http://drools.46999.n3.nabble.com/Unexpected-variable-binding-behavior-and-conditional-logic-tp3183355p3183355.html
Sent from the Drools: User forum 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] Rule not compiling in IDE after migration to 5.2

2011-07-19 Thread Jamie
This rule used to compile in the IDE under Drools 5.1.1:

 when
  $order: OrderFact(numberOfCreditCardDeclines 
FraudCCDeclines.find().getCreditCardDeclinesThreshold())

 then
  //do something

but it's breaking since I moved to 5.2, although it runs fine when I deploy
it to the server.  Any idea why?  

If I make the  comparison static, like this:

 when
  $order: OrderFact(numberOfCreditCardDeclines  5)

 then
  //do something

It also works fine.  What's wrong?

--
View this message in context: 
http://drools.46999.n3.nabble.com/Rule-not-compiling-in-IDE-after-migration-to-5-2-tp3183689p3183689.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Rule not compiling in IDE after migration to 5.2

2011-07-19 Thread Michael Anstis
By IDE I assume you mean Eclipse? Can you try as vanilla DRL?

There were alot of changes for 5.2 for free form expressions and perhaps
you've found a regression.

On 19 July 2011 21:52, Jamie js...@llbean.com wrote:

 This rule used to compile in the IDE under Drools 5.1.1:

 when
  $order: OrderFact(numberOfCreditCardDeclines 
 FraudCCDeclines.find().getCreditCardDeclinesThreshold())

 then
  //do something

 but it's breaking since I moved to 5.2, although it runs fine when I deploy
 it to the server.  Any idea why?

 If I make the  comparison static, like this:

 when
  $order: OrderFact(numberOfCreditCardDeclines  5)

 then
  //do something

 It also works fine.  What's wrong?

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Rule-not-compiling-in-IDE-after-migration-to-5-2-tp3183689p3183689.html
 Sent from the Drools: User forum 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] Rule not compiling in IDE after migration to 5.2

2011-07-19 Thread Jamie
I do mean Eclipse.  What do you mean by 'vanilla DRL'?  It does seem to
compile and run correctly when I deploy it.

--
View this message in context: 
http://drools.46999.n3.nabble.com/Rule-not-compiling-in-IDE-after-migration-to-5-2-tp3183689p3183863.html
Sent from the Drools: User forum 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] Sheriff rota

2011-07-19 Thread Mark Proctor
Toni, Jervis, Michael, Geoffrey,

Starting from next month I'd like a Guvnor sheriff rota. I want you 
each to take it in turns, a month at a time, to wear the Sheriff badge. 
That person is then responsible for keeping the build blue, managing 
jira (keeping it up to date) and chasing people to fix bugs. So in 
general handling communications and keeping the project running 
smoothley. Also they will be responsible for the minute taking of the 
weekly minutes, so it's not all geoffrey.

Please work out a rota between yourselves and update that holiday 
google sheet that michael made with that information. I also suggest you 
update #guvnor with that month's Sheriff. Make sure john and prakash 
have access to that google sheet.

Mark

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


[rules-users] I'm on google+ follow me there

2011-07-19 Thread Mark Proctor
follow me at google+ on mdproc...@gmail.com. Mention you are a expert 
system person, so I add you to the right circle.

Mark

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