Re: [rules-users] Enabling Role Base Authorization in Guvnor.

2011-11-14 Thread Jervis Liu
Manohar Kokkula wrote:
> Hi all,
>
> I am trying to enable the Role Base Authorization in Guvnor after it 
> was running
> fine with the default login mechanism.
> But, encountered some problem with the attempt.
> I followed given steps:
>
>
> Step 1:
> I exploded guvnor-5.2.0.Final-jboss-as-5.1.war file, got 
> guvnor-5.2.0.Final-jboss-as-5.1 folder,
> in this I located component.xml(guvnor-5.2.0.Final-jboss-as-5.1/WEB-INF/)
>
> What I did was that in the components.xml,
> - commented out the default  authenticate-method="#{defaultAuthenticator.authenticate}"/>
> - uncomment the  authenticate-method="#{authenticator.authenticate}"
> jaas-config-name="other"/>
> - change the role base authorization to true,
>  enable-role-based-authorization="true"/>
>
>
> Step 2:
> And at the login-config.xml from jboss-5.0.0.GA/server/default/conf/
>
> I have changed the "other" application policy to
> 
>
>"org.jboss.security.auth.spi.UsersRolesLoginModule"
>  flag = "required" >
> name="usersProperties">props/guvnor-users.properties
> name="rolesProperties">props/guvnor-roles.properties
>   
>
> 
>
>
> guvnor-users.properties
> admin=admin123
>
> guvnor-roles.properties
> admin=admin
>
>
> Step 3:
> At last I created new guvnor-5.2.0.Final-jboss-as-5.1.war file from 
> guvnor-5.2.0.Final-jboss-as-5.1 folder and deployed the updated war 
> file into boss-5.0.0.GA/server/default/deploy
>
> At last I am unable to login into BRMS,
> I got following error message in Browser,
>
> *HTTP Status 404 - /guvnor-5.2.0.Final-jboss-as-5.1/*
>
> *type Status report*
>
> *message /guvnor-5.2.0.Final-jboss-as-5.1/*
>
> *description The requested resource 
> (/guvnor-5.2.0.Final-jboss-as-5.1/) is not available.*
> *JBoss Web/2.1.1.GA*
>
The problem is not with your authentication. It is sth wrong with the 
guvnor war ("*The requested resource (/guvnor-5.2.0.Final-jboss-as-5.1/) 
is not available.* ") you created. Take a look into the log file, it 
should give you more info.

BTW, you can deploy the exploded war directory directly into AS 5.1.

Cheers,
Jervis
> Please guide me any one.
>
>
>
> Thanks and regards
> Manohar Kokkula
> Mailto: manohar.kokk...@tcs.com
> =-=-=
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain 
> confidential or privileged information. If you are 
> not the intended recipient, any dissemination, use, 
> review, distribution, printing or copying of the 
> information contained in this e-mail message 
> and/or attachments to it are strictly prohibited. If 
> you have received this communication in error, 
> please notify us by reply e-mail or telephone and 
> immediately and permanently delete the message 
> and any attachments. Thank you
>
>
>   
> 
>
> ___
> 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] Enabling Role Base Authorization in Guvnor.

2011-11-14 Thread Manohar Kokkula
Hi all,

I am trying to enable the Role Base Authorization in Guvnor after it was 
running
fine with the default login mechanism.
But, encountered some problem with the attempt.
I followed given steps:


Step 1:
I exploded guvnor-5.2.0.Final-jboss-as-5.1.war file, got 
guvnor-5.2.0.Final-jboss-as-5.1 folder, 
in this I located component.xml(guvnor-5.2.0.Final-jboss-as-5.1/WEB-INF/)

What I did was that in the components.xml,
- commented out the default 
- uncomment the 
- change the role base authorization to true,



Step 2:
And at the login-config.xml from jboss-5.0.0.GA/server/default/conf/

I have changed the "other" application policy to

   
  
   props/guvnor-users.properties
   props/guvnor-roles.properties
  
   



guvnor-users.properties
admin=admin123

guvnor-roles.properties
admin=admin


Step 3:
At last I created new guvnor-5.2.0.Final-jboss-as-5.1.war file from 
guvnor-5.2.0.Final-jboss-as-5.1 folder and deployed the updated war file 
into boss-5.0.0.GA/server/default/deploy

At last I am unable to login into BRMS,
I got following error message in Browser,

HTTP Status 404 - /guvnor-5.2.0.Final-jboss-as-5.1/

type Status report

message /guvnor-5.2.0.Final-jboss-as-5.1/

description The requested resource (/guvnor-5.2.0.Final-jboss-as-5.1/) is 
not available.
JBoss Web/2.1.1.GA

Please guide me any one.



Thanks and regards
Manohar Kokkula
Mailto: manohar.kokk...@tcs.com
=-=-=
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


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


[rules-users] Building our own UI for Drools

2011-11-14 Thread kapokfly
Due to some reasons (for example, build a consistent UI within our own
application, easier to work with our own meta data, don't want SSO etc), we
are considering to build our own UI to generate Drools rule file basing on
the user input via the UI , has anyone tried this before? Is there any
library shipped within Drools Gunvor can be used to be easier to work with
Drools rule syntax? 

Thanks,
Ivan

-
Ivan, your Panda, forever
--
View this message in context: 
http://drools.46999.n3.nabble.com/Building-our-own-UI-for-Drools-tp3508849p3508849.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] when to use separate drl file , its advantage and disadvantage

2011-11-14 Thread srinivasasanda

Hai EveryOne..
   when to use separate drl file, and when not to use, what are
advantages and disadvantages, if we tell resource type drl , only that is
loaded into inference engine or all rules files will loads.

--
View this message in context: 
http://drools.46999.n3.nabble.com/when-to-use-separate-drl-file-its-advantage-and-disadvantage-tp3508712p3508712.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] How can I get rule's agenda group name?

2011-11-14 Thread Zhao Yi
I add an AgendaEventListener on a statefulesession. In beforeActivationFired
method, I can get a Rule object by
BeforeActivationFiredEvent.getActivation().getRule(). If the rule is
configured in an agenda group, how can I get the agenda group name from the
Rule object?

Thanks,
Zhao Yi

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-can-I-get-rule-s-agenda-group-name-tp3508539p3508539.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] Fusion : must declare @role(event) for all class hierarchy ?

2011-11-14 Thread Davide Sottara
I think have already fixed it in a trait-related pull request I'm working on. 
It also fixes a couple of bugs, including the metadata inheritance problem.
Nevertheless, please provide a test case and a JIRA :)
Thanks
Davide

--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-Fusion-must-declare-role-event-for-all-class-hierarchy-tp3506862p3508356.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] programming classes to represent domain in Drools like templates

2011-11-14 Thread Welsh, Armand
Keep in mind that using these Declared Types in DRL will have an impact in high 
volume systems.  Each time a knowledge session is initialized, these classes 
are dynamically loaded onto the class-path.  This dynamic loading (and 
unloading) subjects your knowledgesession to a large amount of garbage 
collection.  As a result, if you have a high volume processing system you could 
very quickly reach a heap exception due to insufficient garbage collection.  In 
real-time point processing this does not cause a problem, but in high volume 
processing it could.

I have noticed that in my high-volume applications, anytime I use decalred 
types or DRL functions, that my rules run about 20% slower than when I use the 
exact same code in my JAVA system, and have Drools access them as imported 
functions, and types.  (because they are local to the app, Drools does not have 
to invoke the class loader on all these objects, which does slow down 
processing time).

Keep in mind, I don't know the details of what drools is doing, but I have 
observed behavior in the JVM via monitoring tools to support this claim at a 
basic level.  So go ahead and use declared types, but if you find yourself 
running into a bunch of weird processing errors, it may be because of the 
declared types.

From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Esteban Aliverti
Sent: Monday, November 14, 2011 3:21 AM
To: Rules Users List
Subject: Re: [rules-users] programming classes to represent domain in Drools 
like templates

If you don't want to define your model as Java classes you can define it in drl 
syntax: 
http://docs.jboss.org/drools/release/5.3.0.Final/drools-expert-docs/html_single/index.html#d0e3390

Best Regards,



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

On Mon, Nov 14, 2011 at 12:06 PM, santiago carbonell 
mailto:scarbon...@ono.com>> wrote:
Hi,

I'm new in drools and I'm doing some test with this fantastic engine. With
Drools, I've loaded a drl file with some rules and ran with drools engine
and works perfect, but I got to preset/programming some classes in Java
about the domain where rules worked.

I'd like to load this domain, this "classes" as a file, like drl files, but
insted of rules, I'd like to load classes, or domain, so I'd needn't to
preset/programming this classes in Java.

My question is how can I load this classes in some file, like drl files with
rules? Is like templates in clips.

Thanks


--
View this message in context: 
http://drools.46999.n3.nabble.com/programming-classes-to-represent-domain-in-Drools-like-templates-tp3506503p3506503.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] Showstopper issues for Drools Adoption in our organization

2011-11-14 Thread Welsh, Armand
Kapokfly,

For issue 1:

I have a very similar issue.  What I am currently doing, is to pre-load my 
reference data from DB into my JVM, but I do not load those entities into 
working memory.  Instead, I have the rules written to use the FROM clause in 
the left hand side of the rule.

Example:
When
Customer ( $indCode : clientIndustry, activeSw == true )
$industry : Industry () from lookupIndustry( $indCode )

What this does, is obtain the client Industry code from my customer object, and 
capture the value to the "$indCode" variable.  I then capture all Industry 
objects into the "$industry" variable that are returned from the call to the 
function "lookupIndustry()".  The lookupIndustry function is purpose built to 
locate the specific industry objects that meet the query criteria provided as 
the function argument.  In this case, I am looking up the industry from a map 
of Industries, with the key of the map set to the unique Industry code.

In my real-world scenario, I would prefer to rely on a no:sql DB to perform the 
lookups for me.  This would buy me the performance benefits of my key:value 
maps being driven by faster C/C++ code, while removing the need to me to code 
such lookup and caching services in my own code.  

In addition, my caching process, does actually cache my DB objects in the JVM 
memory, but instead it preloads my no:sql DB with all my facts, and using a 
Real Time Messaging system, I intercept all DB updates to sync up my no:sql 
data. 

The no:sql is not always the best fit, but because of the types of lookups I 
need to perform, no:sql can retrieve my facts from DB and return them to my 
code as instantiated objects much faster can JPA, or native SQL queries against 
my RDBMS, and with much less memory impact than locally coded JAVA data maps.

Two million records is a lot, regardless of the actual data content, so it 
seems to me you might want to either query SQL using an function, or querying a 
no:sql system (like mongodb) and then using this logic to process on the data 
in almost the same way you would had you loaded the data in working memory of 
the knowledge session.

Hope this helps.

Regards,
Armand Welsh

-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of kapokfly
Sent: Friday, November 11, 2011 2:54 AM
To: rules-users@lists.jboss.org
Subject: [rules-users] Showstopper issues for Drools Adoption in our 
organization

Not sure if these are also your questions you might have with the rule engine 
adoption, but we have seen 2 showstopper issues for drools adoption in our 
organization, or it is just because we are lack of some necessary knowledge. 

Issue 1) : pattern match for large data 

There are cases in a rule we need find matched records against a large 
population of data and perform some actions.

Example:
From 2 millions employee directory, find those belongs to Depart1 and with 
salary increased by 10% last year. 

Inserting all these employee's data into WorkingMemory is HUGE and mission 
impossible, we can't simply load the entire db into the working memory, do we 
have any other approach to accomplish or this is just not a use case can be 
resolved by a rule engine?


Issue 2): Map business object to real engineering implementation

What we are trying to do is to build a rule UI which a business user without 
engineering background of our codebase can work with; the business object we 
show on the UI might be different with the real engineering objects already in 
system, for example, on the UI a user might be able to able to see something 
like person.address.addressLine1 but the actually implementation might not be 
an object traverse implementation. 

Example, the model could be Long Person.addressId ; then referring to his 
address we need another lookup and we want to hide such complexity to the end 
user. 

The approach we took is to design a translation layer to translate the user 
input to drools rule string, is this the right approach?

If not, any suggestions? I know Drools is mainly designed for developers but 
just trying to see if there is any way we can work it around. 

Thanks and looking forward to your recommendations. 

Ivan








-
Ivan, your Panda, forever
--
View this message in context: 
http://drools.46999.n3.nabble.com/Showstopper-issues-for-Drools-Adoption-in-our-organization-tp3499367p3499367.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] Adding a custom logo to Drools Guvnor

2011-11-14 Thread LCode
>From an end-user perspective I think the option to replace the 'basics'
simply by unpacking the war file is spot on, especially as this is the way
it was in previous versions. That way I can make some customisations and
have the app ready to go without having to understand git, mvn and the rest.
It would seem sensible, therefore, to allow just the logo to be the
exception to the GWT rule.

Just my opinion though - I realise that this might contradict some of your
design principals!

Jen

--
View this message in context: 
http://drools.46999.n3.nabble.com/Adding-a-custom-logo-to-Drools-Guvnor-tp3503516p3507799.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] Guvnor 5.3 : No more "Create New ..." button in "Browse" view ?

2011-11-14 Thread Michael Anstis
IIRC its because we felt we had an unnecessary duplication. We also plan on
changing the remaining button over time too.

sent on the move

On 14 Nov 2011 19:04, "Vincent LEGENDRE" 
wrote:

> Yep, I saw the button under KB ...
> But why ?
>
> --
> *De: *"Michael Anstis" 
> *À: *"Rules Users List" 
> *Envoyé: *Lundi 14 Novembre 2011 19:51:43
> *Objet: *Re: [rules-users] Guvnor 5.3 : No more "Create New ..." button
> in "Browse" view ?
>
> It was deliberate AFAIK.
>
> The button still exists under "Knowledge Bases".
>
> 2011/11/14 Vincent LEGENDRE 
>
>> Hi all,
>>
>> The question is in the subjec :
>> In 5.2 there was a "create new" button in "browse" panel, which allow
>> business user to create new assets.
>> In 5.3, no more button ...
>>
>> Is it on purpose ?
>> Is it a bug ?
>> Is there a way to get it back ?
>> Does it appears only under some conditions ?
>>
>> ___
>> 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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] drools + AWS

2011-11-14 Thread Bobby Richards
anyone running a drools app or more specifically guvnor on amazon's web
service?
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Fwd: 5.3.0 Final - Rule using accumulate with windows:length delivers an unexpected result

2011-11-14 Thread Edson Tirelli
   Sorry, but which results exactly are you seeing?

   Edson

2011/11/14 Michael Anstis 

> I'd have to defer to the drools-expert people.. as the problem appears to
> be with 5.3.0.Final of drools-expert.
>
> As a reminder, the DRL failing in 5.3.0.Final (or giving different results
> to 5.2.0?) is:-
>
> rule "Event Processing Evaluation"
>  dialect "mvel"
> when
>$list:java.util.List() from collect( evalEvent(wam == 'D1', f != null)over 
> window:length( 1 ))
> $average:Double() from accumulate( evalEvent($vf:f) from
>$list,average($vf) )
>eval($average > 5)
> then
>internalEvent fact0 = new internalEvent();
>fact0.setDesrc( "Internal Event: "+ $average );
>insert(fact0 );
> end
>
> -- Forwarded message --
> From: axel 
> Date: 14 November 2011 08:16
> Subject: Re: [rules-users] Guvnor (5.3.0 Final)- Rule using accumulate
> with windows:length delivers an unexpected result
> To: rules-users@lists.jboss.org
>
>
> Thanks Mike.
>
> So, now I've included Drools 5.3.0 Final in my Eclipse Drools Project too
> and discovered the same problem as in Guvnor with my example. There is a
> difference between 5.2.0 Final (works well) and 5.3.0 Final (fails) in my
> case.
>
> Is there a major change with event processing with sliding windows or is it
> a just bug in the new version?
>
> The DRL between Eclipse and Guvnor is the same, in principle. It means, I
> started the project within Guvnor using the build features with the Editor
> supporting creating a model in Guvnor and the business rule. These two
> files, I couldn't reuse in my Eclipse project 1:1 (I used New File from
> Guvnor Ressource in Eclipse for that), failed to compile and even to open
> for the brl-file. So, I made the same model as Java Classes and a new DRL
> in
> Eclipse copy the stuff from the Guvnors view source windows adding the
> includes for the Java model and adding the Event declaration by hand. By
> the
> way, are there any other hints for that ...
>
> With regards,
>
> Axel
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/rules-users-Guvnor-5-3-0-Final-Rule-using-accumulate-with-windows-length-delivers-an-unexpected-resut-tp3489548p3506191.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
>
>


-- 
  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] Fusion : must declare @role(event) for all class hierarchy ?

2011-11-14 Thread Edson Tirelli
   Vincent,

   Fact types are supposed to inherit the @role of their parent classes, so
if you define the parent class/interface as an event, all subclasses will
inherit the event role. If it is not working like this, it is a bug, but I
am pretty sure we have tests for it. Please open a JIRA and provide a test
case to reproduce the behavior otherwise.

   Thank you,
   Edson

2011/11/14 Vincent LEGENDRE 

> Hi all
>
> We are using Fusion to make some simplification and grouping on some
> events.
> We have several classes of events, all derivated from a top-level class.
>
> With fusion version 5.3 (and 5.2 too), we must declare the @role(event)
> for the top-level class, *but also for all its classes hierarchy*, ie the
> role is not inherited by subclasses.
>
> Is it done and purpose ?
> Is it a bug ?
>
> Thanks.
>
> ___
> 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] Guvnor 5.3 : No more "Create New ..." button in "Browse" view ?

2011-11-14 Thread Vincent LEGENDRE
Yep, I saw the button under KB ...
But why ?

- Mail original -

De: "Michael Anstis" 
À: "Rules Users List" 
Envoyé: Lundi 14 Novembre 2011 19:51:43
Objet: Re: [rules-users] Guvnor 5.3 : No more "Create New ..." button in 
"Browse" view ?

It was deliberate AFAIK.

The button still exists under "Knowledge Bases".


2011/11/14 Vincent LEGENDRE < vincent.legen...@eurodecision.com >




Hi all,

The question is in the subjec :
In 5.2 there was a "create new" button in "browse" panel, which allow business 
user to create new assets.
In 5.3, no more button ...

Is it on purpose ?
Is it a bug ?
Is there a way to get it back ?
Does it appears only under some conditions ?

___
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] Guvnor 5.3 : No more "Create New ..." button in "Browse" view ?

2011-11-14 Thread Michael Anstis
It was deliberate AFAIK.

The button still exists under "Knowledge Bases".

2011/11/14 Vincent LEGENDRE 

> Hi all,
>
> The question is in the subjec :
> In 5.2 there was a "create new" button in "browse" panel, which allow
> business user to create new assets.
> In 5.3, no more button ...
>
> Is it on purpose ?
> Is it a bug ?
> Is there a way to get it back ?
> Does it appears only under some conditions ?
>
> ___
> 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 5.3 : No more "Create New ..." button in "Browse" view ?

2011-11-14 Thread Vincent LEGENDRE
Hi all, 

The question is in the subjec : 
In 5.2 there was a "create new" button in "browse" panel, which allow business 
user to create new assets. 
In 5.3, no more button ... 

Is it on purpose ? 
Is it a bug ? 
Is there a way to get it back ? 
Does it appears only under some conditions ? 
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Bug in org.drools.core.util.DateUtils after changing value of drools.dateformat?

2011-11-14 Thread prasad.deshpande
Hi,

I need to change value of system property drools.dateformat dynamically. If
I change the property, I still get error while executing rule

15:49:21,828 ERROR [STDERR] Unable to create a Field value of type 
'ValueType = 'Date'' and value '"01-11-2011"' : [Rule name='EFP_14']
java.lang.IllegalArgumentException: Invalid date input format: [01-11-2011]
it should follow: [dd-MMM-]
15:49:21,831 ERROR [WorkplaceController]
904C7394BB64620F6B0738EA27C6B08B[runNestedRuleFromLayout] Error evaluating
ruleset "asfsd" of type "DRL" with resource 16306 (type 104). 
Could not parse knowledge.

I tried to look into the source-code & found that class
org.drools.core.util.DateUtils does not make use of changed value of
property "drools.dateformat". Also, looking at code it is clear that once
the class is loaded by classloader, any change in system property will not
be reflected.

Anyone any comments before I raise a bug?

--
View this message in context: 
http://drools.46999.n3.nabble.com/Bug-in-org-drools-core-util-DateUtils-after-changing-value-of-drools-dateformat-tp3507226p3507226.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] jbpm 3.2.x verssion .....

2011-11-14 Thread Sumeet Karawal
Its ok Mauricio, I didn't find it harsh at all, thanks for the help. :)

Regards,
Sumeet



  
  From:   Mauricio Salatino  
  

  
  To: marco.rietv...@redhat.com, Rules Users List 
   

  
  Cc: Sumeet Karawal
  

  
  Date:   11/14/2011 06:35 PM   
  

  
  Subject:Re: [rules-users] jbpm 3.2.x verssion .   
  

  





Sumeet, Marco,
Sorry I didn't want to be harsh with my response :)
Cheers

2011/11/14 Marco Rietveld 
  Summeet (and others),

  As mentioned, this is indeed a drools (user) mailing list.

  The proper mailing lists for jbpm (3, 4 or 5) are:

  jbpm-us...@lists.jboss.org     (for these types of questions)
  jbpm-us...@lists.jboss.org     (for developers and people who look at
  jbpm code/internals)


  Most of the jbpm core developers monitor both lists.


  Thanks,
  Marco

  11/14/2011 02:00 PM, Marco Rietveld:
Hi Summeet,

jbpm 3.2.x works with jBoss AS 5.1 -- and obviously also with
Drools 5.3, since there's no overlap between those two versions of
jbpm and drools.
I'm not sure if Drools 5.3 works with jBoss AS 5.1, although I
think it does.

There is a difference between jbpm 3.2.8 and the supported version
of jbpm 3.2. It's hard to quantify the difference exactly, but
since late 2009 when 3.2.8 was released, a number of bugs have been
fixed in the supported version.

. Marco


11/11/2011 10:39 AM, Sumeet Karawal:
  Thanks Thomas

  No, I am a little confused which version to use. I visited
  the site
  http://sourceforge.net/projects/jbpm/files/jBPM%203/. Here
  the maximum
  downloads are for v 3.2.2  and the latest among these is
  v3.2.8. It would
  be very helpful if you could suggest me which one to use
  among the versions
  3.2.x. As my requirement is to use jbpm v3.2.x with Drools
  and Jboss AS,
  and later on Mule ESB v3.1 will also be used. So I am
  thinking of
  installing jbpm among v3.2.x with Drools v5.3 Final and JBoss
  AS v 5.1.
  Will these components work together?

  Also, jbpm Enterprise Supports v3. So is there much
  difference between the
  enterprise version of jbpm v3 and the community versions of
  v3.2.x

  Thanks & Regards,
  Sumeet Karawal
  Mailto: sumeet.kara...@tcs.com




--
jBPM/Drools developer
Utrecht, the Netherlands


  --
  jBPM/Drools developer
  Utrecht, the Netherlands

  ___
  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 -




=-=-=
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you




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


Re: [rules-users] Collecting properties in a rule

2011-11-14 Thread Michael Anstis
Thanks Wolfgang, quite how I missed the "collect" in my DRL I don't know :(

2011/11/14 Wolfgang Laun 

> The rule below assumes that markets is List in Town and ids is
> List in a Market.
>
> It does not rely on Market or even Location objects being facts, and
> there's no problem if a location id is re-used in another town.
>
> rule findThree
> when
> $t: Town( $name: name, $markets: markets )
> $s: HashSet( $size: size ==3 )
> from accumulate( $m: Market() from $markets,
>  init( HashSet set = new HashSet(); )
>  action( set.addAll( $m.getIds() ); )
>  result( set ) )
> then
> System.out.println( $name + " is a three-location town " + $s );
> end
>
>
>
> 2011/11/14 Michael Anstis 
>
>> Something like this?
>>
>> when
>> $t : Town( )
>> $s : SuperMarket( town == $t, $lid : locationId )
>> $ls : HashSet( size == 3) from ( Location( locationId = $lid ) )
>>
>> I suspect Location would have to override equals and hashCode correctly.
>>
>> Once you have some DRL that works I'd suggest moving to Guvnor.
>>
>>
>> On 12 November 2011 23:15, LCode  wrote:
>>
>>> I am trying to write a rule via the guided rule editor and I am really
>>> struggling.
>>>
>>> The following is a simplified explanation of my scenario:
>>>
>>> I have a model where there are lots of 'Town' objects, each town has any
>>> number of 'Supermarket' objects and each supermarket has a list of
>>> integers
>>> 'locationID'.
>>>
>>> Something like this
>>>
>>>
>>>
>>>15
>>>18
>>>
>>>
>>>13
>>>
>>>
>>>13
>>>15
>>>18
>>>
>>>
>>>
>>> (apologies to the Sainsburys shoppers!!)
>>>
>>> I need to write a rule that fires when there are precisely 3 unique
>>> location
>>> ID's in the whole town.
>>>
>>> So in the example above the complete list of locationIDs would be 13, 13,
>>> 15, 15, 18, 18
>>> With the following unique numbers 13, 15, 18
>>> therefore the rule would fire as there are 3 unique numbers.
>>>
>>> I hope that makes some sense.
>>>
>>> I understand that I should collect the locationIDs into a java.util.Set
>>> in
>>> order to count unique entries and I can collect together all supermarkets
>>> into an arraylist. However I cannot for the life of me seem to collect
>>> LocationID across all supermarkets.
>>>
>>> Thank you so much in anticipation, I realise this was rather long-winded!
>>>
>>> --
>>> View this message in context:
>>> http://drools.46999.n3.nabble.com/Collecting-properties-in-a-rule-tp3503523p3503523.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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Collecting properties in a rule

2011-11-14 Thread Wolfgang Laun
The rule below assumes that markets is List in Town and ids is
List in a Market.

It does not rely on Market or even Location objects being facts, and
there's no problem if a location id is re-used in another town.

rule findThree
when
$t: Town( $name: name, $markets: markets )
$s: HashSet( $size: size ==3 )
from accumulate( $m: Market() from $markets,
 init( HashSet set = new HashSet(); )
 action( set.addAll( $m.getIds() ); )
 result( set ) )
then
System.out.println( $name + " is a three-location town " + $s );
end


2011/11/14 Michael Anstis 

> Something like this?
>
> when
> $t : Town( )
> $s : SuperMarket( town == $t, $lid : locationId )
> $ls : HashSet( size == 3) from ( Location( locationId = $lid ) )
>
> I suspect Location would have to override equals and hashCode correctly.
>
> Once you have some DRL that works I'd suggest moving to Guvnor.
>
>
> On 12 November 2011 23:15, LCode  wrote:
>
>> I am trying to write a rule via the guided rule editor and I am really
>> struggling.
>>
>> The following is a simplified explanation of my scenario:
>>
>> I have a model where there are lots of 'Town' objects, each town has any
>> number of 'Supermarket' objects and each supermarket has a list of
>> integers
>> 'locationID'.
>>
>> Something like this
>>
>>
>>
>>15
>>18
>>
>>
>>13
>>
>>
>>13
>>15
>>18
>>
>>
>>
>> (apologies to the Sainsburys shoppers!!)
>>
>> I need to write a rule that fires when there are precisely 3 unique
>> location
>> ID's in the whole town.
>>
>> So in the example above the complete list of locationIDs would be 13, 13,
>> 15, 15, 18, 18
>> With the following unique numbers 13, 15, 18
>> therefore the rule would fire as there are 3 unique numbers.
>>
>> I hope that makes some sense.
>>
>> I understand that I should collect the locationIDs into a java.util.Set in
>> order to count unique entries and I can collect together all supermarkets
>> into an arraylist. However I cannot for the life of me seem to collect
>> LocationID across all supermarkets.
>>
>> Thank you so much in anticipation, I realise this was rather long-winded!
>>
>> --
>> View this message in context:
>> http://drools.46999.n3.nabble.com/Collecting-properties-in-a-rule-tp3503523p3503523.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] Fusion : must declare @role(event) for all class hierarchy ?

2011-11-14 Thread Vincent LEGENDRE
Hi all 

We are using Fusion to make some simplification and grouping on some events. 
We have several classes of events, all derivated from a top-level class . 

With fusion version 5.3 (and 5.2 too), we must declare the @role(event) for the 
top-level class, but also for all its classes hierarchy , ie the role is not 
inherited by subclasses. 

Is it done and purpose ? 
Is it a bug ? 

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


Re: [rules-users] jbpm 3.2.x verssion .....

2011-11-14 Thread Mauricio Salatino
Sumeet, Marco,
Sorry I didn't want to be harsh with my response :)
Cheers

2011/11/14 Marco Rietveld 

>  Summeet (and others),
>
> As mentioned, this is indeed a *drools* (user) mailing list.
>
> The proper mailing lists for jbpm (3, 4 or 5) are:
>
> jbpm-us...@lists.jboss.org (for these types of questions)
> jbpm-us...@lists.jboss.org (for developers and people who look at
> jbpm code/internals)
>
>
> Most of the jbpm core developers monitor both lists.
>
>
> Thanks,
> Marco
>
> 11/14/2011 02:00 PM, Marco Rietveld:
>
> Hi Summeet,
>
> jbpm 3.2.x works with jBoss AS 5.1 -- and obviously also with Drools 5.3,
> since there's no overlap between those two versions of jbpm and drools.
> I'm not sure if Drools 5.3 works with jBoss AS 5.1, although I *think* it
> does.
>
> There is a difference between jbpm 3.2.8 and the supported version of jbpm
> 3.2. It's hard to quantify the difference exactly, but since late 2009 when
> 3.2.8 was released, a number of bugs have been fixed in the supported
> version.
>
> . Marco
>
>
> 11/11/2011 10:39 AM, Sumeet Karawal:
>
> Thanks Thomas
>
> No, I am a little confused which version to use. I visited the 
> sitehttp://sourceforge.net/projects/jbpm/files/jBPM%203/. Here the maximum
> downloads are for v 3.2.2  and the latest among these is v3.2.8. It would
> be very helpful if you could suggest me which one to use among the versions
> 3.2.x. As my requirement is to use jbpm v3.2.x with Drools and Jboss AS,
> and later on Mule ESB v3.1 will also be used. So I am thinking of
> installing jbpm among v3.2.x with Drools v5.3 Final and JBoss AS v 5.1.
> Will these components work together?
>
> Also, jbpm Enterprise Supports v3. So is there much difference between the
> enterprise version of jbpm v3 and the community versions of v3.2.x
>
> Thanks & Regards,
> Sumeet Karawal
> Mailto: sumeet.kara...@tcs.com
>
>
> --
> jBPM/Drools developer
> Utrecht, the Netherlands
>
>
>
> --
> jBPM/Drools developer
> Utrecht, the Netherlands
>
>
> ___
> 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] Using Drools with JSP application.

2011-11-14 Thread sachintaware
Hello

Hi Thomas,thanks for the explanation,but I am not that a good java developer
to work it out based on the theoretical explanation.That's the reason I
asked for examples.

I think I will have to stop as I am really getting stuck at this and
spending more time then it should be.

Anyways,thanks to the open source forum for sharing the knowledge.

Thanks and Regards
Sachin 

--
View this message in context: 
http://drools.46999.n3.nabble.com/Using-Drools-with-JSP-application-tp3498955p3506763.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] jbpm 3.2.x verssion .....

2011-11-14 Thread Marco Rietveld

  
  
Summeet (and others), 

As mentioned, this is indeed a drools (user) mailing list. 

The proper mailing lists for jbpm (3, 4 or 5) are: 

jbpm-us...@lists.jboss.org     (for these types of questions)
jbpm-us...@lists.jboss.org     (for developers and people who look
at jbpm code/internals) 


Most of the jbpm core developers monitor both lists. 


Thanks,
Marco

11/14/2011 02:00 PM, Marco Rietveld:

  
  Hi Summeet, 
  
  jbpm 3.2.x works with jBoss AS 5.1 -- and obviously also with
  Drools 5.3, since there's no overlap between those two versions of
  jbpm and drools. 
  I'm not sure if Drools 5.3 works with jBoss AS 5.1, although I think
  it does. 
  
  There is a difference between jbpm 3.2.8 and the supported version
  of jbpm 3.2. It's hard to quantify the difference exactly, but
  since late 2009 when 3.2.8 was released, a number of bugs have
  been fixed in the supported version. 
  
  . Marco
  
  
  11/11/2011 10:39 AM, Sumeet Karawal:
  
Thanks Thomas

No, I am a little confused which version to use. I visited the site
http://sourceforge.net/projects/jbpm/files/jBPM%203/. Here the maximum
downloads are for v 3.2.2  and the latest among these is v3.2.8. It would
be very helpful if you could suggest me which one to use among the versions
3.2.x. As my requirement is to use jbpm v3.2.x with Drools and Jboss AS,
and later on Mule ESB v3.1 will also be used. So I am thinking of
installing jbpm among v3.2.x with Drools v5.3 Final and JBoss AS v 5.1.
Will these components work together?

Also, jbpm Enterprise Supports v3. So is there much difference between the
enterprise version of jbpm v3 and the community versions of v3.2.x

Thanks & Regards,
Sumeet Karawal
Mailto: sumeet.kara...@tcs.com



  
  
  -- 
jBPM/Drools developer
Utrecht, the Netherlands



-- 
jBPM/Drools developer
Utrecht, the Netherlands
  

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


Re: [rules-users] jbpm 3.2.x verssion .....

2011-11-14 Thread Marco Rietveld

  
  
Hi Summeet, 

jbpm 3.2.x works with jBoss AS 5.1 -- and obviously also with Drools
5.3, since there's no overlap between those two versions of jbpm and
drools. 
I'm not sure if Drools 5.3 works with jBoss AS 5.1, although I think
it does. 

There is a difference between jbpm 3.2.8 and the supported
version of jbpm 3.2. It's hard to quantify the difference exactly,
but since late 2009 when 3.2.8 was released, a number of bugs have
been fixed in the supported version. 

. Marco


11/11/2011 10:39 AM, Sumeet Karawal:

  Thanks Thomas

No, I am a little confused which version to use. I visited the site
http://sourceforge.net/projects/jbpm/files/jBPM%203/. Here the maximum
downloads are for v 3.2.2  and the latest among these is v3.2.8. It would
be very helpful if you could suggest me which one to use among the versions
3.2.x. As my requirement is to use jbpm v3.2.x with Drools and Jboss AS,
and later on Mule ESB v3.1 will also be used. So I am thinking of
installing jbpm among v3.2.x with Drools v5.3 Final and JBoss AS v 5.1.
Will these components work together?

Also, jbpm Enterprise Supports v3. So is there much difference between the
enterprise version of jbpm v3 and the community versions of v3.2.x

Thanks & Regards,
Sumeet Karawal
Mailto: sumeet.kara...@tcs.com





-- 
jBPM/Drools developer
Utrecht, the Netherlands
  

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


Re: [rules-users] [Planner] CachedMoveFactory drive to Corrupted undo move

2011-11-14 Thread ge0ffrey
In the manual, read "delta score calculation". That gets broken somehow.
Drools 5.1 had a bug that broke that, fixed since 5.2.

you're probably changing a fact without doing wm.update

--
View this message in context: 
http://drools.46999.n3.nabble.com/Planner-CachedMoveFactory-drive-to-Corrupted-undo-move-tp3495070p3506736.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] How to use RepositorySessionUtil.getRepository()?

2011-11-14 Thread Praveen
Hi All,

I am using below piece of code from a standalone system to access the Rules
repository.

RulesRepository repository = RepositorySessionUtil.getRepository();

But we are getting RulesRepository Exception as below:

org.drools.repository.RulesRepositoryException
at
org.drools.repository.RepositorySessionUtil.getRepository(RepositorySessionUtil.java:69)
at TestSample.main(TestSample.java:45)

Do we need to initialise something before using the above piece of code?
Please suggest, TIA.

Regards,
Praveen.





 

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-use-RepositorySessionUtil-getRepository-tp3506714p3506714.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] Using Drools with JSP application.

2011-11-14 Thread Swindells, Thomas
Drools is just a java library implementing some logic.
The question you are asking is basically how do I write a JSP web application 
that uses some none JSP specific logic.
It's not really any different to how you would write a JSP web app to read some 
records from a database, do some processing and then display the results on the 
UI. There are plenty of (none drools specific) tutorials on how to do this.

The basic pattern is:
You receive a request.
You create a new stateless knowledge session (or a new stateful session, or 
even load an existing one depending on your requirements).
You insert whatever data the requests says you should
You run the rules.
You extract the results
You use process and return the results as necessary.

Thomas

> -Original Message-
> From: rules-users-boun...@lists.jboss.org [mailto:rules-users-
> boun...@lists.jboss.org] On Behalf Of sachintaware
> Sent: 14 November 2011 12:17
> To: rules-users@lists.jboss.org
> Subject: Re: [rules-users] Using Drools with JSP application.
>
> Hi Mike
>
> Waiting to hear from you.I am stuck a bit on these issue.
>
> Please point me to some example,for drools integrated with a simple jsp
> web-application(even standalone will do.).
> I want to display the result of rules on some UI(A web console,like Html-
> jsp).Is it possible?If yes,how??
>
> Thanks and Regards
> Sachin
>
> --
> View this message in context: http://drools.46999.n3.nabble.com/Using-
> Drools-with-JSP-application-tp3498955p3506664.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


**
This message is confidential and intended only for the addressee. If you have 
received this message in error, please immediately notify the 
postmas...@nds.com and delete it from your system as well as any copies. The 
content of e-mails as well as traffic data may be monitored by NDS for 
employment and security purposes. To protect the environment please do not 
print this e-mail unless necessary.

NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, 
United Kingdom. A company registered in England and Wales. Registered no. 
3080780. VAT no. GB 603 8808 40-00
**

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


Re: [rules-users] [Planner] CachedMoveFactory drive to Corrupted undo move

2011-11-14 Thread npiedeloup
I have test in TRACE mode, and I don't know what I can do with this error.
In this test I have activated some Constraints.

I've got a "The presumedScore (0hard/-500soft) is corrupted because it is
not the realScore  (0hard/-450soft)"

I've got some questions :
- When this error was launch ? 
- In Move classes could I use the same PlanningEntity instance in the move
itself and his undomove ? or should i clone it ? 
- Are the causes of IntConstraintOccurrence important for delta score
computing ?


I will try to get the simpliest test case of this problem, to test it
deeper.

Regards,

--
View this message in context: 
http://drools.46999.n3.nabble.com/Planner-CachedMoveFactory-drive-to-Corrupted-undo-move-tp3495070p3506686.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] Using Drools with JSP application.

2011-11-14 Thread sachintaware
Hi Mike

Waiting to hear from you.I am stuck a bit on these issue.

Please point me to some example,for drools integrated with a simple jsp
web-application(even standalone will do.).
I want to display the result of rules on some UI(A web console,like
Html-jsp).Is it possible?If yes,how??

Thanks and Regards
Sachin

--
View this message in context: 
http://drools.46999.n3.nabble.com/Using-Drools-with-JSP-application-tp3498955p3506664.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] How to run an agenda group multiple times?

2011-11-14 Thread Wolfgang Laun
Consider this scenario:
  insert facts, rules r, s, t in group G are activated
  set focus for agenda group G
  set focus for agenda group G
  fireAllRules
  rules r, s fire
  rule t fires and inserts a fact so that rule u in G is activated
  rule u fires
  G is popped from the stack - no more rules in G are activated
  G is popped from the stack - no rules in G are activated

Two immediately successive pushes of the same agenda group are useless.

-W

On 14 November 2011 12:52, Zhao Yi  wrote:

> According to Drools export document,
>
> *Each time setFocus() is called it pushes that Agenda Group onto a stack.
> When the focus group is empty it is popped from the stack and the focus
> group that is now on top evaluates. An Agenda Group can appear in multiple
> locations on the stack. *
>
> If I run setFocus() on an agenda group two times, the agenda group should
> be
> in multiple locations on the stack, why the rules in this agenda group are
> fired only once?
>
> Thanks,
> Zhao Yi
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/How-to-run-an-agenda-group-multiple-times-tp3504139p3506610.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] How to run an agenda group multiple times?

2011-11-14 Thread FrankVhh
What Davide is saying is correct, as is your quotation of the docmentation.
I'll try to rephrase Davide's explanation:  the group should be activated
twice, but the rules aren't necessarily fired. The conditions (incl. rule
attributes) should still match before anything fires.


Zhao Yi wrote:
> 
> According to Drools export document,
> 
> *Each time setFocus() is called it pushes that Agenda Group onto a stack.
> When the focus group is empty it is popped from the stack and the focus
> group that is now on top evaluates. An Agenda Group can appear in multiple
> locations on the stack. *
> 
> If I run setFocus() on an agenda group two times, the agenda group should
> be in multiple locations on the stack, why the rules in this agenda group
> are fired only once? 
> 
> Thanks,
> Zhao Yi
> 


--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-run-an-agenda-group-multiple-times-tp3504139p3506641.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] programming classes to represent domain in Drools like templates

2011-11-14 Thread santiago carbonell
Thanks Estaban

This is what I need it,

--
View this message in context: 
http://drools.46999.n3.nabble.com/programming-classes-to-represent-domain-in-Drools-like-templates-tp3506503p3506618.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] How to run an agenda group multiple times?

2011-11-14 Thread Zhao Yi
According to Drools export document,

*Each time setFocus() is called it pushes that Agenda Group onto a stack.
When the focus group is empty it is popped from the stack and the focus
group that is now on top evaluates. An Agenda Group can appear in multiple
locations on the stack. *

If I run setFocus() on an agenda group two times, the agenda group should be
in multiple locations on the stack, why the rules in this agenda group are
fired only once? 

Thanks,
Zhao Yi

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-run-an-agenda-group-multiple-times-tp3504139p3506610.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] programming classes to represent domain in Drools like templates

2011-11-14 Thread Esteban Aliverti
If you don't want to define your model as Java classes you can define it in
drl syntax:
http://docs.jboss.org/drools/release/5.3.0.Final/drools-expert-docs/html_single/index.html#d0e3390

Best Regards,



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


On Mon, Nov 14, 2011 at 12:06 PM, santiago carbonell wrote:

> Hi,
>
> I'm new in drools and I'm doing some test with this fantastic engine. With
> Drools, I've loaded a drl file with some rules and ran with drools engine
> and works perfect, but I got to preset/programming some classes in Java
> about the domain where rules worked.
>
> I'd like to load this domain, this "classes" as a file, like drl files, but
> insted of rules, I'd like to load classes, or domain, so I'd needn't to
> preset/programming this classes in Java.
>
> My question is how can I load this classes in some file, like drl files
> with
> rules? Is like templates in clips.
>
> Thanks
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/programming-classes-to-represent-domain-in-Drools-like-templates-tp3506503p3506503.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] programming classes to represent domain in Drools like templates

2011-11-14 Thread santiago carbonell
Hi,

I'm new in drools and I'm doing some test with this fantastic engine. With
Drools, I've loaded a drl file with some rules and ran with drools engine
and works perfect, but I got to preset/programming some classes in Java
about the domain where rules worked.

I'd like to load this domain, this "classes" as a file, like drl files, but
insted of rules, I'd like to load classes, or domain, so I'd needn't to
preset/programming this classes in Java.

My question is how can I load this classes in some file, like drl files with
rules? Is like templates in clips.

Thanks


--
View this message in context: 
http://drools.46999.n3.nabble.com/programming-classes-to-represent-domain-in-Drools-like-templates-tp3506503p3506503.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] Fwd: 5.3.0 Final - Rule using accumulate with windows:length delivers an unexpected result

2011-11-14 Thread Michael Anstis
I'd have to defer to the drools-expert people.. as the problem appears to
be with 5.3.0.Final of drools-expert.

As a reminder, the DRL failing in 5.3.0.Final (or giving different results
to 5.2.0?) is:-

rule "Event Processing Evaluation"
dialect "mvel"
when
   $list:java.util.List() from collect( evalEvent(wam == 'D1', f !=
null)over window:length( 1 ))
   $average:Double() from accumulate( evalEvent($vf:f) from
   $list,average($vf) )
   eval($average > 5)
then
   internalEvent fact0 = new internalEvent();
   fact0.setDesrc( "Internal Event: "+ $average );
   insert(fact0 );
end

-- Forwarded message --
From: axel 
Date: 14 November 2011 08:16
Subject: Re: [rules-users] Guvnor (5.3.0 Final)- Rule using accumulate with
windows:length delivers an unexpected result
To: rules-users@lists.jboss.org


Thanks Mike.

So, now I've included Drools 5.3.0 Final in my Eclipse Drools Project too
and discovered the same problem as in Guvnor with my example. There is a
difference between 5.2.0 Final (works well) and 5.3.0 Final (fails) in my
case.

Is there a major change with event processing with sliding windows or is it
a just bug in the new version?

The DRL between Eclipse and Guvnor is the same, in principle. It means, I
started the project within Guvnor using the build features with the Editor
supporting creating a model in Guvnor and the business rule. These two
files, I couldn't reuse in my Eclipse project 1:1 (I used New File from
Guvnor Ressource in Eclipse for that), failed to compile and even to open
for the brl-file. So, I made the same model as Java Classes and a new DRL in
Eclipse copy the stuff from the Guvnors view source windows adding the
includes for the Java model and adding the Event declaration by hand. By the
way, are there any other hints for that ...

With regards,

Axel


--
View this message in context:
http://drools.46999.n3.nabble.com/rules-users-Guvnor-5-3-0-Final-Rule-using-accumulate-with-windows-length-delivers-an-unexpected-resut-tp3489548p3506191.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] Adding a custom logo to Drools Guvnor

2011-11-14 Thread Michael Anstis
Nope, nothing obvious missing :)

Our move to GWT's Activties & Places has led to the logo becoming a GWT
resource and hence compiled into the code-base.

What are people's preferences - update documentation, or change screen so
logo can be changed by updating an external image file?

If we change the screen the logo would probably be the exception, as we
want to stick as close to GWT as possible.

On 12 November 2011 23:11, LCode  wrote:

> In previous versions of Drools Guvnor I was able to custom brand the
> application by unpacking the drools guvnor war and replacing the header
> logo
> image in the 'images' folder.
>
> In version 5.3 it would appear that the same is still possible since
> section
> 16.3. of the documentation reads "The parts you can customize are the style
> sheet, the "shortcut icon" and the header logo."
>
> However I cannot find the correct image for the header logo in public
> images. The one in org.drools.guvnor.Guvnor\images\hdrlogo_brms.gif is not
> the drools header image. Indeed it would seem that I can only replace the
> logo by recompiling from source.
>
> Is this a bug or am I missing something obvious?
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Adding-a-custom-logo-to-Drools-Guvnor-tp3503516p3503516.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] Guvnor (5.3.0 Final)- Rule using accumulate with windows:length delivers an unexpected result

2011-11-14 Thread axel
Thanks Mike.

So, now I've included Drools 5.3.0 Final in my Eclipse Drools Project too
and discovered the same problem as in Guvnor with my example. There is a
difference between 5.2.0 Final (works well) and 5.3.0 Final (fails) in my
case. 

Is there a major change with event processing with sliding windows or is it
a just bug in the new version?

The DRL between Eclipse and Guvnor is the same, in principle. It means, I
started the project within Guvnor using the build features with the Editor
supporting creating a model in Guvnor and the business rule. These two
files, I couldn't reuse in my Eclipse project 1:1 (I used New File from
Guvnor Ressource in Eclipse for that), failed to compile and even to open
for the brl-file. So, I made the same model as Java Classes and a new DRL in
Eclipse copy the stuff from the Guvnors view source windows adding the
includes for the Java model and adding the Event declaration by hand. By the
way, are there any other hints for that ...

With regards,

Axel


--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-Guvnor-5-3-0-Final-Rule-using-accumulate-with-windows-length-delivers-an-unexpected-resut-tp3489548p3506191.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] Collecting properties in a rule

2011-11-14 Thread Michael Anstis
Something like this?

when
$t : Town( )
$s : SuperMarket( town == $t, $lid : locationId )
$ls : HashSet( size == 3) from ( Location( locationId = $lid ) )

I suspect Location would have to override equals and hashCode correctly.

Once you have some DRL that works I'd suggest moving to Guvnor.

On 12 November 2011 23:15, LCode  wrote:

> I am trying to write a rule via the guided rule editor and I am really
> struggling.
>
> The following is a simplified explanation of my scenario:
>
> I have a model where there are lots of 'Town' objects, each town has any
> number of 'Supermarket' objects and each supermarket has a list of integers
> 'locationID'.
>
> Something like this
>
>
>
>15
>18
>
>
>13
>
>
>13
>15
>18
>
>
>
> (apologies to the Sainsburys shoppers!!)
>
> I need to write a rule that fires when there are precisely 3 unique
> location
> ID's in the whole town.
>
> So in the example above the complete list of locationIDs would be 13, 13,
> 15, 15, 18, 18
> With the following unique numbers 13, 15, 18
> therefore the rule would fire as there are 3 unique numbers.
>
> I hope that makes some sense.
>
> I understand that I should collect the locationIDs into a java.util.Set in
> order to count unique entries and I can collect together all supermarkets
> into an arraylist. However I cannot for the life of me seem to collect
> LocationID across all supermarkets.
>
> Thank you so much in anticipation, I realise this was rather long-winded!
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Collecting-properties-in-a-rule-tp3503523p3503523.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