[rules-users] New Guvnor and Drools 6.0 Workbench video

2013-05-24 Thread Mark Proctor
I made this last night, it's just a quick thing, but gives an idea of the 
flexibility we have in the new Workbench.
https://www.youtube.com/watch?v=ckAznbOOV-4

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


[rules-users] Backward Chaining Tutorial

2013-05-24 Thread Mark Proctor
made this video, hope it helps in understanding backward chaining.
https://www.youtube.com/watch?v=fCjIRVSRFvA

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


[rules-users] Shadow fax

2013-05-24 Thread ronan.quintin
Hello,

First of all i have to appologise for this horrible joke, but i think you
understand that i'm interrested in shadow facts. 
I read that theses lazy facts proxy were introduced in Drools 4 in order to
make the rule engine/working memory consistent. I have some questions about
the general implentation of shadow facts in drools 5.4 :
- Did the shadow facts been implemented since version 4, or was it earlyier? 
- Are the shadow facts still implemented in drools 5.4 final? 
- How the mapping between the fact fields and the proxy fields is
implemented ? By this i want to know all fields are copy when the fact is
insert into the session. 
- Is there the possibility to disable shadow facts ?


You have to know that we get the knowledgeBase through a knowledgeAgent
which 

Thank you.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Shadow-fax-tp4023948.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] Shadow fax

2013-05-24 Thread Wolfgang Laun
On 24/05/2013, ronan.quintin ronan.quin...@gmail.com wrote:
 Hello,

 First of all i have to appologise for this horrible joke, but i think you
 understand that i'm interrested in shadow facts.

OK, but you better be careful - I was inclined to can this mail due to
its subject and the preview of the first line...

 I read that theses lazy facts proxy were introduced in Drools 4 in order to
 make the rule engine/working memory consistent. I have some questions about
 the general implentation of shadow facts in drools 5.4 :
 - Did the shadow facts been implemented since version 4, or was it earlyier?

 - Are the shadow facts still implemented in drools 5.4 final?
 - How the mapping between the fact fields and the proxy fields is
 implemented ? By this i want to know all fields are copy when the fact is
 insert into the session.
 - Is there the possibility to disable shadow facts ?

There is no such p(a)roxysm in Drools 5. Objects are inserted into
Working Memory to become facts, and that's all there is to it. Period.

-W



 You have to know that we get the knowledgeBase through a knowledgeAgent
 which

 Thank you.



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Shadow-fax-tp4023948.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] Shadow fax

2013-05-24 Thread Mark Proctor

On 24 May 2013, at 08:51, ronan.quintin ronan.quin...@gmail.com wrote:

 Hello,
 
 First of all i have to appologise for this horrible joke, but i think you
 understand that i'm interrested in shadow facts. 
 I read that theses lazy facts proxy were introduced in Drools 4 in order to
 make the rule engine/working memory consistent. I have some questions about
 the general implentation of shadow facts in drools 5.4 :
They did exist in 4, we had a similar engine to Jess then. 
http://blog.athico.com/2008/02/shadow-facts-what-you-always-wanted-to.html

They are no longer needed in 5, due to changes in our rete algorithm. See 
Assymetrical Rete algorithm:
http://blog.athico.com/2008/07/drools-50-m1-new-and-noteworthy.html
http://blog.athico.com/2008/10/symmetrical-and-asymmetrical-rete.html
http://blog.athico.com/2010/01/rete-and-true-modify.html

 - Did the shadow facts been implemented since version 4, or was it earlyier? 
 - Are the shadow facts still implemented in drools 5.4 final? 
 - How the mapping between the fact fields and the proxy fields is
 implemented ? By this i want to know all fields are copy when the fact is
 insert into the session. 
 - Is there the possibility to disable shadow facts ?
Don't need to, they are gone.
 
 
 You have to know that we get the knowledgeBase through a knowledgeAgent
 which 
 
 Thank you.
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Shadow-fax-tp4023948.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] Shadow fax

2013-05-24 Thread ronan.quintin
Ok i understand that the need to have proxies no longer exits due to new
asymetric rete algorithm. I but i'm a little bit desapointed. It seem that
when a fact is introduced into the working memory, all it's fields are
evaluate. 
I guess i have to explain what is my problem. I have business objects which
are directly used into the working memory. Theses BO are not entirely POJO,
some of them perform SQL queries. We used interfaces to produced a POJO jar,
which have been sent to knowledge base.
Previously we used drools in version 3, but now we use version 5.4 and we
notice a significant performance reduction. 
It seems that all fields of the BO are readed even if they aren't used. Our
rules are decision table in spreadsheet format. Each row's start with  a
condition on a fields which doesn't make a SQL query, so normaly there isn't
a lot of peformed SQL queries.  




