Re: [rules-users] Building our own UI for Drools

2011-11-16 Thread kapokfly
Thanks for the information. 

Deploy multiple GUNVOR instances can't resolve our issue as we have
thousands of companies as our customer, each company will share the common
part of our applications and meantime they can customize objects/fields they
have permission with, this will be terrible if we go with the
separate/dedicate deployment and basically we think that will be not
manageable... 

What we are looking for is, be able to share a common collection of ruleset
and at the same time, be able to define their custom rules with their
customization. 

Ivan

-
Ivan, your Panda, forever
--
View this message in context: 
http://drools.46999.n3.nabble.com/Building-our-own-UI-for-Drools-tp3508849p3512037.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] Building our own UI for Drools

2011-11-16 Thread Jervis Liu
On 2011/11/16 16:37, kapokfly wrote:
 Thanks for the information.

 Deploy multiple GUNVOR instances can't resolve our issue as we have
 thousands of companies as our customer, each company will share the common
 part of our applications and meantime they can customize objects/fields they
 have permission with, this will be terrible if we go with the
 separate/dedicate deployment and basically we think that will be not
 manageable...

 What we are looking for is, be able to share a common collection of ruleset
 and at the same time, be able to define their custom rules with their
 customization.
At the moment, it is possible to achieve this by using 
role-based-authorization in Guvnor. I.e., you create some common 
packages that are designed to be shared by everyone. You assign 
package-readonly permissions to everyone so that they have read-only 
access to these common packages. You can also use Global Area to achieve 
same effect. Essentially Global area is a special package that can be 
shared by all packages. Then each user has package-admin permission for 
their own packages.

The Workspace as I mentioned early will provide a more completely 
isolated environment for each user when multiple users are sharing one 
instance of Guvnor. However we dont have any concrete stories planned 
for this yet.

Cheers,
Jervis

 Ivan

 -
 Ivan, your Panda, forever
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Building-our-own-UI-for-Drools-tp3508849p3512037.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


[rules-users] Regular Expression

2011-11-16 Thread rahulkrishnan
Can i have a regular expression in which the case of the word is not a
problem
Like any string starting with START|Start|start|STart can be matched

am able to match only the rules starting with either START or start

--
View this message in context: 
http://drools.46999.n3.nabble.com/Regular-Expression-tp3512138p3512138.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] Accumulate / collect

2011-11-16 Thread Esteban Aliverti
You already have 2 accumulate functions to do what you need:

   - collectList
   - collectSet

So, your rule will look like this:
   $countries : HashSet(empty == false) from accumulate (City($name matches
X.*, $country : country), collectSet($country))


Best Regards,



Esteban Aliverti
- Developer @ http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com


2011/11/15 Wolfgang Laun wolfgang.l...@gmail.com

 This is possible with an accumulate where you code the init/action/result
 explicily. Perhaps not fully out of the box but a box that holds
 everything would be rather big, wouldn't it? ;-)

 -W

  2011/11/15 Bruno Freudensprung bruno.freudenspr...@temis.com

  **
 Hi all,

 There is something I can't express using collect or accumulate and I
 would like to have your opinion.
 Let's imagine I have the following types :

 # a country type
 *declare Country
name : String
 end
 *
 # a city type holding a reference to its country
 *declare City
name : String
country : Country
 end
 *
 Let's imagine I have all Country and City objects into the working memory.
 I want to get the set of Countries corresponding to Cities whose name
 starts with X.

 I have the impression that I need a kind of (nonexistent right?)
 collect syntax that would look like the accumulate syntax (a kind of
 anonymous accumulate function):

 # meaning I want to collect $country objects and not City objects
 $countries : HashSet() from collect (City($name matches X.*,
 $country : country)*, $country*)

 Or a home made accumulate function that builds a set of countries:

 # custom buildset accumulate function
 $countries : HashSet() from accumulate (City($name matches X.*,
 $country : country), *buildset*($country))

 Do you see any other (possibly out of the box) solution?

 Many thanks in advance for your answers,
 Best regards,

 Bruno.


 ___
 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


Re: [rules-users] Accumulate / collect

2011-11-16 Thread Bruno Freudensprung

Hi Wolfgang, hi Estaban,

Many thanks for your insights!
I'll stick to a custom accumulate function since it is more consice than 
the init/action/result approach.
And since I am using Drools 5.1.1, I'll create functions named 
collectList and collectSet to be future proof :-)


Best regards,

Bruno.

Le 16/11/2011 10:34, Esteban Aliverti a écrit :

You already have 2 accumulate functions to do what you need:

* collectList
* collectSet

So, your rule will look like this:
   $countries : HashSet(empty == false) from accumulate (City($name 
matches X.*, $country : country), collectSet($country))



Best Regards,



Esteban Aliverti
- Developer @ http://www.plugtree.com http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com



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


Re: [rules-users] Regular Expression

