Re: [rules-users] Guvnor another few questions...

2011-07-07 Thread Michael Anstis
Hi Justin,

It's always nice to reply to somebody who has taken the time to try things
and learn the application.

I've added a couple of other points below.

With kind regards,

Mike

On 6 July 2011 22:48, Justin Case send_lotsa_spam_h...@yahoo.com wrote:

 Thank you Michael for your quick answer :) I certainly hope there will be
 somewhere some answer to the other points as well.

 You can use a predicate within a pattern by selecting Predicate as the
 Condition Column type. These compile to inline evals. It is not however
 possible to define a predicate that is not part of a pattern.

 No idea what these are :) but I'll definitely look into them.

 If, in your example, $var and $date are constants you could look into
 using a
 Template instead of Decision Table. You'll find there is greater
 flexibility to

what DRL you can define.

 I noticed I can create Templates, but I didn't think about them in that way
 (templates MORE flexible??). Worth a try indeed.



IMO Templates in Guvnor are, currently, more flexible than Decision Tables
simply because they allow you to define (almost) any DRL whereas the DRL
possible from a Decision Table is more restricted.

We have a long list of improvements we want to make to guided Decision
Tables which, once complete, will make them a vastly more powerful authoring
tool.



 The community edition (i.e. Guvnor, not JBoss BRMS) has translations for
 es_ES,

 fr_FR, ja_JP, pt_BR, zh_CN and en_US. GWT compiles the resources away into
 JScript. Depending upon your locale GWT will only dispatch the relevant
 bundles
 to your browser.


 I have the Guvnor (not JBoss BRMS) and can't see any of them. Not even the
 Constants.properties which should be the regular language file...
 Where do these guys get their files??? I (and my folks) would gladly share
 the
 translation - if we ever come to do one.

 You won't find the files in what is downloaded to your browser because GWT
compiles them into its .cache files in
/guvnor-webapp-5.3.0-SNAPSHOT/org.drools.guvnor.Guvnor folder.

The message sources are available in the org.drools.guvnor.client.messages
package.


 I find this observation strange, as the JAR is just stored as a BLOB in
 JCR and
 the latest version retrieved to build suggestions available for rule
 authoring.
 There are however known issues, logged in JIRA, with Validation not
 clearing
 down correctly which could lead to what you report.

 Indeed the validation might be a cause, or it's not only the Validator
 leaving
 old skeletons behind :) A few days ago a teammate of me showed me the
 problem in
 5.2.0.M1 AND ALSO showed be a dialog list with the actual model classes AND
 the
 old class, saying hey but I can remove it from here and it verifies ok.
 Now we
 all upgragded to 5.2.0.Final and we can't find that dialog anymore :( I
 kind of
 miss it anyway, it would always be nice to see what classes you have in
 your
 uploaded model. Did 5.2.0.Final remove it?

 If you can provide a screen-shot it might nudge people's memory better?
Unfortunately mine is blank.


 Not in my experience. I often upload POJO JARs (with 5.2 at least) and am
 able
 to work with the classes defined therein without a restart.

 Might have to do with the above problem anyway...

 I suspect you are accessing the
 Declarative Model resources from a Guvnor repository using the Eclipse
 WebDAV

 facilities (given the context of your surrounding questions). AFAIK,
 Declarative
 
 models are not available this way - they are stored on the Asset in the
 repository using XStream to serialise the internal object graph to XML. It
 might
 
 however be an interesting idea to provide a means to retrieve their DRL
 equivalent through WebDAV. If you'd like to pursue this please raise a
 JIRA
 capturing your requirement and details of your specification.

 Correct, this is what I was expecting: some support from the Eclipse Guvnor
 plugin. I can imagine however that this would be just priority pit-bottom
 on the
 developers todo list :)

 Why is this a problem? As you say the field, presumably privately called
 aThing is accessible via the getter AThing?
 Does your DRL not compile?

 Well this is not a real problem, it works also this way. But the field
 should
 look like all others: the getMyField() accessor of the Java POJO will
 show
 myField, but getAThing() will show AThing - notice the different
 capitalization.

 Thank you,
 JC

 ___
 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 another few questions...

2011-07-07 Thread Vincent Legendre

Some other comments

*Prediates How-to in Guvnor :*

You can use predicates in the dialog box for editing a condition column. 
There are 3 radio buttons for value, formula, and predicate



*Templates VS tables* :
Template are more flexible ... may be ... may be not.
First, in templates in guvnor, you first see the templated DRL, and you 
have to click on a button to edit the table. Businnes users don't care 
about the template, and want to see the table first
Second, in guided tables, you can set some constraints that are not 
added if the parameter is not set (empty cell). In template, an empty 
cell results in a empty substitution, and generally in a compilation 
error ... Template should incorporate a condition to put a bunch of the 
template if the cell is filled or not, or make all cells mandatory.


But I agree that template offer more possibilities (in term of rule 
complexity) that tables, which must handle flat POJO. For you initial 
question, ie using functions in tables, the simpler way is to add a 
method in the POJO itself, but may be not the cleaner way ... Indeed, 
using tables often lead to some model adaptations...



*Langages* :
You can switch the langage used by adding ?langage=fr_FR parameter to 
the guvnor URL.
You can also provide a resource file translated to your favorite langage 
(by browsing the trunk or a grep code) in a JIRA.



*POJO upload* :
You need to SAVE the package (File/Save in the package tab) after an 
upload for the new class to be updated (and old one to be deleted). 
Verify is not enough (was in 5.1, not in 5.2)


/5. If I upload something from Eclipse it lands under Other assets,
documentation even if they are Java classes which I hoped would land under
Model... is there anything I can do about that? A Java POJO model once 
uploaded

is just a jar blob afterwards, not usable from Eclipse anymore.../

Via Webdav it (should) works if you upload a .jar file. Works in 5.2m2 
for me, but you still need to save the package (and create the import 
list in the package view too, or upload a drools.package file) to see 
your classes



/7. Clicking a Guvnor repository business rule file in Eclipse throws a 
WebDav

error not found, both for brl and gdsl files. Could it have to do with the
fact that the package doesn't validate at the moment?/

Guided editors are no longer supported by eclipse plugin (brl was, gdst 
never was). Officialy due to a lack of interest from the users ... brl 
was very badly handled anyway, so may be it is better like this.
But you can still download it to your local drive, and edit it in XML 
(if you really want to).



/8. Clicking in Eclipse in the Guvnor perspective a freshly created rule 
flow

(nothing uploaded yet) throws an exception as well...
/
How can you have a not uploaded yet resource in the Guvnor perspective 
(view rather that perspective I think) ?


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


Re: [rules-users] Drools Ruleflow deadlock issue[thread]

2011-07-07 Thread vdhinesh
Hi ,

when i run the below code with 2 or more thread i am getting deadlock error.
below attached persistence.xml, jndi prop and datasource code. Kindly help
to solve the error

public static final void main(String[] args){
KnowledgeBuilder knowledgeBuilder =
KnowledgeBuilderFactory.newKnowledgeBuilder();
knowledgeBuilder.add(ResourceFactory.newClassPathResource(samplerulefile.rf),
ResourceType.DRF);
KnowledgeBase kbase = knowledgeBuilder.newKnowledgeBase();
EntityManagerFactory emf =
Persistence.createEntityManagerFactory(org.drools.persistence.jpa);
Environment env = KnowledgeBaseFactory.newEnvironment();
env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);
BitronixTransactionManager transactionManager =
TransactionManagerServices.getTransactionManager();
env.set(EnvironmentName.TRANSACTION_MANAGER, transactionManager);
StatefulKnowledgeSession ksession =
JPAKnowledgeService.newStatefulKnowledgeSession(kbase, null, env);
ksession.getWorkItemManager().registerWorkItemHandler(Human Task, new
NotificationWorkItemHandler());
JPAWorkingMemoryDbLogger auditlog = new JPAWorkingMemoryDbLogger(ksession);
ProcessInstance p =  (ProcessInstance) ksession.startProcess(ruleid,null);
auditlog.dispose();
ksession.dispose();
}


*
persistence.xml:*   
  
?xml version=1.0 encoding=UTF-8 standalone=yes?
persistence version=1.0
xsi:schemaLocation=http://java.sun.com/xml/ns/persistence
 http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd
 http://java.sun.com/xml/ns/persistence/orm
 http://java.sun.com/xml/ns/persistence/orm_1_0.xsd;
xmlns:orm=http://java.sun.com/xml/ns/persistence/orm;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns=http://java.sun.com/xml/ns/persistence;

persistence-unit name=org.drools.persistence.jpa
providerorg.hibernate.ejb.HibernatePersistence/provider
jta-data-sourcejdbc/processInstanceDS/jta-data-source
   
classorg.jbpm.persistence.processinstance.ProcessInstanceInfo/class
  
classorg.jbpm.persistence.processinstance.ProcessInstanceInfo/class
   classorg.drools.persistence.info.SessionInfo/class
   classorg.drools.persistence.info.WorkItemInfo/class
  
classorg.drools.persistence.processinstance.variabletypes.VariableInstanceInfo/class
  
  classorg.jbpm.process.audit.ProcessInstanceLog/class