--
View this message in context: 
http://drools.46999.n3.nabble.com/Shadow-fax-tp4023948p4023951.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] Shadow fax

2013-05-24 Thread Mark Proctor

On 24 May 2013, at 09:50, ronan.quintin ronan.quin...@gmail.com wrote:

 Ok i understand that the need to have proxies no longer exits due to new
 asymetric rete algorithm. I but i'm a little bit desapointed. It seem that
 when a fact is introduced into the working memory, all it's fields are
 evaluate. 
That is not true.

Only the fields used are the ones evaluated. There is no pre-processing, they 
are only touched, when the constraint itself is evaluated.
 I guess i have to explain what is my problem. I have business objects which
 are directly used into the working memory. Theses BO are not entirely POJO,
 some of them perform SQL queries. We used interfaces to produced a POJO jar,
 which have been sent to knowledge base.
 Previously we used drools in version 3, but now we use version 5.4 and we
 notice a significant performance reduction. 
 It seems that all fields of the BO are readed even if they aren't used.
This would not be a problem on the Drools side, something else must be forcing 
all field sot be read - if you are not writing constraints to read them.
 Our
 rules are decision table in spreadsheet format. Each row's start with  a
 condition on a fields which doesn't make a SQL query, so normaly there isn't
 a lot of peformed SQL queries.  
 
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Shadow-fax-tp4023948p4023951.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] Shadow fax

2013-05-24 Thread ronan.quintin
Ok, thank you for this explaination. I know that the salience can build a
priority between rules into a single excel file. But it there a priority
criteria between column? For exemple from left column to right.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Shadow-fax-tp4023948p4023953.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] Guvnor 5.5 deployment error on WAS8

2013-05-24 Thread mbrameshkumar
Hi, 

 I am trying to deploy drools guvnor 5.5 on was8.0 through admin console. It
fails with NullPointerException.
 
 Could you please suggest me the changes required in tomcat version of
guvnor war to deploy it in WAS 8 environment. Do I need to rebuild the war
file with different configurations for WAS env?
 
  Please guide me to proceed on this.

 Thanks in advance 

 Best regards
 Ramesh 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-5-5-deployment-error-on-WAS8-tp4023954.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] Benefits of pluggable operators

2013-05-24 Thread Thomas Grayson
What are the benefits of using pluggable operators (implementations of 
org.drools.base.evaluators.EvaluatorDefinition such str, matches, or before) 
versus simply making an equivalent function call?  I've read the Creating 
pluggable 
operatorshttp://blog.athico.com/2010/06/creating-pluggable-oprators.html blog 
post.  Apart from saying that the Eclipse plugin can recognize these operators, 
it doesn't really make a case for why I'd want to create my own implementation. 
 One might argue that operators enhance reusability, but a static method offers 
much the same benefit.  Does a pluggable operator have any optimization, 
caching, or other advantage?

For example, here are two ways to match the start of a string in a property of 
a fact, one using  the str[startsWith] operator and another with Java's 
String.startsWith method:

declare Fact
key : String @key
end

rule Use operator
when
Fact(key str[startsWith] abc)
then
// do something
end

rule Use method
when
Fact(key.startsWith(abc))
then
// do something
end

Does one of these perform better than the other?

Best wishes,
Tom

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

Re: [rules-users] Benefits of pluggable operators

2013-05-24 Thread Edson Tirelli
   Thomas,

   Pluggable operators were developed much before we supported free form
expressions, but nowadays they can be used for the same purpose. It is then
a matter of preference basically. You can still develop and use pluggable
operators if that makes your rule more readable by hiding complexity
related to parameter passing or something that would be required in a
method call, but I can't think of any advantage or disadvantage in either
approach in terms of performance or cost.

   If I remember correctly, pluggable operators were developed for Drools
4.0, while free form expressions were only fully functional in 5.3+
(limited functionality in 5.2).

   Edson


On Fri, May 24, 2013 at 10:54 AM, Thomas Grayson tgray...@bluemetal.comwrote:

  What are the benefits of using pluggable operators (implementations of
 org.drools.base.evaluators.EvaluatorDefinition such str, matches, or
 before) versus simply making an equivalent function call?  I’ve read the 
 Creating
 pluggable 
 operatorshttp://blog.athico.com/2010/06/creating-pluggable-oprators.htmlblog
  post.  Apart from saying that the Eclipse plugin can recognize these
 operators, it doesn’t really make a case for why I’d want to create my own
 implementation.  One might argue that operators enhance reusability, but a
 static method offers much the same benefit.  Does a pluggable operator have
 any optimization, caching, or other advantage?

 ** **

 For example, here are two ways to match the start of a string in a
 property of a fact, one using  the “str[startsWith]” operator and another
 with Java’s String.startsWith method:

 ** **

 *declare* Fact

 key : String @key

 *end*

 ** **

 *rule* Use operator

 *when*

 Fact(key str[startsWith] abc)

 *then*

 // do something

 *end*

 ** **

 *rule* Use method

 *when*

 Fact(key.startsWith(abc))

 *then*

 // do something

 *end*

 ** **

 Does one of these perform better than the other?

 ** **

 Best wishes,

 Tom

 ** **

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