2011-11-16 Thread Wolfgang Laun
Start any regular expression with (?i) and it will ignore case:
(?i)start

This can be found in java.util.regex.Pattern's javadoc.

-W

On 16 November 2011 10:32, rahulkrishnan rahulkrishn...@gmail.com wrote:

 Can i have a regular expression in which the case of the word is not a
 problem
 Like any string starting with START|Start|start|STart can be matched

 am able to match only the rules starting with either START or start

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Regular-Expression-tp3512138p3512138.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] I have 1000 rules, i want to create each 100 as one set , and fire each set when necessary

2011-11-16 Thread Esteban Aliverti
Depending on the cohesion of your rules you could have multiple solutions
to this scenario.

   1. Having different knowledge bases each one containing a set of rules.
   A knowledge base is basically a collection of rules, so you could have 10
   different kbases. The issue here is that the set of Facts (the objects you
   insert in a session) is not going to be shared between the different
   sessions of your different kbases. So you will need to insert them in the
   corresponding ksession.
   2. Having 1 kbase but separate the rule *execution* using agenda-groups.
   Please read the documentation for further information about agenda-group:
   
http://docs.jboss.org/drools/release/5.3.0.Final/drools-expert-docs/html_single/index.html
   3. Use jBPM in conjunction with rule-flow-group attribute in your rules
   to control the execution flow of your rules.


Best Regards,



Esteban Aliverti
- Developer @ http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com


On Wed, Nov 16, 2011 at 7:37 AM, srinivasasanda srinivasasa...@gmail.comwrote:

 Hi  EveryOne..
 Please if any one know give me some link, or sample example, or
 suggest how to do this, Thank u in advance

 I am Having 1000 rules and i want to make each 100 rules as one set, so i
 will 10 set , can i fire only 1 set when necessary, can i add a new rule to
 existing set dynamically,

 what is necessary of making more than one drl files, and how to load all
 drl
 at once.


 I am very new to drools.. Please suggest me some solution



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/I-have-1000-rules-i-want-to-create-each-100-as-one-set-and-fire-each-set-when-necessary-tp3511864p3511864.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] Accumulate / collect

2011-11-16 Thread Esteban Aliverti
As far as I know, these 2 functions already exist in 5.1.1. Don't they?

Best Regards,



Esteban Aliverti
- Developer @ http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com


2011/11/16 Bruno Freudensprung bruno.freudenspr...@temis.com

 **
 Hi Wolfgang, hi Estaban,

 Many thanks for your insights!
 I'll stick to a custom accumulate function since it is more consice than
 the init/action/result approach.
 And since I am using Drools 5.1.1, I'll create functions named collectList
 and collectSet to be future proof :-)

 Best regards,

 Bruno.

 Le 16/11/2011 10:34, Esteban Aliverti a écrit :

 You already have 2 accumulate functions to do what you need:

- collectList
- collectSet

 So, your rule will look like this:
$countries : HashSet(empty == false) from accumulate (City($name
 matches X.*, $country : country), collectSet($country))


  Best Regards,

 

 Esteban Aliverti
 - Developer @ http://www.plugtree.com
 - Blog @ http://ilesteban.wordpress.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] Accumulate / collect

2011-11-16 Thread Bruno Freudensprung


Just tested and... you are right (although they are not mentioned in the 
documentation)!  :-).

Great!
Thanks a lot Esteban!

Bruno.

Le 16/11/2011 10:50, Esteban Aliverti a écrit :

As far as I know, these 2 functions already exist in 5.1.1. Don't they?

Best Regards,



Esteban Aliverti
- Developer @ http://www.plugtree.com http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com


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


Re: [rules-users] Accumulate / collect

2011-11-16 Thread Esteban Aliverti
Oh yes, you are right! They were not documented in 5.1.1!

Best Regards,



Esteban Aliverti
- Developer @ http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com


2011/11/16 Bruno Freudensprung bruno.freudenspr...@temis.com

 **

 Just tested and... you are right (although they are not mentioned in the
 documentation)!  :-).
 Great!
 Thanks a lot Esteban!

 Bruno.

 Le 16/11/2011 10:50, Esteban Aliverti a écrit :

 As far as I know, these 2 functions already exist in 5.1.1. Don't they?

 Best Regards,

 

 Esteban Aliverti
 - Developer @ http://www.plugtree.com
 - Blog @ http://ilesteban.wordpress.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] Guvnor 5.3 : Guided Rule Editor : mixing formula and field constraint in same pattern makes editor crash

2011-11-16 Thread Vincent LEGENDRE
Done : GUVNOR-1753
But I think I don't have the rigths to assign someone to it ...

- Mail original -

De: Michael Anstis michael.ans...@gmail.com
À: Rules Users List rules-users@lists.jboss.org
Envoyé: Mardi 15 Novembre 2011 19:08:18
Objet: Re: [rules-users] Guvnor 5.3 : Guided Rule Editor : mixing formula and 
field constraint in same pattern makes editor crash