classorg.jbpm.process.audit.NodeInstanceLog/class
  
properties
property name=hibernate.dialect
value=org.hibernate.dialect.OracleDialect /
property name=hibernate.max_fetch_depth value=3 /
property name=hibernate.hbm2ddl.auto value=update 
/
property name=hibernate.show_sql value=true /
property 
name=hibernate.transaction.manager_lookup_class
value=org.hibernate.transaction.BTMTransactionManagerLookup /
/properties
/persistence-unit
/persistence


*jndi property:*
java.naming.factory.initial=bitronix.tm.jndi.BitronixInitialContextFactory


*datasource:*
PoolingDataSource ds = new PoolingDataSource();
ds.setUniqueName(jdbc/processInstanceDS);
ds.setClassName(oracle.jdbc.xa.client.OracleXADataSource);
ds.setMaxPoolSize(3);
ds.setAllowLocalTransactions(true);
ds.getDriverProperties().put(user, username);
ds.getDriverProperties().put(password, password);
ds.getDriverProperties().put(URL,jdbc:oracle:thin:@192.168.1.115:1521:TEST);
ds.setAllowLocalTransactions(true);
ds.init();

Regards
Dhinesh

--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-Drools-Ruleflow-deadlock-issue-thread-tp3136746p3147770.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] Do we have an user interface to declare enumerations in Guvnor

2011-07-07 Thread Prasad
In guvnor, we can define enumeration using the syntax given.

Ex:
'Vehicle.engineType' : ['Petrol', 'Diesel']

Is there a User Interface through which we can manage this list, so that a
business user can just add to the list and not just type in the syntax
given.

--
View this message in context: 
http://drools.46999.n3.nabble.com/Do-we-have-an-user-interface-to-declare-enumerations-in-Guvnor-tp3147792p3147792.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 another few questions...

2011-07-07 Thread Michael Anstis
Thanks for your input Vincent.

I've added some more blurb to your reply ;)

2011/7/7 Vincent Legendre vincent.legen...@eurodecision.com

 **
 Some other comments

 *Prediates How-to in Guvnor :*

 You can use predicates in the dialog box for editing a condition column.
 There are 3 radio buttons for value, formula, and predicate


 *Templates VS tables* :
 Template are more flexible ... may be ... may be not.
 First, in templates in guvnor, you first see the templated DRL, and you
 have to click on a button to edit the table. Businnes users don't care about
 the template, and want to see the table first
 Second, in guided tables, you can set some constraints that are not added
 if the parameter is not set (empty cell). In template, an empty cell results
 in a empty substitution, and generally in a compilation error ... Template
 should incorporate a condition to put a bunch of the template if the cell is
 filled or not, or make all cells mandatory.

 But I agree that template offer more possibilities (in term of rule
 complexity) that tables, which must handle flat POJO. For you initial
 question, ie using functions in tables, the simpler way is to add a method
 in the POJO itself, but may be not the cleaner way ... Indeed, using tables
 often lead to some model adaptations...

 Ideally I'd like to implement tabular templates where a column can be any
DRL fragment with place-holders for values and the data is listed in the
rows below. It's on the to do list.

If the template limitation you mention is causing problems please raise a
JIRA and we can look into changing the behaviour.


 *Langages* :
 You can switch the langage used by adding ?langage=fr_FR parameter to the
 guvnor URL.
 You can also provide a resource file translated to your favorite langage
 (by browsing the trunk or a grep code) in a JIRA.

 As from 5.3 we also set the locale automatically (from the browsers
Accept-Language setting in Guvnor.jsp (which is set as the welcome page in
web.xml too). Guvnor.html remains.


 *POJO upload* :
 You need to SAVE the package (File/Save in the package tab) after an
 upload for the new class to be updated (and old one to be deleted). Verify
 is not enough (was in 5.1, not in 5.2)


 *5. If I upload something from Eclipse it lands under Other assets,
 documentation even if they are Java classes which I hoped would land under
 Model... is there anything I can do about that? A Java POJO model once
 uploaded
 is just a jar blob afterwards, not usable from Eclipse anymore...*

 Via Webdav it (should) works if you upload a .jar file. Works in 5.2m2 for
 me, but you still need to save the package (and create the import list in
 the package view too, or upload a drools.package file) to see your classes



 *7. Clicking a Guvnor repository business rule file in Eclipse throws a
 WebDav
 error not found, both for brl and gdsl files. Could it have to do with
 the
 fact that the package doesn't validate at the moment?*

 Guided editors are no longer supported by eclipse plugin (brl was, gdst
 never was). Officialy due to a lack of interest from the users ... brl was
 very badly handled anyway, so may be it is better like this.
 But you can still download it to your local drive, and edit it in XML (if
 you really want to).



 *8. Clicking in Eclipse in the Guvnor perspective a freshly created rule
 flow
 (nothing uploaded yet) throws an exception as well...
 *
 How can you have a not uploaded yet resource in the Guvnor perspective
 (view rather that perspective I think) ?


 ___
 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] Do we have an user interface to declare enumerations in Guvnor

2011-07-07 Thread Michael Anstis
Unfortunately not.

Please file a JIRA for the enhancement.

On 7 July 2011 11:49, Prasad prasad1...@gmail.com wrote:

 In guvnor, we can define enumeration using the syntax given.

 Ex:
 'Vehicle.engineType' : ['Petrol', 'Diesel']

 Is there a User Interface through which we can manage this list, so that a
 business user can just add to the list and not just type in the syntax
 given.

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Do-we-have-an-user-interface-to-declare-enumerations-in-Guvnor-tp3147792p3147792.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] Do we have an user interface to declare enumerations in Guvnor

2011-07-07 Thread Prasad
Any Suggestions or Workarounds would really help.

Thank You.

--
View this message in context: 
http://drools.46999.n3.nabble.com/Do-we-have-an-user-interface-to-manage-enumerations-in-Guvnor-tp3147792p3147824.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] Do we have an user interface to declare enumerations in Guvnor

2011-07-07 Thread Michael Anstis
The only workarounds are:-

1) Use Java enums in your class model

2) The guided decision table allows you to define comma separated lists of
values for columns, but I appreciate use of the guided decision table may
not be an option.

Feel free to write a screen though and contribute it :)

On 7 July 2011 12:07, Prasad prasad1...@gmail.com wrote:

 Any Suggestions or Workarounds would really help.

 Thank You.

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Do-we-have-an-user-interface-to-manage-enumerations-in-Guvnor-tp3147792p3147824.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 another few questions...

2011-07-07 Thread Justin Case
Hi Vincent,

You can use predicates in the dialog box for editing a condition column. 
There are 3 radio buttons for value, formula, and predicate

Yes, but that looks like a very very limited version of the literal value. 
I really don't see any benefit in the predicate, other than being a shortcut 
for 
choosing a field literal value = true or false... am I missing something here?

But I agree that template offer more possibilities (in term of rule 
complexity) that tables, which must handle flat POJO. For you initial 
question, ie using functions in tables, the simpler way is to add a method 
in the POJO itself, but may be not the cleaner way ... Indeed, using 
tables 

often lead to some model adaptations...

We ended indeed adding a fake method to the POJO, and I hate it :)

You can switch the langage used by adding   ?langage=fr_FR parameter to 
the guvnor URL. 
You can also provide a resource file translated to your favorite   langage 
(by browsing the trunk or a grep code) in a JIRA.

Yes, and nothing happens as there's no resource file around. All these JIRAs 
say 
nothing about WHERE in the directory structure the resource file shall be 
placed... and based on Michael's answer this won't be a trivial endeavor 
(recompiling the app for a language switch?? sorry, I can't call this real i8n.)

POJO upload :
You need to SAVE the package (File/Save in the package tab) after an 
upload for the new class to be updated (and old one to be deleted). 
Verify 

is not enough (was in 5.1, not in 5.2)

Uh oh. This was the missing link, thanks a lot!

 Model... is there anything I can do about that? A Java POJO model   once 
 uploaded is just a jar blob afterwards, not usable from Eclipse anymore...
Via Webdav it (should) works if you upload a .jar file. Works in 5.2m2 for 
me, but you still need to save the package (and create the import list in 
the package view too, or upload a drools.package file) to see your classes

I see, I understand now. 
Well, unless one can upload a Java _source_ file or link it somehow, just 
seeing 
the files still doesn't bring much except some comfort look here they are.

Guided editors are no longer supported by eclipse plugin (brl was, gdst 
never was). Officialy due to a lack of interest from the users ... brl was 
very badly handled anyway, so may be it is better like this. 

Well, at least we know where we stand. Editing them in both places didn't make 
much sense anyway. I'm fine with editing business rules in Guvnor, if I only 
could edit/link the model classes and technical rules in Eclipse...

But you can still download it to your local drive, and edit it in XML (if 
you really want to).

No no thank you :)

 8. Clicking in Eclipse in the Guvnor perspective a freshly   created 
 rule 

 flow (nothing uploaded yet) throws an exception as well...
How can you have a not uploaded yet resource in the Guvnor perspective 
(view rather that perspective I think) ?

I create a new rule flow in _Guvnor_. I land on the upload resource tab. The 
RF is created but it's obviously empty. I do nothing there but immediately 
switch to Eclipse, refresh Guvnor repo view, click on the freshly created RF, 
bang.