-- 
  Edson Tirelli
  JBoss Drools Core Development
  JBoss by Red Hat @ www.jboss.com
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Shadow fax

2013-05-24 Thread Mark Proctor

On 24 May 2013, at 15:35, ronan.quintin ronan.quin...@gmail.com wrote:

 Ok, thank you for this explaination. I know that the salience can build a
 priority between rules into a single excel file. But it there a priority
 criteria between column? For exemple from left column to right.
no
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Shadow-fax-tp4023948p4023953.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] [Optaplanner] No-arg constructor for BendableScoreDefinition

2013-05-24 Thread jonathan.labin
I have switched to 6.0.0.beta2 and I am still receiving a similar error. 
While BendableScoreDefinition does now have a no-arg constructor, It seems
that XStream is still upset that the constructor is not public.

...
Caused by: java.lang.IllegalArgumentException: The scoreDefinitionClass
(class
org.optaplanner.core.impl.score.buildin.bendable.BendableScoreDefinition)
does not have a public no-arg constructor
at
org.optaplanner.persistence.xstream.XStreamScoreConverter.init(XStreamScoreConverter.java:43)
... 17 more
Caused by: java.lang.IllegalAccessException: Class
org.optaplanner.persistence.xstream.XStreamScoreConverter can not access a
member of class
org.optaplanner.core.impl.score.buildin.bendable.BendableScoreDefinition
with modifiers private
at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:95)
at java.lang.Class.newInstance0(Class.java:366)
at java.lang.Class.newInstance(Class.java:325)
at
org.optaplanner.persistence.xstream.XStreamScoreConverter.init(XStreamScoreConverter.java:38)
... 17 more




--
View this message in context: 
http://drools.46999.n3.nabble.com/Optaplanner-No-arg-constructor-for-BendableScoreDefinition-tp4023523p4023961.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] Benefits of pluggable operators

2013-05-24 Thread Wolfgang Laun
I'm inclined to think that a well-implemented operator can provide a
little bit more cushioning for the rule author. In the given
example, key.startsWith(abc) would throw an NPE if key is null. The
operator silently handle this case and simply return false.

Another thing is that operators can be used with the single left hand
side expression pattern, i.e.,
   field opa x || opb y || opc y
Syntactic sugar, certainly, but occasionally quite convenient.

-W


On 24/05/2013, Edson Tirelli ed.tire...@gmail.com wrote:
Thomas,

Pluggable operators were developed much before we supported free form
 expressions, but nowadays they can be used for the same purpose. It is then
 a matter of preference basically. You can still develop and use pluggable
 operators if that makes your rule more readable by hiding complexity
 related to parameter passing or something that would be required in a
 method call, but I can't think of any advantage or disadvantage in either
 approach in terms of performance or cost.

If I remember correctly, pluggable operators were developed for Drools
 4.0, while free form expressions were only fully functional in 5.3+
 (limited functionality in 5.2).

Edson


 On Fri, May 24, 2013 at 10:54 AM, Thomas Grayson
 tgray...@bluemetal.comwrote:

  What are the benefits of using pluggable operators (implementations of
 org.drools.base.evaluators.EvaluatorDefinition such str, matches, or
 before) versus simply making an equivalent function call?  I’ve read the
 Creating
 pluggable
 operatorshttp://blog.athico.com/2010/06/creating-pluggable-oprators.htmlblog
 post.  Apart from saying that the Eclipse plugin can recognize these
 operators, it doesn’t really make a case for why I’d want to create my
 own
 implementation.  One might argue that operators enhance reusability, but
 a
 static method offers much the same benefit.  Does a pluggable operator
 have
 any optimization, caching, or other advantage?

 ** **

 For example, here are two ways to match the start of a string in a
 property of a fact, one using  the “str[startsWith]” operator and another
 with Java’s String.startsWith method:

 ** **

 *declare* Fact

 key : String @key

 *end*

 ** **

 *rule* Use operator

 *when*

 Fact(key str[startsWith] abc)

 *then*

 // do something

 *end*

 ** **

 *rule* Use method

 *when*

 Fact(key.startsWith(abc))

 *then*

 // do something

 *end*

 ** **

 Does one of these perform better than the other?

 ** **

 Best wishes,

 Tom

 ** **

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




 --
   Edson Tirelli
   JBoss Drools Core Development
   JBoss by Red Hat @ www.jboss.com


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