Yes, agreed.

Please raise a JIRA, https://issues.jboss.org/browse/GUVNOR , and assign to me.

Thanks,

Mike


2011/11/15 Vincent LEGENDRE  vincent.legen...@eurodecision.com 




Hi,
As said in the subject mixing formula and field constraint in same pattern 
makes the guided editor crash.

I had rules in 5.2, which was using such constructions, ie normal constraint 
for normal tests, and sometime a formula (which transform into in-pattern 
eval(...))
These rules cannot be opened by guvnor 5.3, but compiles.
When trying to rewrite the same rule in 5.3, everything is well until I add a 
formula constraint in a Pattern already having a normal constraint (or a 
normal after a formula).
If I let only one test type, all is fine.
Otherwise, the current condition becomes empty, the action part disappears, and 
there is no error message in logs

It seems like a bug to me. Agreed ?

I could add my eval outside the pattern, but I also use such constructs in 
some accumulate patterns ... and I don't have any solution for them (except 
writing all that stuff directly in DRL format ...).

___
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] Drools server = get a query result

2011-11-16 Thread jcp
Hi, i'm new to drools so excuse me if i'm asking newbie question.

For a project I insert via rest service a list of object to drools server,
in a stateless session - no need to use a stateful session.

The rules are fired and new objects are inserted.

ex : 
rule 1
 when 
$c : condition()
 then 
   insert(new FiredRule(my rule 1 fired, $c))
end

I also have a query who gets all the  FiredRule

query get fired rules
firedRule : FiredRule()
end

My problem is that i can't get results from query when i'm in stateless
mode.
It works in stateful mode, but I need drools to work only with object I send
via rest service at time t. I don't want them store in in the knowledge base
and be reused for a future request.

I'm block here.
I send via json the batch-execution command with insert-elements and
query = name:get fired rules,out-identifier:rules
and I have an Exception when I set an out-identifier to fire-all-rules


11:26:00,552 ERROR [DefaultErrorHandler] Failed delivery for exchangeId:
949a5873-d146-4ad3-bc9c-d0dd9f7bbc81. Exhausted after delivery attempt: 1
caught: java.lang.NullPointerException
java.lang.NullPointerException
at
org.drools.command.runtime.rule.FireAllRulesCommand.execute(FireAllRulesCommand.java:110)
at
org.drools.command.runtime.rule.FireAllRulesCommand.execute(FireAllRulesCommand.java:32)
at
org.drools.command.runtime.BatchExecutionCommandImpl.execute(BatchExecutionCommandImpl.java:155)
at
org.drools.command.runtime.BatchExecutionCommandImpl.execute(BatchExecutionCommandImpl.java:76)
at
org.drools.impl.StatelessKnowledgeSessionImpl.execute(StatelessKnowledgeSessionImpl.java:265)
at
org.drools.camel.component.DroolsExecuteProducer.process(DroolsExecuteProducer.java:100)


When I test my case with java, I can get my query results, so I am led to
think that it is a problem on server side, maybe jars in the lib???
Or is it impossible to set an out-identifier for fire-all-rules in stateless
mode?.

Another consideration were to dispose each knowledgesession (on stateful
mode) when I send request to drools, but there is no command to do that,
only stop/restart server???


Subsidiary question : is it possible to add a System.out.println() in my
query??If yes, how to do it?

Thank you for your help

JC


--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-server-get-a-query-result-tp3512272p3512272.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 server = get a query result

2011-11-16 Thread jcp
I forget to say that I work with drools 5.2.0.Final


--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-server-get-a-query-result-tp3512272p3512274.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] Corruped undo move

2011-11-16 Thread vik
Hello!

If I have this problem 
 
Corrupted undo move (Remove worker 52 from task 1.992) received from move
(Assign worker 52 to task 1.992).
Unequal lastCompletedStepScore (-6hard/0soft) and undoScore
(-6hard/-11520soft)


It's for the error in a move implementation or in a score rule ?

--
View this message in context: 
http://drools.46999.n3.nabble.com/Corruped-undo-move-tp3512364p3512364.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] Whether use agenda group or rule flow

2011-11-16 Thread Zhao Yi
We have many unit fields which has dependence on each other. I want to
implement a serial of rules to reflect the dependence among them. I am not
sure whether I use agenda-group or rule flow. What is the different between
them? 

--
View this message in context: 
http://drools.46999.n3.nabble.com/Whether-use-agenda-group-or-rule-flow-tp3512486p3512486.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] No rules loaded when reading package from Guvnor

2011-11-16 Thread sgo
Thanks for the quick replies.

@Esteban:

- Yes the rules do appear when accessing the package source published by
Guvnor
- Yes the package is built; for my understanding wouldn't trying to load an
unbuilt package from its URL generate an error?