Many thanks,
JC

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


Re: [rules-users] Guvnor another few questions...

2011-07-07 Thread Michael Anstis
Justin,

The I8N of locales I listed are all compiled into the existing WAR, so
unless you're adding a new locale you won't need to recompile.

GWT detects the browser and locale the user is using (or overriding locale,
as Vincent mentions) and sends the appropriate JScript.

I assume you're using the Guvnor binary distribution rather than compiling
from source (or using from an IDE?)

If you're compiling from source you'll need to run the full profile, as by
default we only compile for en_US for speed.

With kind regards,

Mike

On 7 July 2011 12:20, Justin Case send_lotsa_spam_h...@yahoo.com wrote:

 Hi Vincent,

 You can use predicates in the dialog box for editing a condition
 column.
 There are 3 radio buttons for value, formula, and predicate

 Yes, but that looks like a very very limited version of the literal value.
 I really don't see any benefit in the predicate, other than being a
 shortcut for
 choosing a field literal value = true or false... am I missing something
 here?

 But I agree that template offer more possibilities (in term of rule
 complexity) that tables, which must handle flat POJO. For you
 initial
 question, ie using functions in tables, the simpler way is to add a
 method
 in the POJO itself, but may be not the cleaner way ... Indeed, using
 tables

 often lead to some model adaptations...

 We ended indeed adding a fake method to the POJO, and I hate it :)

 You can switch the langage used by adding   ?langage=fr_FR parameter
 to
 the guvnor URL.
 You can also provide a resource file translated to your favorite
 langage
 (by browsing the trunk or a grep code) in a JIRA.

 Yes, and nothing happens as there's no resource file around. All these
 JIRAs say
 nothing about WHERE in the directory structure the resource file shall be
 placed... and based on Michael's answer this won't be a trivial endeavor
 (recompiling the app for a language switch?? sorry, I can't call this real
 i8n.)

 POJO upload :
 You need to SAVE the package (File/Save in the package tab) after an
 upload for the new class to be updated (and old one to be deleted).
 Verify
 
 is not enough (was in 5.1, not in 5.2)

 Uh oh. This was the missing link, thanks a lot!

  Model... is there anything I can do about that? A Java POJO model
 once
  uploaded is just a jar blob afterwards, not usable from Eclipse
 anymore...
 Via Webdav it (should) works if you upload a .jar file. Works in 5.2m2
 for
 me, but you still need to save the package (and create the import list
 in
 the package view too, or upload a drools.package file) to see your
 classes

 I see, I understand now.
 Well, unless one can upload a Java _source_ file or link it somehow, just
 seeing
 the files still doesn't bring much except some comfort look here they
 are.

 Guided editors are no longer supported by eclipse plugin (brl was,
 gdst
 never was). Officialy due to a lack of interest from the users ... brl
 was
 very badly handled anyway, so may be it is better like this.

 Well, at least we know where we stand. Editing them in both places didn't
 make
 much sense anyway. I'm fine with editing business rules in Guvnor, if I
 only
 could edit/link the model classes and technical rules in Eclipse...

 But you can still download it to your local drive, and edit it in XML
 (if
 you really want to).

 No no thank you :)

  8. Clicking in Eclipse in the Guvnor perspective a freshly   created
 rule

  flow (nothing uploaded yet) throws an exception as well...
 How can you have a not uploaded yet resource in the Guvnor
 perspective
 (view rather that perspective I think) ?

 I create a new rule flow in _Guvnor_. I land on the upload resource tab.
 The
 RF is created but it's obviously empty. I do nothing there but immediately
 switch to Eclipse, refresh Guvnor repo view, click on the freshly created
 RF,
 bang.

 Many thanks,
 JC

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

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


[rules-users] Drools Integration with Spring

2011-07-07 Thread Ketaki.Deshpande

Hi Experts,

 

I am facing one issue while integrating drools with Spring. 

 

I have done the following configurations 

 

Beans.xml : 

 

?xml version=1.0 encoding=UTF-8?

beans xmlns=http://www.springframework.org/schema/beans;

   xmlns:drools=http://drools.org/schema/drools-spring;  

   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;


 
xmlns:context=http://www.springframework.org/schema/context;

   xmlns:aop=http://www.springframework.org/schema/aop;

 
xmlns:dwr=http://www.directwebremoting.org/schema/spring-dwr;

 
xsi:schemaLocation=http://www.springframework.org/schema/beans

 
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd

http://www.springframework.org/schema/context

 
http://www.springframework.org/schema/context/spring-context-2.5.xsd

http://www.springframework.org/schema/aop

 
http://www.springframework.org/schema/aop/spring-aop-2.0.xsd

http://www.directwebremoting.org/schema/spring-dwr

 
http://www.directwebremoting.org/schema/spring-dwr-2.0.xsd

http://drools.org/schema/drools-spring
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-contain
er/drools-spring/src/main/resources/org/drools/container/spring/drools-s
pring-1.0.0.xsd

 

 bean id=droolsDAOImpl class=com.dao.DroolsDAOImpl

property name=sessionFactory
ref=mySessionFactory /

property name=ksession ref=ksession
/

property name=intermediateData
ref=intermediateData /

property name=kbase ref=kbase /

/bean



bean id=intermediateData
class=com.pojo.IntermediateData /



drools:kbase id=kbase

  drools:resources 

  drools:resource type=DRL
source=classpath:Sample.drl/drools:resource

  /drools:resources

 

/drools:kbase



drools:ksession id=ksession type=stateful kbase=kbase/  

 




DroolsDAOImpl.java : 

 

 

public class DroolsDAOImpl implements DroolsDAO {

 

private StatefulKnowledgeSession ksession;



private IntermediateData intermediateData;



private KnowledgeBase kbase;

 

public KnowledgeBase getKbase() {

return kbase;

}

 

public void setKbase(KnowledgeBase kbase) {

this.kbase = kbase;

}

 

public StatefulKnowledgeSession getKsession() {

return ksession;

}

 

public void setKsession(StatefulKnowledgeSession
ksession) {

this.ksession = ksession;

}



public static void main(String args[]) throws Exception{



   Resource res = new ClassPathResource(beans.xml);

BeanFactory factory = new XmlBeanFactory(res);

DroolsDAOImpl
droolsDAOImpl=(DroolsDAOImpl)factory.getBean(droolsDAOImpl); 

droolsDAOImpl.init_drools(); 

  

}

 

public void init_drools() throws Exception{





try {





ksession =
kbase.newStatefulKnowledgeSession();



 

 
intermediateData.setNoofPay(noofPaytemp());

 
intermediateData.setRegPay(regpaytemp());

 


 
ksession.insert(intermediateData);

ksession.fireAllRules();



}  catch
(Throwable t) {



 
logger.error(Exception occured in DroolsDAOImpl---+t);

throw
new Exception(Some Error Occured. Please try after some time);



} }

 

 

I am having one drl file : Sample.drl which contains rule and
IntermediateData is simple pojo. 

But after running this I am getting following error: 

 

Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The
matching wildcard is strict, but no declaration can be found for element
'drools:kbase'.

 

Can anyone help me with this issue? Thanks in advance



This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and 

Re: [rules-users] Guvnor another few questions...

2011-07-07 Thread Justin Case

Hi Michael,

The message sources are available in the org.drools.guvnor.client.messages 
package.

Yes, there's a Constants.CLASS. I cannot edit a class :) ...is there a real 
need 
to compile them instead of using simple Constants_lang.properties text resource 
files and rely on Java bundles mechanism?
 
If you can provide a screen-shot it might nudge people's memory better? 
Unfortunately mine is blank.

I'll have to switch back to M1 for this. I'll be back once I have it.

As from 5.3 we also set the locale automatically (from the browsers 
Accept-Language setting in Guvnor.jsp
 
Uh I always hated that when it came without the option to change it by hand ;) 
but that's probably only me. Windows apps have the bad habit of taking whatever 
else instead of the OS language, so I get all funny languages when I travel 
with 
my laptop (or I use a local keyboard and change the input locale to find the 
special characters).

Thank you,
JC

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


[rules-users] Drools Integration with Spring

2011-07-07 Thread ketaki
Hi Experts,

I am facing one issue while integrating drools with Spring. 

I have done the following configurations 

Beans.xml : 

?xml version=1.0 encoding=UTF-8?
beans xmlns=http://www.springframework.org/schema/beans;
   xmlns:drools=http://drools.org/schema/drools-spring;  
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
   xmlns:context=http://www.springframework.org/schema/context;
   xmlns:aop=http://www.springframework.org/schema/aop;
   xmlns:dwr=http://www.directwebremoting.org/schema/spring-dwr;
xsi:schemaLocation=http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
http://www.directwebremoting.org/schema/spring-dwr
http://www.directwebremoting.org/schema/spring-dwr-2.0.xsd
http://drools.org/schema/drools-spring
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-container/drools-spring/src/main/resources/org/drools/container/spring/drools-spring-1.0.0.xsd;