@Michael:

Yes this is the right track... I created an alternate session without Spring
by simply loading the package from the URL with a KnowledgeBuilder, it
worked (the rules were there).

Then I went on and created another session with a KnowledgeAgent loading my
XML ChangeSet (still without Spring), and I observed the following:
1. When the session is created, all is fine (package and rules loaded
properly in session)
2. When I start the ResourceChangeScanner
(ResourceFactory.getResourceChangeScannerService().start()), however, the
loaded package disappears from the session.

So there are now two things I need to understand:
1. Why does starting the scanner clear the packages loaded in the session?
1. What is the issue when using Spring, as with Spring I still have my
package loaded in the session but no rules?

Thanks again.

Simon

--
View this message in context: 
http://drools.46999.n3.nabble.com/No-rules-loaded-when-reading-package-from-Guvnor-tp3510245p3512702.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] No rules loaded when reading package from Guvnor

2011-11-16 Thread sgo
Update: if I don't start the resource change scanner, the session created
with Spring is fine too. So, when starting the scanner, the difference
between the Spring case (package loaded but no rules) and the Java code case
(no package at all) may be due to code sequence, as in the code I'm using
the scanner is started in my service class constructor, after creating the
session in Java code but before Spring beans are injected. Depending on your
replies I may then try testing with different sequences.


sgo wrote:
 
 @Michael:
 
 Yes this is the right track... I created an alternate session without
 Spring by simply loading the package from the URL with a KnowledgeBuilder,
 it worked (the rules were there).
 
 Then I went on and created another session with a KnowledgeAgent loading
 my XML ChangeSet (still without Spring), and I observed the following:
 1. When the session is created, all is fine (package and rules loaded
 properly in session)
 2. When I start the ResourceChangeScanner
 (ResourceFactory.getResourceChangeScannerService().start()), however, the
 loaded package disappears from the session.
 
 So there are now two things I need to understand:
 1. Why does starting the scanner clear the packages loaded in the session?
 1. What is the issue when using Spring, as with Spring I still have my
 package loaded in the session but no rules?
 


--
View this message in context: 
http://drools.46999.n3.nabble.com/No-rules-loaded-when-reading-package-from-Guvnor-tp3510245p3512855.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] Building our own UI for Drools

2011-11-16 Thread GPatel
On hosted mode: 

I have the same requirement i.e hosted site with lots of external clients using 
the same site, it is indeed impractical to deploy a guvnor instance for each 
client. Overall, from what I have researched, there are two things available to 
segregate rules by external client: categories and packages, but I decided 
against using them to achieve client segregation. The approach I have arrived 
on is to launch the guvnor standalone editor from my website, store the brl in 
my tables (the standalone editor provides javascript hooks to allow retrieving 
the rule brl/drl once the rule has been written). Effectively, the only thing 
stored in the guvnor repository will be the model to enable rule authoring. 
Originally, I was planning on storing the rules in the guvnor repository and 
using the rest api to list rule packages (prefixed by clientId) in my site. 
Since I am able to retrieve the brl/drl anyways (via standalone editor 
javascript hook, or if that feature were not available, then vi!
 a rest call immediately after rule has been authored), I decided to store the 
brl/drl in my app db. Since the rules are stored in my tables, I will have full 
control over client segregation.

I have done a mini-POC to prove that this will work and it seems like it will, 
unless an expert on this mailing list can point out showstoppers/potential 
flaws/shortcomings of this approach. 

Hope this helps others who are faced with similar situations.

Thanks
G. Patel


- Original Message -
From: Jervis Liu [j...@redhat.com]
Sent: 11/16/2011 05:14 PM ZE8
To: rules-users@lists.jboss.org
Subject: Re: [rules-users] Building our own UI for Drools



On 2011/11/16 16:37, kapokfly wrote:
 Thanks for the information.

 Deploy multiple GUNVOR instances can't resolve our issue as we have
 thousands of companies as our customer, each company will share the common
 part of our applications and meantime they can customize objects/fields they
 have permission with, this will be terrible if we go with the
 separate/dedicate deployment and basically we think that will be not
 manageable...

 What we are looking for is, be able to share a common collection of ruleset
 and at the same time, be able to define their custom rules with their
 customization.
At the moment, it is possible to achieve this by using 
role-based-authorization in Guvnor. I.e., you create some common 
packages that are designed to be shared by everyone. You assign 
package-readonly permissions to everyone so that they have read-only 
access to these common packages. You can also use Global Area to achieve 
same effect. Essentially Global area is a special package that can be 
shared by all packages. Then each user has package-admin permission for 
their own packages.

The Workspace as I mentioned early will provide a more completely 
isolated environment for each user when multiple users are sharing one 
instance of Guvnor. However we dont have any concrete stories planned 
for this yet.

Cheers,
Jervis

 Ivan

 -
 Ivan, your Panda, forever
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Building-our-own-UI-for-Drools-tp3508849p3512037.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
-
The information contained in this communication (including any
attachments hereto) is confidential and is intended solely for the
personal and confidential use of the individual or entity to whom
it is addressed. If the reader of this message is not the intended
recipient or an agent responsible for delivering it to the intended
recipient, you are hereby notified that you have received this
communication in error and that any review, dissemination, copying,
or unauthorized use of this information, or the taking of any
action in reliance on the contents of this information is strictly
prohibited. If you have received this communication in error,
please notify us immediately by e-mail, and delete the original
message. Thank you 

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


Re: [rules-users] Building our own UI for Drools

2011-11-16 Thread kapokfly
Hi GPatel,

Maybe separate by package is something can be tried, but do you see the
functionality of what Gunvor provided is good enough for your usage? 

For us it is still missing some necessary functions:
given a condition, 'a = b', 
1) we would like the 'b' part could be an expression/reference to another
field, not only a value
2) we would like to be able to redefine the dot notation so it can refer to
not only a property but also its meta data information so the meta data
value can also be used as part of the rule 
3) for existing none object graph traverse we also would like to register
our own property resolver so it can load related objects into the proper
context 

Also are you able to tweak the UI to comply with your own application's
style?
And does your object also share a common rulesets across different
customers? How you design this part in your POC so any potential upgrade
could be easier? 

Ivan

-
Ivan, your Panda, forever
--
View this message in context: 
http://drools.46999.n3.nabble.com/Building-our-own-UI-for-Drools-tp3508849p3512962.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] Whether use agenda group or rule flow

2011-11-16 Thread FrankVhh
Essentially, agenda-groups and rule-flow groups do the same job. They filter
rules based on their group membership such that rules from active groups
will fire.

The difference is in the implementation. Ruleflow-groups require a ruleflow
to be defined. A group will become active when the token has reached the
corresponding rule task. When working with agenda-groups, focus has to be
set either explicitly, by calling setFocus(), or automatically, by using the
attribute auto-focus.

Most of the times, there will probably be no clear preference of one over
the other.

Imho, it seems that rule-flow groups are a bit more understandable and a
little bit easier to debug. Agenda-groups, however, allow for more
flexibility because the sequence of the groups can be defined dynamically.

As an example where I consider agenda-groups a better choice:
Imagine there is a supplement/reduction that has to be applied at different
moments during price calculation, depending on certain parameters. Imho, it
is easier to set focus to the supplement/reduction group whenever necessary,
rather than implementing all different branches in a flow. If the sequence
is fixed and well known, ruleflow-groups are probably better.

But anyway, feel free to disagree.

Regards,
Frank  


Zhao Yi wrote:
 
 We have many unit fields which has dependence on each other. I want to
 implement a serial of rules to reflect the dependence among them. I am not
 sure whether I use agenda-group or rule flow. What is the different
 between them?
 


--
View this message in context: 
http://drools.46999.n3.nabble.com/Whether-use-agenda-group-or-rule-flow-tp3512486p3513063.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] [rules-dev] class loading problems with 5.3.0-Final and 5.4.0-SNAPSHOT

2011-11-16 Thread Mauricio Salatino
Based on more tests and reading some articles about OSGI we (Professor
dotty and I) have found that
the composite class loader from drools is using Class.forName that is being
intercepted by the equinox OSGI container -
at
org.eclipse.core.runtime.internal.adaptor.ContextFinder.loadClass(ContextFinder.java:124)

It looks like both are trying to load the same class definition and the JVM
throws the ClassCircularityError.

For my very basic example changing the CompositeClassLoader implementation
to use:

cls = classLoader.loadClass(name);

instead of:
cls = Class.forName( name,
 resolve,
 classLoader );

Fix the problems. But I'm not sure if that will work for all the other
cases.
Looking the usages of Class.forName inside compiler, core and api I found
that it is being used 39 times, which worries me.
I'm not planning to change all of them without being sure that is the right
way to go.  I will continue reading and testing to see if changing the way
of loading the classes is the only alternative.

Some notes about the difference between loadClass and forName:


   - Classloader.loadClass() caches the loaded class object and returns
   always the same class object
  - This is done by the defining class loader
  - This ensures that each classloader loads the same class only once
   - Class.forName() calls the normal classloader hierarchy to load the
   class (same happens as above)
  - But caches the class object within the initiating class loader
  - In standard cases no problem but can be tricky in dynamic
  environments


Source -
http://www.martinlippert.org/events/WJAX2008-ClassloadingTypeVisibilityOSGi.pdf