 bean id=droolsDAOImpl class=com.dao.DroolsDAOImpl
property name=sessionFactory ref=mySessionFactory /
property name=ksession ref=ksession /
property name=intermediateData ref=intermediateData /
property name=kbase ref=kbase /
/bean

bean id=intermediateData class=com.pojo.IntermediateData /

drools:kbase id=kbase
  drools:resources 
  drools:resource type=DRL
source=classpath:Sample.drl/drools:resource
  /drools:resources

/drools:kbase

drools:ksession id=ksession type=stateful kbase=kbase/  


DroolsDAOImpl.java : 


public class DroolsDAOImpl implements DroolsDAO {

private StatefulKnowledgeSession ksession;

private IntermediateData intermediateData;

private KnowledgeBase kbase;

public KnowledgeBase getKbase() {
return kbase;
}

public void setKbase(KnowledgeBase kbase) {
this.kbase = kbase;
}

public StatefulKnowledgeSession getKsession() {
return ksession;
}

public void setKsession(StatefulKnowledgeSession ksession) {
this.ksession = ksession;
}

public static void main(String args[]) throws Exception{

   Resource res = new ClassPathResource(beans.xml);
BeanFactory factory = new XmlBeanFactory(res);
DroolsDAOImpl
droolsDAOImpl=(DroolsDAOImpl)factory.getBean(droolsDAOImpl); 
droolsDAOImpl.init_drools(); 
  
}

public void init_drools() throws Exception{


try {


ksession = kbase.newStatefulKnowledgeSession();

 
intermediateData.setNoofPay(noofPaytemp());
intermediateData.setRegPay(regpaytemp());

ksession.insert(intermediateData);
ksession.fireAllRules();

}   catch (Throwable t) {

logger.error(Exception occured in 
DroolsDAOImpl---+t);
throw new Exception(Some Error Occured. Please 
try after some time);

} }


I am having one drl file : Sample.drl which contains rule and
IntermediateData is simple pojo. 
But after running this I am getting following error: 

Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The
matching wildcard is strict, but no declaration can be found for element
'drools:kbase'.

Can anyone help me with this issue? Thanks in advance

--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-Integration-with-Spring-tp3147946p3147946.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] Unittesting in drools ?

2011-07-07 Thread Andre

and how do you examine, whether a special rule has fired? 
cause the code just checks whether the engine has done modifications on
objects 
and is it possibly to load the spring config in such a Junit test? 

--
View this message in context: 
http://drools.46999.n3.nabble.com/Unittesting-in-drools-tp3137475p3148050.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] Unittesting in drools ?

2011-07-07 Thread Mark Proctor
On 07/07/2011 13:44, Andre wrote:
 and how do you examine, whether a special rule has fired?
 cause the code just checks whether the engine has done modifications on
 objects
 and is it possibly to load the spring config in such a Junit test?
For just unit testing we tend to have the consequence put a value in a 
list or  map. But you can use an agenda listener to record what has 
fired with what facts.

it's normal java, so you can definitely just load up your kbase with spring.

Mark

 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Unittesting-in-drools-tp3137475p3148050.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] sliding window combination ?

2011-07-07 Thread Andre
here im again , cause im not really sure i matched the goal i wanted with
this combination:
does it really checks, whether in time window 1m are the same 2 events with
the same name ?
 when
$actual: RequestCtx()

ArrayList( size = 2 )
  from collect( $expected : RequestCtx(
DroolsUtils.requestsMatchesforSubjectID($expected,$actual,
urn:oasis:names:tc:xacml:1.0:subject:subject-id) ) over window:time(1m) ) 

my tests results are looking strange und im would say that theres something
missing , which connects the the LHS parts, to ensure that not the same
event instance will also trigger the second part 

--
View this message in context: 
http://drools.46999.n3.nabble.com/sliding-window-combination-tp3132340p3148104.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] Performance optimization guidelines for Drools

2011-07-07 Thread Wishing Carebear
Hello,
I'm trying to run a ruleflow (sequence of only rules) using Statteful and
stateless session. Could you please point me to any performance optimization
guideliness.

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


Re: [rules-users] sliding window combination ?

2011-07-07 Thread Andre
hm hey, i said that i have understand the  init thing, seems not
how do i get my first id , which ich dann check in accumulate-method  so
to be clear im missing some kind of InputObject ti initialize with ??

(my Classp implements TypedAccumulateFunction)

--
View this message in context: 
http://drools.46999.n3.nabble.com/sliding-window-combination-tp3132340p3148380.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] Problem with salience

2011-07-07 Thread jmolly
Hello.
I'm facing some problems in drools with salience. (maybe I don't understand
how it works)

We have a rule that check if an import has been satisfied by the client. But
we have a lot of pay methods so, when the import has been satisfied, we have
to stop all the payment devices. If a payment device is in use, we can't
stop it, so we send stop commands until device can stop.
The problem is that if a device is making a pay process, and consumes an
event, that event is never fired.

Maybe I can explain better with code:


rule Pay device stop
Salience 10
Try to stop the device and sends an OPERATION_IN event if can't stop
(because there is a ticket inside)

Machine rule 
rule Operation in received witch devices not stopped
salience 10
   Sent stop events to all devices

Machine rule
rule Operation in received with devices stopped
salience 10
All ok. Finish operation


rule Ticket data read
salience 1000
  updates the debt for the user and sends an OPERATION_IN

The pay hardware, when is reading a ticket, sent a TICKET_DATA_READ
this rule has salience 100 and should be fired inmediatly but Drools is
entering all time in a bucle from Operation in received and Pay stop device.


Can someone give a clue about what are we doing wrong?


Sorry for the english. I can post the original code if needed.
Thanks in advance










--
View this message in context: 
http://drools.46999.n3.nabble.com/Problem-with-salience-tp3148382p3148382.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] sliding window combination ?

2011-07-07 Thread Wolfgang Laun
[OT: Your email address has problems: Benutzer hat zuviele Mails auf dem
Server.]



On 7 July 2011 16:35, Andre morpheusan...@web.de wrote:

 hm hey, i said that i have understand the  init thing, seems not
 how do i get my first id , which ich dann check in accumulate-method 
 so
 to be clear im missing some kind of InputObject ti initialize with ??


Wait a jiffy, OK?
-W



 (my Classp implements TypedAccumulateFunction)

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/sliding-window-combination-tp3132340p3148380.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] sliding window combination ?

2011-07-07 Thread Andre
it seems much clearer, th but im afraid that this was not the last
question... 

--
View this message in context: 
http://drools.46999.n3.nabble.com/sliding-window-combination-tp3132340p3148448.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] sliding window combination ?

2011-07-07 Thread Andre
there it is
you wrote in that in the init there is Map xx = new

but in the drools implementation the context  is given as method parameter
, which will be created in  the createContext method, was this a mistake ? 

--
View this message in context: 
http://drools.46999.n3.nabble.com/sliding-window-combination-tp3132340p3148475.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] sliding window combination ?

2011-07-07 Thread Wolfgang Laun
Using a simple
  class Request{ String id;... }
and an auxiliary
  class IdCount {String id; int count; ... }
and some insertions
kSession.insert( new Request( a ) );
kSession.insert( new Request( b ) );
kSession.insert( new Request( c ) );
kSession.insert( new Request( b ) );
kSession.insert( new Request( c ) );
kSession.insert( new Request( c ) );
the rule below

rule countById
when
$list: List()
from accumulate( Request( $id: id ),
  init( Map id2count = new HashMap() ),
  action( IdCount ic = (IdCount)id2count.get( $id );
  if( ic == null ){
  ic = new IdCount( $id, 1 );
  } else {
  ic.setCount( ic.getCount() + 1 );
  }
  id2count.put( $id, ic ); )
  reverse( IdCount ic = (IdCount)id2count.get( $id );
   ic.setCount( ic.getCount() - 1 );
   id2count.put( $id, ic ); )
  result( id2count.values() ) )

IdCount( $id: id, $count: count  1 ) from $list
then
System.out.println( Id  + $id + :  + $count );
end

produces
   Id c: 3
   Id b: 2

-W



On 7 July 2011 16:55, Andre morpheusan...@web.de wrote:

 it seems much clearer, th but im afraid that this was not the last
 question...

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/sliding-window-combination-tp3132340p3148448.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 do we access all the values in an enum (Managed in Guvnor) in a rule of Guvnor

2011-07-07 Thread Michael Anstis
No.

enum definitions are held within Guvnor's repository (author-time resources)
which does not have to be available in the environment in which the rules
are executed (runtime-resources).

You could theoretically write a helper function that was used in combination
with the from keyword that retrieved and parsed the enum definitions, but
you'd have to be desperate to want to try it.

With kind regards,

Mike

On 7 July 2011 13:13, Prasad prasad1...@gmail.com wrote:

 Hi All,

 We have a scenario where in we need to return the list of all values
 defined
 in an enumeration in Gunvor.

 Can we access the list of possible values defined in an enumeration as a
 collection in a rule instead of using them one at a time as in LOV.

 Thanks

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/How-do-we-access-all-the-values-in-an-enum-Managed-in-Guvnor-in-a-rule-of-Guvnor-tp3147980p3147980.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] Drools Expert (5.2.0.Final) documentation; Ch5 issue

2011-07-07 Thread Robert Christenson
When viewing the single-html docs for 5.2.0.-Final, the documentation is
truncated after section 5.8.3.8

 