On Tue, Nov 15, 2011 at 4:04 PM, Davide Sottara dso...@gmail.com wrote:

 Lovely exception...
 Well, both my life and salaboy's depend on solving this issue... Mark and I
 were also considering to review the Composite ClassLoader at some point in
 the future, since it causes issues with (re)declared types in DRLs loaded
 at
 runtime. Looks like we'll have to catch two birds with one stone :)
 Salaboy, can you share the simple service and the WSO2 config details?
 (version, any custom setting, etc...)

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/rules-users-class-loading-problems-with-5-3-0-Final-and-5-4-0-SNAPSHOT-tp3509949p3510640.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




-- 
 - CTO @ http://www.plugtree.com
 - MyJourney @ http://salaboy.wordpress.com
 - Co-Founder @ http://www.jugargentina.org
 - Co-Founder @ http://www.jbug.com.ar

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


Re: [rules-users] Building our own UI for Drools

2011-11-16 Thread GPatel
For #1 and #2, I am planning on using DSL that uses a separate model, 
built specifically for rule writing, that wraps around the actual 
application domain model. DSL sentences are not quite as user friendly, 
the rule writer has to pick from a huge list of DSL sentences as opposed 
to incremental condition phrase building available from the native rule 
editor, but there is no other way, short of building your own rule editor.

The common rulesets, due to their very nature, I am not exposing to the 
clients for editing, they are internal. The KnowledgeBuilder api can load 
common rules (which could be in .drl files) in addition to guvnor rules.

Thanks
Ghanshyam



From:   kapokfly ivan.jiang...@foxmail.com
To: rules-users@lists.jboss.org
Date:   11/16/2011 08:16 AM
Subject:Re: [rules-users] Building our own UI for Drools
Sent by:rules-users-boun...@lists.jboss.org



Hi GPatel,

Maybe separate by package is something can be tried, but do you see the
functionality of what Gunvor provided is good enough for your usage? 

For us it is still missing some necessary functions:
given a condition, 'a = b', 
1) we would like the 'b' part could be an expression/reference to another
field, not only a value
2) we would like to be able to redefine the dot notation so it can refer 
to
not only a property but also its meta data information so the meta data
value can also be used as part of the rule 
3) for existing none object graph traverse we also would like to register
our own property resolver so it can load related objects into the proper
context 

Also are you able to tweak the UI to comply with your own application's
style?
And does your object also share a common rulesets across different
customers? How you design this part in your POC so any potential upgrade
could be easier? 

Ivan

-
Ivan, your Panda, forever
--
View this message in context: 
http://drools.46999.n3.nabble.com/Building-our-own-UI-for-Drools-tp3508849p3512962.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



-
The information contained in this communication (including any
attachments hereto) is confidential and is intended solely for the
personal and confidential use of the individual or entity to whom
it is addressed. If the reader of this message is not the intended
recipient or an agent responsible for delivering it to the intended
recipient, you are hereby notified that you have received this
communication in error and that any review, dissemination, copying,
or unauthorized use of this information, or the taking of any
action in reliance on the contents of this information is strictly
prohibited. If you have received this communication in error,
please notify us immediately by e-mail, and delete the original
message. Thank you ___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] No rules loaded when reading package from Guvnor

2011-11-16 Thread Esteban Aliverti
I think you are fighting with this known bug:
https://issues.jboss.org/browse/GUVNOR-1699

ResourceChangeScanner is marking guvnor's resources as removed. I committed
a patch some days ago.
If you are not interested in keep the kbase in sync with the changes made
in Guvnor, a valid workaround could be not to use the kagent and get the
pkg directly from Guvnor's URL

Best Regards,



Esteban Aliverti
- Developer @ http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com


On Wed, Nov 16, 2011 at 3:43 PM, sgo simon.gou...@elca.ch wrote:

 Update: if I don't start the resource change scanner, the session created
 with Spring is fine too. So, when starting the scanner, the difference
 between the Spring case (package loaded but no rules) and the Java code
 case
 (no package at all) may be due to code sequence, as in the code I'm using
 the scanner is started in my service class constructor, after creating the
 session in Java code but before Spring beans are injected. Depending on
 your
 replies I may then try testing with different sequences.


 sgo wrote:
 
  @Michael:
 
  Yes this is the right track... I created an alternate session without
  Spring by simply loading the package from the URL with a
 KnowledgeBuilder,
  it worked (the rules were there).
 
  Then I went on and created another session with a KnowledgeAgent loading
  my XML ChangeSet (still without Spring), and I observed the following:
  1. When the session is created, all is fine (package and rules loaded
  properly in session)
  2. When I start the ResourceChangeScanner
  (ResourceFactory.getResourceChangeScannerService().start()), however, the
  loaded package disappears from the session.
 
  So there are now two things I need to understand:
  1. Why does starting the scanner clear the packages loaded in the
 session?
  1. What is the issue when using Spring, as with Spring I still have my
  package loaded in the session but no rules?
 


 --
 View this message in context:
 http://drools.46999.n3.nabble.com/No-rules-loaded-when-reading-package-from-Guvnor-tp3510245p3512855.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] No rules loaded when reading package from Guvnor

2011-11-16 Thread Michael Anstis
The patch has not been applied yet.

@esteban, did you modify to (a) include the other two changes, (b) a
test-case?

Cheers,

Mike

2011/11/16 Esteban Aliverti esteban.alive...@gmail.com

 I think you are fighting with this known bug:
 https://issues.jboss.org/browse/GUVNOR-1699

 ResourceChangeScanner is marking guvnor's resources as removed. I
 committed a patch some days ago.
 If you are not interested in keep the kbase in sync with the changes made
 in Guvnor, a valid workaround could be not to use the kagent and get the
 pkg directly from Guvnor's URL

 Best Regards,

 

 Esteban Aliverti
 - Developer @ http://www.plugtree.com
 - Blog @ http://ilesteban.wordpress.com


 On Wed, Nov 16, 2011 at 3:43 PM, sgo simon.gou...@elca.ch wrote:

 Update: if I don't start the resource change scanner, the session created
 with Spring is fine too. So, when starting the scanner, the difference
 between the Spring case (package loaded but no rules) and the Java code
 case
 (no package at all) may be due to code sequence, as in the code I'm using
 the scanner is started in my service class constructor, after creating the
 session in Java code but before Spring beans are injected. Depending on
 your
 replies I may then try testing with different sequences.


 sgo wrote:
 
  @Michael:
 
  Yes this is the right track... I created an alternate session without
  Spring by simply loading the package from the URL with a
 KnowledgeBuilder,
  it worked (the rules were there).
 
  Then I went on and created another session with a KnowledgeAgent loading
  my XML ChangeSet (still without Spring), and I observed the following:
  1. When the session is created, all is fine (package and rules loaded
  properly in session)
  2. When I start the ResourceChangeScanner
  (ResourceFactory.getResourceChangeScannerService().start()), however,
 the
  loaded package disappears from the session.
 
  So there are now two things I need to understand:
  1. Why does starting the scanner clear the packages loaded in the
 session?
  1. What is the issue when using Spring, as with Spring I still have my
  package loaded in the session but no rules?
 


 --
 View this message in context:
 http://drools.46999.n3.nabble.com/No-rules-loaded-when-reading-package-from-Guvnor-tp3510245p3512855.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


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


Re: [rules-users] No rules loaded when reading package from Guvnor

2011-11-16 Thread Michael Anstis
Take that back.

I see ge0ffrey merged

On 16 November 2011 17:51, Michael Anstis michael.ans...@gmail.com wrote:

 The patch has not been applied yet.

 @esteban, did you modify to (a) include the other two changes, (b) a
 test-case?

 Cheers,

 Mike


 2011/11/16 Esteban Aliverti esteban.alive...@gmail.com

 I think you are fighting with this known bug:
 https://issues.jboss.org/browse/GUVNOR-1699

 ResourceChangeScanner is marking guvnor's resources as removed. I
 committed a patch some days ago.
 If you are not interested in keep the kbase in sync with the changes made
 in Guvnor, a valid workaround could be not to use the kagent and get the
 pkg directly from Guvnor's URL

 Best Regards,

 

 Esteban Aliverti
 - Developer @ http://www.plugtree.com
 - Blog @ http://ilesteban.wordpress.com


 On Wed, Nov 16, 2011 at 3:43 PM, sgo simon.gou...@elca.ch wrote:

 Update: if I don't start the resource change scanner, the session created
 with Spring is fine too. So, when starting the scanner, the difference
 between the Spring case (package loaded but no rules) and the Java code
 case
 (no package at all) may be due to code sequence, as in the code I'm using
 the scanner is started in my service class constructor, after creating
 the
 session in Java code but before Spring beans are injected. Depending on
 your
 replies I may then try testing with different sequences.


 sgo wrote:
 
  @Michael:
 
  Yes this is the right track... I created an alternate session without
  Spring by simply loading the package from the URL with a
 KnowledgeBuilder,
  it worked (the rules were there).
 
  Then I went on and created another session with a KnowledgeAgent
 loading
  my XML ChangeSet (still without Spring), and I observed the following:
  1. When the session is created, all is fine (package and rules loaded
  properly in session)
  2. When I start the ResourceChangeScanner
  (ResourceFactory.getResourceChangeScannerService().start()), however,
 the
  loaded package disappears from the session.
 
  So there are now two things I need to understand:
  1. Why does starting the scanner clear the packages loaded in the
 session?
  1. What is the issue when using Spring, as with Spring I still have my
  package loaded in the session but no rules?
 


 --
 View this message in context:
 http://drools.46999.n3.nabble.com/No-rules-loaded-when-reading-package-from-Guvnor-tp3510245p3512855.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



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


Re: [rules-users] No rules loaded when reading package from Guvnor

2011-11-16 Thread Michael Anstis
@esteban

But the other two Response.ok(...).header(...) should be fixed and
submitted as another pull request, please :)