Checked the html option as well, it also ends at 5.8.3.8 for Chapter 5.

 

No problems with the pdf, though it's not directly accessible from the
doco page, http://www.jboss.org/drools/documentation  I found the pdf in
this directory:
http://docs.jboss.org/drools/release/5.2.0.Final/drools-expert-docs/

 

Just wanted to let the 'powers that be' know of the issue.

 

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


Re: [rules-users] sliding window combination ?

2011-07-07 Thread Andre
sry if my questions are looking that nooby, that you are coding for me  i
just wanna know, how this statemachine works behind this ..

--
View this message in context: 
http://drools.46999.n3.nabble.com/sliding-window-combination-tp3132340p3148523.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 Expert (5.2.0.Final) documentation; Ch5 issue

2011-07-07 Thread Michael Anstis
Mark Proctor also reported this, however users of browsers other than IE,
IIRC, could see the document in its full splendour.

Mark, you were OK with FF?

2011/7/7 Robert Christenson r...@akc.org

  When viewing the single-html docs for 5.2.0.-Final, the documentation is
 truncated after section 5.8.3.8

 ** **

 Checked the html option as well, it also ends at 5.8.3.8 for Chapter 5.***
 *

 ** **

 No problems with the pdf, though it’s not directly accessible from the doco
 page, http://www.jboss.org/drools/documentation  I found the pdf in this
 directory:
 http://docs.jboss.org/drools/release/5.2.0.Final/drools-expert-docs/

 ** **

 Just wanted to let the ‘powers that be’ know of the issue.

 ** **

 ___
 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] from accumulate ... from generates wrong DRL in guided rule editor in Guvnor

2011-07-07 Thread kennywest
All,

I have managed to deploy Guvnor 5.2.0 on a JBoss 6.0 application server.
Following this demo:
http://www.plugtree.com/downloads/screencasts/03-Accumulate_demo.htm
generates wrong code. The from accumulate line when viewing source looks
like this:
count : Long( longValue  1 ) from accumulate  ( p : Person( name
== John ) from parent.children, count(p)) 

For some reason, there is a  character in p : Person which should not
be there. Any ideas?


regards,

Kenneth

--
View this message in context: 
http://drools.46999.n3.nabble.com/from-accumulate-from-generates-wrong-DRL-in-guided-rule-editor-in-Guvnor-tp3148562p3148562.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] sliding window combination ?

2011-07-07 Thread Wolfgang Laun
Conceptually it's quite simple. Consider a loop

int sum( int[] array )
i = 0;// init
for( int a: array ){
   i += a; // action
}
return i; // result

Drools does the loop, calling your callbacks providing the appropriate
context from the scope of the ___ in the accumulate( _ ,

You could look at the implementations of the built-in accumulate functions,
and you'll see the same callbacks as methods of the function provider class.

Just for fun: You can also use:

import java.util.Set;
import java.util.HashMap;

rule countById
when
$set: Set()
from accumulate( Request( $id: id ),
  init( HashMap id2count = new HashMap() ),
  action( Integer i = (Integer)id2count.get( $id );
  if( i == null ) i = 0;
  i++;
  id2count.put( $id, i ); )
  reverse( Integer i = (Integer)id2count.get( $id );
   i--;
   id2count.put( $id, i ); )
  result( id2count.entrySet() ) )
java.util.Map.Entry( $id: key, $count: value  1 ) from $set
then
System.out.println( Id  + $id + :  + $count );
end

Don't worry - I wanted to research this for some time; never had an
opportunity ;-)
-W


On 7 July 2011 17:18, Andre morpheusan...@web.de wrote:

 sry if my questions are looking that nooby, that you are coding for me  i
 just wanna know, how this statemachine works behind this ..

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/sliding-window-combination-tp3132340p3148523.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] Drools Expert (5.2.0.Final) documentation; Ch5 issue

2011-07-07 Thread Geoffrey De Smet
Yea, this is an issue, but I haven't been able to look into in detail. I 
am on PTO, so I won't be able to soon.


Here's the summary of what I know so far:
firefox 3.5 is fine.
firefox 5.0 beta stops rendering after the first SVG image.
No idea on other browsers/version
Only the railroad diagrams use those SVG images.

Possibly solutions:
- Verify if any non-beta browsers run into it.
- Proposal A) get better SVG images that don't break. Wolfgang was so 
generous to create those SVG images, maybe he can help.
- Proposal B) convert all svg images into png's and use those in the 
manual. Maybe something like ffmpeg -i a.svg a.png works.


Op 07-07-11 17:23, Michael Anstis schreef:
Mark Proctor also reported this, however users of browsers other than 
IE, IIRC, could see the document in its full splendour.


Mark, you were OK with FF?

2011/7/7 Robert Christenson r...@akc.org mailto:r...@akc.org

When viewing the single-html docs for 5.2.0.-Final, the
documentation is truncated after section 5.8.3.8

Checked the html option as well, it also ends at 5.8.3.8 for
Chapter 5.

No problems with the pdf, though it’s not directly accessible from
the doco page, http://www.jboss.org/drools/documentation  I found
the pdf in this directory:
http://docs.jboss.org/drools/release/5.2.0.Final/drools-expert-docs/

Just wanted to let the ‘powers that be’ know of the issue.


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



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


--
With kind regards,
Geoffrey De Smet

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


Re: [rules-users] Problem with salience

2011-07-07 Thread Wolfgang Laun
Sorry, but I become more confused with every re-read. I think the original
code is required.

I think that this is nothing but a FSM. Generally, this sort of problem
should be doable without resorting to salience (except for one or two low
priority ones acting as the safety net).

-W



On 7 July 2011 16:35, jmolly jmo...@gmail.com wrote:

 Hello.
 I'm facing some problems in drools with salience. (maybe I don't understand
 how it works)

 We have a rule that check if an import has been satisfied by the client.
 But
 we have a lot of pay methods so, when the import has been satisfied, we
 have
 to stop all the payment devices. If a payment device is in use, we can't
 stop it, so we send stop commands until device can stop.
 The problem is that if a device is making a pay process, and consumes an
 event, that event is never fired.

 Maybe I can explain better with code:


 rule Pay device stop
 Salience 10
 Try to stop the device and sends an OPERATION_IN event if can't stop
 (because there is a ticket inside)

 Machine rule
 rule Operation in received witch devices not stopped
 salience 10
   Sent stop events to all devices

 Machine rule
 rule Operation in received with devices stopped
 salience 10
All ok. Finish operation


 rule Ticket data read
 salience 1000
  updates the debt for the user and sends an OPERATION_IN

 The pay hardware, when is reading a ticket, sent a TICKET_DATA_READ
 this rule has salience 100 and should be fired inmediatly but Drools is
 entering all time in a bucle from Operation in received and Pay stop
 device.


 Can someone give a clue about what are we doing wrong?


 Sorry for the english. I can post the original code if needed.
 Thanks in advance










 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Problem-with-salience-tp3148382p3148382.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] sliding window combination ?

2011-07-07 Thread Andre
to plug the function into the engine, we added it to the configuration file:

drools.accumulate.function.average =
   org.drools.base.accumulators.AverageAccumulateFunction

in the case i integrated drools in apache camel und configurated it with
spring , the spring should be my configuration file , right ? 
 and here it comes.. 

How ??
  haven found a tag which would match in my opinion...

--
View this message in context: 
http://drools.46999.n3.nabble.com/sliding-window-combination-tp3132340p3148661.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 periodically iterate over all facts in a stream

2011-07-07 Thread isakdim
My initial attempt is for the application to periodically set focus to the
SomeAgendaGroup and then wait for rule(s) to call
GlobalServiceProvider.someService.  On the first agenda activation, the rule
iterates through all events.  On the following agenda activations, the rule
iterates only through the events that have been inserted since the last
activation.

rule Iterate over all events in the SomeStream
agenda-group SomeAgendaGroup
when
$someEvent : SomeEvent() from entry-point SomeStream
then
GlobalServiceProvider.someService($someEvent);
end

Is there a way to implement a rule so that it iterates through all events
each time its agenda-group is activated or a different way to implement this
task?

 Thank You!

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-periodically-iterate-over-all-facts-in-a-stream-tp3148733p3148733.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] Problem with salience

2011-07-07 Thread Aitor González Serrano
Ok.
That's my code:

/** Payment Complete
 **/
 rule Pay complete
 salience 10
 no-loop true
 when
 event : PaywayEvent(id == PaywayEventType.OPERATION_IN)
 paymentData : PaymentData(credit = saleImport)
 transaction : CurrentTransaction (state ==
 TransactionState.CHARGE_PRODUCT)
 eval (!paywayManager.isStopped())
 then
 retract(event);

 updateDebt(languageManager, hmiManager,paymentData.getDebt());
 log.info(Machine.drl,Charge complete. Stopping devices!. Debt is
 +paymentData.getDebt());
 for(EnumerationString e = paywayManager.getPaywayNames();
 e.hasMoreElements(); ){
 String payway = e.nextElement();
 if(paywayManager.getPayway(payway).isLoaded()
  !paywayManager.getPayway(payway).getPaywayApi().isStopped())
 {
 PaywayEvent paywayEvent = new
 PaywayEvent(PaywayEventType.STOP_PAYMENT_DEVICES);
 paywayEvent.setDevice(payway);
 insert(paywayEvent);
 }
 }
 end


 This is the stop rule of the device

 /**STOP PAYMENT DEVICES
 /
 rule Stop EmTicket Device
 salience 10
 no-loop true
 when
 event : PaywayEvent(id == PaywayEventType.STOP_PAYMENT_DEVICES 
 device == discountticket)
 transaction : CurrentTransaction (state ==
 TransactionState.CHARGE_PRODUCT)
 eval (!emTicket.isStopped())
 then
 retract(event);
 if (emTicket.stop()){
 electromechanical.disableTakeTicket();
 electromechanical.blinkingLedOff();
 emTicket.setState(EmTicketState.OUT_OF_SERVICE);
 }
 else{
 log.info(EmTicket,EmTicket cannot be stoped!);
 }

 insert (new PaywayEvent(PaywayEventType.OPERATION_IN));
 end



So, there are bidirectional calls between STOP_PAYMENT_DEVICES and
OPERATION_IN (because emTicket can't be stopped, so an event should be fired
soon)

While this 2 rules are firing the other, the hardware sends an
DISCOUNT_TICKET_ACCEPTED, that updates the debt, and the state of EmTicket,
so the in next STOP_PAYMENT_DEVICES emTicket will be stopped.

rule Discount Ticket discarded when accepted
 salience 1000
 no-loop true
 when
 event : ElectromechanicalEvent (eventType ==
 ElectromechanicalEventType.CONSUM_EVENT
  description == articleDiscarded)
 transaction : CurrentTransaction(state ==
 TransactionState.CHARGE_PRODUCT)
 eval (emTicket.getState() == EmTicketState.ARTICLE_TAKEN)
 paymentData : PaymentData()
 then
   lot of code here..
 end



The problem I'm facing is that  rule Discount Ticket discarded when
accepted is never fired (and has a lot more of salience than the other
two)! The other two rules are in a constant bucle. The event of the
discarded is sent via enginer.insertEvent()  fireAllRules. Maybe insert
command in drl files has more priority than facts invoked from java classes?
 Thanks in advance!










2011/7/7 Wolfgang Laun wolfgang.l...@gmail.com

 Sorry, but I become more confused with every re-read. I think the original
 code is required.

 I think that this is nothing but a FSM. Generally, this sort of problem
 should be doable without resorting to salience (except for one or two low
 priority ones acting as the safety net).

 -W




 On 7 July 2011 16:35, jmolly jmo...@gmail.com wrote:

 Hello.
 I'm facing some problems in drools with salience. (maybe I don't
 understand
 how it works)

 We have a rule that check if an import has been satisfied by the client.
 But
 we have a lot of pay methods so, when the import has been satisfied, we
 have
 to stop all the payment devices. If a payment device is in use, we can't
 stop it, so we send stop commands until device can stop.
 The problem is that if a device is making a pay process, and consumes an
 event, that event is never fired.

 Maybe I can explain better with code:


 rule Pay device stop
 Salience 10
 Try to stop the device and sends an OPERATION_IN event if can't stop
 (because there is a ticket inside)

 Machine rule
 rule Operation in received witch devices not stopped
 salience 10
   Sent stop events to all devices

 Machine rule
 rule Operation in received with devices stopped
 salience 10
All ok. Finish operation


 rule Ticket data read
 salience 1000
  updates the debt for the user and sends an OPERATION_IN

 The pay hardware, when is reading a ticket, sent a TICKET_DATA_READ
 this rule has salience 100 and should be fired inmediatly but Drools is
 entering all time in a bucle from Operation in received and Pay stop
 device.


 Can someone give a clue about what are we doing wrong?


 Sorry for the english. I can post the original code if needed.
 Thanks in advance










 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Problem-with-salience-tp3148382p3148382.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 

Re: [rules-users] Drools Expert (5.2.0.Final) documentation; Ch5 issue

2011-07-07 Thread Raf
2011/7/7 Geoffrey De Smet ge0ffrey.s...@gmail.com

 **
 Yea, this is an issue, but I haven't been able to look into in detail. I am
 on PTO, so I won't be able to soon.

 Here's the summary of what I know so far:
 firefox 3.5 is fine.
 firefox 5.0 beta stops rendering after the first SVG image.
 No idea on other browsers/version


I confirm I have the same problem with:
* Firefox 5.0
* Chrome 13.0.782.41 beta
on Ubuntu 11.04

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


Re: [rules-users] Problem with salience

2011-07-07 Thread Wolfgang Laun
OK, this is a little more to the point.

What you should review critically is the use of paywayManager (in Pay
complete) and emTicket (in the other rules). Apparently, these objects are
not WM items - are they globals? Globals must not be used in conditions the
way they are apparently used here.

It's impossible to tell from these snippets why the last rule never fires -
there's that  ElectromechanicalEvent...

-W



2011/7/7 Aitor González Serrano jmo...@gmail.com

 Ok.
 That's my code:

 /** Payment Complete
 **/
 rule Pay complete
 salience 10
 no-loop true
 when
 event : PaywayEvent(id == PaywayEventType.OPERATION_IN)
 paymentData : PaymentData(credit = saleImport)
 transaction : CurrentTransaction (state ==
 TransactionState.CHARGE_PRODUCT)
 eval (!paywayManager.isStopped())
 then
 retract(event);

 updateDebt(languageManager, hmiManager,paymentData.getDebt());
 log.info(Machine.drl,Charge complete. Stopping devices!. Debt is
 +paymentData.getDebt());
 for(EnumerationString e = paywayManager.getPaywayNames();
 e.hasMoreElements(); ){
 String payway = e.nextElement();
 if(paywayManager.getPayway(payway).isLoaded()
 
 !paywayManager.getPayway(payway).getPaywayApi().isStopped()) {
 PaywayEvent paywayEvent = new
 PaywayEvent(PaywayEventType.STOP_PAYMENT_DEVICES);
 paywayEvent.setDevice(payway);
 insert(paywayEvent);
 }
 }
 end


 This is the stop rule of the device

 /**STOP PAYMENT DEVICES
 /
 rule Stop EmTicket Device
 salience 10
 no-loop true
 when
 event : PaywayEvent(id == PaywayEventType.STOP_PAYMENT_DEVICES 
 device == discountticket)
 transaction : CurrentTransaction (state ==
 TransactionState.CHARGE_PRODUCT)
 eval (!emTicket.isStopped())
 then
 retract(event);
 if (emTicket.stop()){
 electromechanical.disableTakeTicket();
 electromechanical.blinkingLedOff();
 emTicket.setState(EmTicketState.OUT_OF_SERVICE);
 }
 else{
 log.info(EmTicket,EmTicket cannot be stoped!);
 }

 insert (new PaywayEvent(PaywayEventType.OPERATION_IN));
 end



 So, there are bidirectional calls between STOP_PAYMENT_DEVICES and
 OPERATION_IN (because emTicket can't be stopped, so an event should be fired
 soon)

 While this 2 rules are firing the other, the hardware sends an
 DISCOUNT_TICKET_ACCEPTED, that updates the debt, and the state of EmTicket,
 so the in next STOP_PAYMENT_DEVICES emTicket will be stopped.

 rule Discount Ticket discarded when accepted
 salience 1000
 no-loop true
 when
 event : ElectromechanicalEvent (eventType ==
 ElectromechanicalEventType.CONSUM_EVENT
  description == articleDiscarded)
 transaction : CurrentTransaction(state ==
 TransactionState.CHARGE_PRODUCT)
 eval (emTicket.getState() == EmTicketState.ARTICLE_TAKEN)
 paymentData : PaymentData()
 then
   lot of code here..
 end



 The problem I'm facing is that  rule Discount Ticket discarded when
 accepted is never fired (and has a lot more of salience than the other
 two)! The other two rules are in a constant bucle. The event of the
 discarded is sent via enginer.insertEvent()  fireAllRules. Maybe insert
 command in drl files has more priority than facts invoked from java classes?
  Thanks in advance!











 2011/7/7 Wolfgang Laun wolfgang.l...@gmail.com

 Sorry, but I become more confused with every re-read. I think the original
 code is required.

 I think that this is nothing but a FSM. Generally, this sort of problem
 should be doable without resorting to salience (except for one or two low
 priority ones acting as the safety net).

 -W




 On 7 July 2011 16:35, jmolly jmo...@gmail.com wrote:

 Hello.
 I'm facing some problems in drools with salience. (maybe I don't
 understand
 how it works)

 We have a rule that check if an import has been satisfied by the client.
 But
 we have a lot of pay methods so, when the import has been satisfied, we
 have
 to stop all the payment devices. If a payment device is in use, we can't
 stop it, so we send stop commands until device can stop.
 The problem is that if a device is making a pay process, and consumes an
 event, that event is never fired.

 Maybe I can explain better with code:


 rule Pay device stop
 Salience 10
 Try to stop the device and sends an OPERATION_IN event if can't stop
 (because there is a ticket inside)

 Machine rule
 rule Operation in received witch devices not stopped
 salience 10
   Sent stop events to all devices

 Machine rule
 rule Operation in received with devices stopped
 salience 10
All ok. Finish operation


 rule Ticket data read
 salience 1000
  updates the debt for the user and sends an OPERATION_IN

 The pay hardware, when is reading a ticket, sent a TICKET_DATA_READ
 this rule has salience 100 

Re: [rules-users] Problem with salience

2011-07-07 Thread Aitor González Serrano
You are right. Both paywayManager and emTicket are globals. Maybe I'm not
understanding the use of globals? It would solve the problem converting that
globals into objects in the working memory?

Thanks

2011/7/7 Wolfgang Laun wolfgang.l...@gmail.com

 OK, this is a little more to the point.

 What you should review critically is the use of paywayManager (in Pay
 complete) and emTicket (in the other rules). Apparently, these objects are
 not WM items - are they globals? Globals must not be used in conditions the
 way they are apparently used here.

 It's impossible to tell from these snippets why the last rule never fires -
 there's that  ElectromechanicalEvent...

 -W




 2011/7/7 Aitor González Serrano jmo...@gmail.com

 Ok.
 That's my code:

 /** Payment Complete
 **/
 rule Pay complete
 salience 10
 no-loop true
 when
 event : PaywayEvent(id == PaywayEventType.OPERATION_IN)
 paymentData : PaymentData(credit = saleImport)
 transaction : CurrentTransaction (state ==
 TransactionState.CHARGE_PRODUCT)
 eval (!paywayManager.isStopped())
 then
 retract(event);

 updateDebt(languageManager, hmiManager,paymentData.getDebt());
 log.info(Machine.drl,Charge complete. Stopping devices!. Debt is
 +paymentData.getDebt());
 for(EnumerationString e = paywayManager.getPaywayNames();
 e.hasMoreElements(); ){
 String payway = e.nextElement();
 if(paywayManager.getPayway(payway).isLoaded()
 
 !paywayManager.getPayway(payway).getPaywayApi().isStopped()) {
 PaywayEvent paywayEvent = new
 PaywayEvent(PaywayEventType.STOP_PAYMENT_DEVICES);
 paywayEvent.setDevice(payway);
 insert(paywayEvent);
 }
 }
 end


 This is the stop rule of the device

 /**STOP PAYMENT DEVICES
 /
 rule Stop EmTicket Device
 salience 10
 no-loop true
 when
 event : PaywayEvent(id == PaywayEventType.STOP_PAYMENT_DEVICES 
 device == discountticket)
 transaction : CurrentTransaction (state ==
 TransactionState.CHARGE_PRODUCT)
 eval (!emTicket.isStopped())
 then
 retract(event);
 if (emTicket.stop()){
 electromechanical.disableTakeTicket();
 electromechanical.blinkingLedOff();
 emTicket.setState(EmTicketState.OUT_OF_SERVICE);
 }
 else{
 log.info(EmTicket,EmTicket cannot be stoped!);
 }

 insert (new PaywayEvent(PaywayEventType.OPERATION_IN));
 end



 So, there are bidirectional calls between STOP_PAYMENT_DEVICES and
 OPERATION_IN (because emTicket can't be stopped, so an event should be fired
 soon)

 While this 2 rules are firing the other, the hardware sends an
 DISCOUNT_TICKET_ACCEPTED, that updates the debt, and the state of EmTicket,
 so the in next STOP_PAYMENT_DEVICES emTicket will be stopped.

 rule Discount Ticket discarded when accepted
 salience 1000
 no-loop true
 when
 event : ElectromechanicalEvent (eventType ==
 ElectromechanicalEventType.CONSUM_EVENT
  description == articleDiscarded)
 transaction : CurrentTransaction(state ==
 TransactionState.CHARGE_PRODUCT)
 eval (emTicket.getState() == EmTicketState.ARTICLE_TAKEN)
 paymentData : PaymentData()
 then
   lot of code here..
 end



 The problem I'm facing is that  rule Discount Ticket discarded when
 accepted is never fired (and has a lot more of salience than the other
 two)! The other two rules are in a constant bucle. The event of the
 discarded is sent via enginer.insertEvent()  fireAllRules. Maybe insert
 command in drl files has more priority than facts invoked from java classes?
  Thanks in advance!











 2011/7/7 Wolfgang Laun wolfgang.l...@gmail.com

 Sorry, but I become more confused with every re-read. I think the
 original code is required.

 I think that this is nothing but a FSM. Generally, this sort of problem
 should be doable without resorting to salience (except for one or two low
 priority ones acting as the safety net).

 -W




 On 7 July 2011 16:35, jmolly jmo...@gmail.com wrote:

 Hello.
 I'm facing some problems in drools with salience. (maybe I don't
 understand
 how it works)

 We have a rule that check if an import has been satisfied by the client.
 But
 we have a lot of pay methods so, when the import has been satisfied, we
 have
 to stop all the payment devices. If a payment device is in use, we can't
 stop it, so we send stop commands until device can stop.
 The problem is that if a device is making a pay process, and consumes an
 event, that event is never fired.

 Maybe I can explain better with code:


 rule Pay device stop
 Salience 10
 Try to stop the device and sends an OPERATION_IN event if can't stop
 (because there is a ticket inside)

 Machine rule
 rule Operation in received witch devices not stopped
 salience 10
   Sent stop events to all devices

 Machine rule
 rule Operation in received 

Re: [rules-users] Problem with salience

2011-07-07 Thread Wolfgang Laun
Re-alerting the Rule Engine to changes in these objects requires them to be
facts.

I don't see where they are changed; if so, it must be done using
modify/update.

-W

2011/7/7 Aitor González Serrano jmo...@gmail.com

 You are right. Both paywayManager and emTicket are globals. Maybe I'm not
 understanding the use of globals? It would solve the problem converting that
 globals into objects in the working memory?

 Thanks


 2011/7/7 Wolfgang Laun wolfgang.l...@gmail.com

 OK, this is a little more to the point.

 What you should review critically is the use of paywayManager (in Pay
 complete) and emTicket (in the other rules). Apparently, these objects are
 not WM items - are they globals? Globals must not be used in conditions the
 way they are apparently used here.

 It's impossible to tell from these snippets why the last rule never fires
 - there's that  ElectromechanicalEvent...

 -W




 2011/7/7 Aitor González Serrano jmo...@gmail.com

 Ok.
 That's my code:

 /** Payment Complete
 **/
 rule Pay complete
 salience 10
 no-loop true
 when
 event : PaywayEvent(id == PaywayEventType.OPERATION_IN)
 paymentData : PaymentData(credit = saleImport)
 transaction : CurrentTransaction (state ==
 TransactionState.CHARGE_PRODUCT)
 eval (!paywayManager.isStopped())
 then
 retract(event);

 updateDebt(languageManager, hmiManager,paymentData.getDebt());
 log.info(Machine.drl,Charge complete. Stopping devices!. Debt is
 +paymentData.getDebt());
 for(EnumerationString e = paywayManager.getPaywayNames();
 e.hasMoreElements(); ){
 String payway = e.nextElement();
 if(paywayManager.getPayway(payway).isLoaded()
 
 !paywayManager.getPayway(payway).getPaywayApi().isStopped()) {
 PaywayEvent paywayEvent = new
 PaywayEvent(PaywayEventType.STOP_PAYMENT_DEVICES);
 paywayEvent.setDevice(payway);
 insert(paywayEvent);
 }
 }
 end


 This is the stop rule of the device

 /**STOP PAYMENT DEVICES
 /
 rule Stop EmTicket Device
 salience 10
 no-loop true
 when
 event : PaywayEvent(id == PaywayEventType.STOP_PAYMENT_DEVICES 
 device == discountticket)
 transaction : CurrentTransaction (state ==
 TransactionState.CHARGE_PRODUCT)
 eval (!emTicket.isStopped())
 then
 retract(event);
 if (emTicket.stop()){
 electromechanical.disableTakeTicket();
 electromechanical.blinkingLedOff();
 emTicket.setState(EmTicketState.OUT_OF_SERVICE);
 }
 else{
 log.info(EmTicket,EmTicket cannot be stoped!);
 }

 insert (new PaywayEvent(PaywayEventType.OPERATION_IN));
 end



 So, there are bidirectional calls between STOP_PAYMENT_DEVICES and
 OPERATION_IN (because emTicket can't be stopped, so an event should be fired
 soon)

 While this 2 rules are firing the other, the hardware sends an
 DISCOUNT_TICKET_ACCEPTED, that updates the debt, and the state of EmTicket,
 so the in next STOP_PAYMENT_DEVICES emTicket will be stopped.

 rule Discount Ticket discarded when accepted
 salience 1000
 no-loop true
 when
 event : ElectromechanicalEvent (eventType ==
 ElectromechanicalEventType.CONSUM_EVENT
  description == articleDiscarded)
 transaction : CurrentTransaction(state ==
 TransactionState.CHARGE_PRODUCT)
 eval (emTicket.getState() == EmTicketState.ARTICLE_TAKEN)
 paymentData : PaymentData()
 then
   lot of code here..
 end



 The problem I'm facing is that  rule Discount Ticket discarded when
 accepted is never fired (and has a lot more of salience than the other
 two)! The other two rules are in a constant bucle. The event of the
 discarded is sent via enginer.insertEvent()  fireAllRules. Maybe insert
 command in drl files has more priority than facts invoked from java classes?
  Thanks in advance!











 2011/7/7 Wolfgang Laun wolfgang.l...@gmail.com

 Sorry, but I become more confused with every re-read. I think the
 original code is required.

 I think that this is nothing but a FSM. Generally, this sort of problem
 should be doable without resorting to salience (except for one or two low
 priority ones acting as the safety net).

 -W




 On 7 July 2011 16:35, jmolly jmo...@gmail.com wrote:

 Hello.
 I'm facing some problems in drools with salience. (maybe I don't
 understand
 how it works)

 We have a rule that check if an import has been satisfied by the
 client. But
 we have a lot of pay methods so, when the import has been satisfied, we
 have
 to stop all the payment devices. If a payment device is in use, we
 can't
 stop it, so we send stop commands until device can stop.
 The problem is that if a device is making a pay process, and consumes
 an
 event, that event is never fired.

 Maybe I can explain better with code:


 rule Pay device stop
 Salience 10
 Try to stop the device and sends an 

Re: [rules-users] Drools Expert (5.2.0.Final) documentation; Ch5 issue

2011-07-07 Thread Justin Case
Same problem here in FFx 5  on W7x64. In IE9 it works.
JC



From: Raf r.ventag...@gmail.com
To: Rules Users List rules-users@lists.jboss.org
Sent: Thu, July 7, 2011 6:49:11 PM
Subject: Re: [rules-users] Drools Expert (5.2.0.Final) documentation; Ch5 issue




2011/7/7 Geoffrey De Smet ge0ffrey.s...@gmail.com

 
Yea, this is an issue, but I haven't been able to look into in detail. I 
am 
on PTO, so I won't be able to soon.

Here's the summary of what I know so far:
firefox 3.5 is fine.
firefox 5.0 beta stops rendering after the first SVG image.
No idea on other browsers/version


I confirm I have the same problem with:
* Firefox 5.0
* Chrome 13.0.782.41 beta
on Ubuntu 11.04

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


[rules-users] Category not visible to pacakage.admin

2011-07-07 Thread jayadev
As an administrator I can create rule assets and associate them to
categories, however, when a package.admin (or) package.developer tries to
create a rule asset, he is unable to see the categories. It displays the
following message: 

No categories created yet. Add some categories from the administration
screen.

Is this a bug?

--
View this message in context: 
http://drools.46999.n3.nabble.com/Category-not-visible-to-pacakage-admin-tp3149249p3149249.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] Category not visible to pacakage.admin

2011-07-07 Thread Michael Anstis
Sure sounds like it.

Please raise a JIRA at https://issues.jboss.org/browse/GUVNOR and we'll take
a look.

Thanks,

Mike

On 7 July 2011 20:01, jayadev manchambha...@gmail.com wrote:

 As an administrator I can create rule assets and associate them to
 categories, however, when a package.admin (or) package.developer tries to
 create a rule asset, he is unable to see the categories. It displays the
 following message:

 No categories created yet. Add some categories from the administration
 screen.

 Is this a bug?

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Category-not-visible-to-pacakage-admin-tp3149249p3149249.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 another few questions...

2011-07-07 Thread Vincent LEGENDRE





Ideally I'd like to implement tabular templates where a column can be any DRL 
fragment with place-holders for values and the data is listed in the rows 
below. It's on the to do list. 

Great! If the whole column's DRL fragment generation is conditioned by the 
non-empty cell, that's fine. 
It could be great to add some DRL fragment non-directly linked to a column (to 
do some links betweens patterns hidden from business user) 


If the template limitation you mention is causing problems please raise a JIRA 
and we can look into changing the behaviour. 

I am still not sure if the limitations of decision tables are good or bad. 
Because most of times, adding some stuff in POJO has a real business sense, 
simply because you need it exposed to your users. So the final POJO model is 
far much natural for a user (which may cause troubles to IT, forced to make 
some facade objects, but that's our job!) 


For i18n : 
Once compiled, you can't change the labels, even if the locale already exists. 
I had made this experience while trying to make the french file (for 5.1 
version). 
This is the way GWT works : it compiles javascript from java code, and includes 
the labels in it. So the labels are hard-coded in the js, and the is one js by 
locale. 
So to change a label, or add a locale, you need to get the code and recompile 
it. 

The Constants.class is the entry point for differents GWT's locales. There are 
some Constants.properties files (Constants_fr_FR.properties ...) that contains 
labels, used by the GWT compiler (see 
https://community.jboss.org/wiki/TranslationsForGuvnorGUI ) 

You may think that is not real i18n, but you suppose that there is a common 
and accepted definition that defines a 'real' i18n to be mandatory dynamic. GWT 
is not, by purpose. I guess that javascript does not have any functionalities 
to do that dynamically, other than doing a lot of AJAX queries for any label, 
which would be perfectly innefficient, especially for labels that don't change 
that often (See there for more infos : 
http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5s=google-web-toolkit-doc-1-5t=DevGuideStaticStringInternationalization
 ) 



As from 5.3 we also set the locale automatically (from the browsers 
Accept-Language setting in Guvnor.jsp 

Uh I always hated that when it came without the option to change it by hand 
but that's probably only me. 

The 5.3 modification will rely on your browser's locale configuration, not 
windows' one. And you can still change it using the locale parameter in the 
URL. 
So you can change by hand in many ways ... 
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Guvnor another few questions...

2011-07-07 Thread Vincent LEGENDRE

Yes, but that looks like a very very limited version of the literal value. 
I really don't see any benefit in the predicate, other than being a shortcut 
for 
choosing a field literal value = true or false... am I missing something here? 

Yes, I think you are missing some things. 
You can write exactly the same arbitrary things you could write in a nested 
eval(...) in a DRL constraint. 
But the dialog box is not really friendly :) 

Let's say you have a pattern on a object name $o (I assume you have found how 
to create a pattern object linked to a variable's name in guvnor decision 
tables), and a function f(Object) you want to apply to this object in your 
constraint . 
In your column's edit box, choose the object you work with (ie $o), choose 
predicate, and then type f($o) in the field where there is the text not 
relevant for predicates (which is obviously a lie, this first field is 
mandatory for predicates ) 




Well, unless one can upload a Java _source_ file or link it somehow, just 
seeing 
the files still doesn't bring much except some comfort look here they are. 

Guvnor is made for business users, I don't think that java code should be 
uploaded in it... and I can't see the confort induced by polluting your Guvnor 
with unecessary files ... 



I create a new rule flow in _Guvnor_. I land on the upload resource tab. The 
RF is created but it's obviously empty. I do nothing there but immediately 
switch to Eclipse, refresh Guvnor repo view, click on the freshly created RF, 
bang. 

Never tried that. May be Guvnor is creating JBPM files (instead of old-style RF 
files) and you don't have the JBPM jars in Eclipse ? 
I always edit my ruleflows under eclipse (old usage because it is really recent 
that Guvnor can edit them). 


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


Re: [rules-users] Category not visible to pacakage.admin

2011-07-07 Thread jayadev
https://issues.jboss.org/browse/GUVNOR-1523

--
View this message in context: 
http://drools.46999.n3.nabble.com/Category-not-visible-to-pacakage-admin-tp3149249p3149525.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] from accumulate ... from generates wrong DRL in guided rule editor in Guvnor

2011-07-07 Thread Michael Anstis
I followed the example too (admittedly with 5.3.0-Beta1 SNAPSHOT) and the
resulting rule did not have the additional .

Feel free to email your repository export and I'll take a look.

With kind regards,

Mike

On 7 July 2011 16:28, kennywest kenneth.westeli...@telenet.be wrote:

 All,

 I have managed to deploy Guvnor 5.2.0 on a JBoss 6.0 application server.
 Following this demo:
 http://www.plugtree.com/downloads/screencasts/03-Accumulate_demo.htm
 generates wrong code. The from accumulate line when viewing source looks
 like this:
 count : Long( longValue  1 ) from accumulate  ( p : Person( name
 == John ) from parent.children, count(p))

 For some reason, there is a  character in p : Person which should not
 be there. Any ideas?


 regards,

 Kenneth

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/from-accumulate-from-generates-wrong-DRL-in-guided-rule-editor-in-Guvnor-tp3148562p3148562.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] Drools Expert (5.2.0.Final) documentation; Ch5 issue

2011-07-07 Thread Mark Proctor

On 07/07/2011 16:23, Michael Anstis wrote:
Mark Proctor also reported this, however users of browsers other than 
IE, IIRC, could see the document in its full splendour.



I'm using FF 5.0 and it does not work.

Mark

Mark, you were OK with FF?

2011/7/7 Robert Christenson r...@akc.org mailto:r...@akc.org

When viewing the single-html docs for 5.2.0.-Final, the
documentation is truncated after section 5.8.3.8

Checked the html option as well, it also ends at 5.8.3.8 for
Chapter 5.

No problems with the pdf, though it's not directly accessible from
the doco page, http://www.jboss.org/drools/documentation  I found
the pdf in this directory:
http://docs.jboss.org/drools/release/5.2.0.Final/drools-expert-docs/

Just wanted to let the 'powers that be' know of the issue.


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




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


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