And the test - if you have one.

:)

On 16 November 2011 17:54, Michael Anstis michael.ans...@gmail.com wrote:

 Take that back.

 I see ge0ffrey merged


 On 16 November 2011 17:51, Michael Anstis michael.ans...@gmail.comwrote:

 The patch has not been applied yet.

 @esteban, did you modify to (a) include the other two changes, (b) a
 test-case?

 Cheers,

 Mike


 2011/11/16 Esteban Aliverti esteban.alive...@gmail.com

 I think you are fighting with this known bug:
 https://issues.jboss.org/browse/GUVNOR-1699

 ResourceChangeScanner is marking guvnor's resources as removed. I
 committed a patch some days ago.
 If you are not interested in keep the kbase in sync with the changes
 made in Guvnor, a valid workaround could be not to use the kagent and get
 the pkg directly from Guvnor's URL

 Best Regards,

 

 Esteban Aliverti
 - Developer @ http://www.plugtree.com
 - Blog @ http://ilesteban.wordpress.com


 On Wed, Nov 16, 2011 at 3:43 PM, sgo simon.gou...@elca.ch wrote:

 Update: if I don't start the resource change scanner, the session
 created
 with Spring is fine too. So, when starting the scanner, the difference
 between the Spring case (package loaded but no rules) and the Java code
 case
 (no package at all) may be due to code sequence, as in the code I'm
 using
 the scanner is started in my service class constructor, after creating
 the
 session in Java code but before Spring beans are injected. Depending on
 your
 replies I may then try testing with different sequences.


 sgo wrote:
 
  @Michael:
 
  Yes this is the right track... I created an alternate session without
  Spring by simply loading the package from the URL with a
 KnowledgeBuilder,
  it worked (the rules were there).
 
  Then I went on and created another session with a KnowledgeAgent
 loading
  my XML ChangeSet (still without Spring), and I observed the following:
  1. When the session is created, all is fine (package and rules loaded
  properly in session)
  2. When I start the ResourceChangeScanner
  (ResourceFactory.getResourceChangeScannerService().start()), however,
 the
  loaded package disappears from the session.
 
  So there are now two things I need to understand:
  1. Why does starting the scanner clear the packages loaded in the
 session?
  1. What is the issue when using Spring, as with Spring I still have my
  package loaded in the session but no rules?
 


 --
 View this message in context:
 http://drools.46999.n3.nabble.com/No-rules-loaded-when-reading-package-from-Guvnor-tp3510245p3512855.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




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


[rules-users] Guvnor: Work in progresss - Guided Decision Table editor and Template Data editor

2011-11-16 Thread Michael Anstis
I am refactoring the mergable grid widget, used by the captioned, to an
event-based design and have pushed changes to the master branch in github.

I pushed the changes as Jervis Liu is completing a major re-organisation of
the Guvnor code-base this week and I didn't want to end up with merge
conflict hell :)

The changes, at this stage, are incomplete. Consequently the captioned
editors do not fully work at the moment in the master branch. 5.3.0.Final
is unaffected.

So, if you get the latest code github's master branch be warned. My changes
will complete this week or early next.

With kind regards,

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


Re: [rules-users] Property access on Java Beans (POJO's)

2011-11-16 Thread kapokfly
Hi Mark,

Any comment with drools how we can register our own property resolver and
able to delegate the actual work back to drools default implementation if
necessary? 

And why you say the MVEL is far better than Spring EL? How about JXEL? Do
you also have kind of comparison table available? 

It is likely that we will not adopt Drools however an expression language
would be necessary for us.  

Ivan

-
Ivan, your Panda, forever
--
View this message in context: 
http://drools.46999.n3.nabble.com/Property-access-on-Java-Beans-POJO-s-tp3509973p3514445.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] Can't open bpmn from Visual Editor in Process Editor

2011-11-16 Thread ANJALI
I hope to fill in the properties not yet handled in the Visual Editor with
the Process Editor.
 
A workflow created with the Visual Editor that contains Rule Tasks throws an
exception when opened in the Process Editor An exception occurred while
reading in the RuleFlow XML: No messages found See the error log for more
details. Where is the error log and how do I fix the xml in a text editor?
 
Another error when opening with the Process Editor is a Gateway direction is
unspecified. I set Gateway directions in the Visual Editor to Diverging and
Converging, save the file, but the properties view shows it goes back to
Unspecified.
 
Could any one help me??

Thanks in advance,
Anjali

--
View this message in context: 
http://drools.46999.n3.nabble.com/Can-t-open-bpmn-from-Visual-Editor-in-Process-Editor-tp3514796p3514796.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 stateful session, cluster and replication

2011-11-16 Thread Rules
any one ?? 

--
View this message in context: 
http://drools.46999.n3.nabble.com/drools-stateful-session-cluster-and-replication-tp3509139p3514945.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