[rules-users] the condition starts with - in DSL mapping

2011-06-23 Thread James Gu
Hi,

I am using guvnor-5.2.0.CR1-jboss-as-5.1. I found a bug in DSL mapping.

This is the DSL items.

[when]There is an TestObject=TestObject()
[when]-startDate is before {date}=startDateDateUtils.parseDate({date})
[when]-endDate is after {date}=endDateDateUtils.parseDate({date})

I created a business rule added these three lines in order. I clicked view
source and get this result. The second condition is not in the right place.

rule test121
dialect mvel
when
  TestObject( startDateDateUtils.parseDate(01/01/2009,
endDateDateUtils.parseDate(01/01/2008) ) )
then
end

This is what I expected. I guess guvnor is looking for the first ) and add
the condition (start with -) before it. Actually it should look for the
last ) and add the condition before it.

rule test121
dialect mvel
when
  TestObject( startDateDateUtils.parseDate(01/01/2009) ,
endDateDateUtils.parseDate(01/01/2008) )
then
end

This problem also exists in drools-5.1.1-guvnor. It will be great if it can
be fixed soon.

Thanks,
James



--
View this message in context: 
http://drools.46999.n3.nabble.com/the-condition-starts-with-in-DSL-mapping-tp3098986p3098986.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] Intersecting two collections in LHS

2011-06-23 Thread Hezi Stern
I have in the working memory all possible sentences that can be presented to
the user ( class Sentence() ).

Each sentence holds a collection (String collection) called descriptor that
describe the sentence.

 

Based on  various rules I populate a collection called messageFilter which
will be used to select the appropriate sentence.

The proper sentence is one that all its descriptors match the one in the
messageFilters

 

What I would like is something of the sort:

 

$sentences:   ArrayList() 

from collect (Sentence(descriptor contains messageFilter)

 


as messageFilter is a collection, this is not a valid code.

What would be the proper method to implement it.

 

I am using drools 5.1.1 but am willing to upgrade to 5.2 if required.

 

Thanks,

Hezi

 

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


Re: [rules-users] Intersecting two collections in LHS

2011-06-23 Thread Wolfgang Laun
Try this
http://members.inode.at/w.laun/drools/CustomOperatorHowTo.html
in combination with
http://members.inode.at/w.laun/drools/SubsetOfEvaluatorsDefinition.java

Feedback (to me personally) would be appreciated.
-W


2011/6/23 Hezi Stern he...@delegatecom.com

 I have in the working memory all possible sentences that can be presented
 to the user ( class Sentence() ).

 Each sentence holds a collection (String collection) called descriptor that
 describe the sentence.

 ** **

 Based on  various rules I populate a collection called messageFilter which
 will be used to select the appropriate sentence.

 The proper sentence is one that all its descriptors match the one in the
 messageFilters

 ** **

 What I would like is something of the sort:

 ** **

 $sentences:   ArrayList() 

 *from* *collect* (Sentence(descriptor *contains* messageFilter)


 

 as messageFilter is a collection, this is not a valid code.

 What would be the proper method to implement it.

 ** **

 I am using drools 5.1.1 but am willing to upgrade to 5.2 if required.

 ** **

 Thanks,

 Hezi

 ** **

 ___
 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 5.1 guided rule editor can only create one rule per .brl file?

2011-06-23 Thread style.x7
Hi all,

I'm finding the guided rule editor for eclipse useful in building rules with
better readability but it seems to be restricted to one rule per .brl file.
Am I missing something?

Thanks in advance.

--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-5-1-guided-rule-editor-can-only-create-one-rule-per-brl-file-tp3099153p3099153.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] Search function of Guvnor limited to filename search?

2011-06-23 Thread style.x7
Hi all,

I've tried both 5.1 and 5.2 CR version of Guvnor, seems like the search
function is limited to matching filenames, understand that the search
function is powered by Lucene which should be more powerful :) Any way to
get Guvnor perform full-text or relevance search on the rules?

Thanks in advance.

--
View this message in context: 
http://drools.46999.n3.nabble.com/Search-function-of-Guvnor-limited-to-filename-search-tp3099182p3099182.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] the condition starts with - in DSL mapping

2011-06-23 Thread Michael Anstis
I assume you have created a JIRA for this; since you noticed it in 5.1.1?

Can you please advise the number and we can endeavour to take a look for
5.3.

With kind regards,

Mike

On 23 June 2011 09:16, James Gu j...@cnsh.delphi-tech.com wrote:

 Hi,

 I am using guvnor-5.2.0.CR1-jboss-as-5.1. I found a bug in DSL mapping.

 This is the DSL items.

 [when]There is an TestObject=TestObject()
 [when]-startDate is before {date}=startDateDateUtils.parseDate({date})
 [when]-endDate is after {date}=endDateDateUtils.parseDate({date})

 I created a business rule added these three lines in order. I clicked view
 source and get this result. The second condition is not in the right
 place.

 rule test121
 dialect mvel
 when
  TestObject( startDateDateUtils.parseDate(01/01/2009,
 endDateDateUtils.parseDate(01/01/2008) ) )
 then
 end

 This is what I expected. I guess guvnor is looking for the first ) and
 add
 the condition (start with -) before it. Actually it should look for the
 last ) and add the condition before it.

 rule test121
 dialect mvel
 when
  TestObject( startDateDateUtils.parseDate(01/01/2009) ,
 endDateDateUtils.parseDate(01/01/2008) )
 then
 end

 This problem also exists in drools-5.1.1-guvnor. It will be great if it can
 be fixed soon.

 Thanks,
 James



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/the-condition-starts-with-in-DSL-mapping-tp3098986p3098986.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 Rules!!!

2011-06-23 Thread Michael Anstis
Have you looked at the mortgages example under the examples folder in
the guvnor-distribution;
http://download.jboss.org/drools/release/5.2.0.CR1/drools-distribution-5.2.0.CR1.zip
?

There is a similar example for 5.1, but TBH I'm not sure of the location in
either the download or internet.

2011/6/22 Sumeet Karawal sumeet.kara...@tcs.com


 Hi,

 I am not able to run Guvnor rules on eclipse. I have read the Knowledge
 Agent part from the user guide but not able to get through.

 I am doing the following steps:

   I have created a Java class in eclipse and exported it as a .jar file.
   Then I import it in Guvnor under the upload POJO Model.
   I create some rules for it
   Then I build the package and get the following URLs :

 URL for package documentation:


 http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/com.JBoss/LATEST/documentation.pdf(Embedded

 image moved

 to file:

 pic32197.gif)



 URL for package source:


 http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/com.JBoss/LATEST.drl(Embedded

   image moved

   to file:

   pic02151.gif)



 URL for package binary:


 http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/com.JBoss/LATEST(Embedded

   image moved

   to file:

   pic18827.gif)



 URL for running tests:


 http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/com.JBoss/LATEST/SCENARIOS(Embedded

 image moved

 to file:

 pic20956.gif)



 Change Set:


 http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/com.JBoss/LATEST/ChangeSet.xml(Embedded

 image moved

 to file:

 pic21205.gif)




 I have gone through use  of KnowledgeAgent in the user guide but not
 getting how to do it. I mean what code should I write to get the
 KnowledgeBase from these URLs.

 It would be really helpful if someone could guide me on this.


 Thanks  Regards,
 Sumeet Karawal
 Mailto: sumeet.kara...@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


Re: [rules-users] Search function of Guvnor limited to filename search?

2011-06-23 Thread Michael Anstis
You are correct, we only search asset names, although you can also perform
the Attribute search.

If you have an idea for an enhancement (to search rules themselves) why not
create a JIRA for consideration?

In order to search rules themselves we'd need to store their equivalent
plain-text DRL in the repository too. This, AFAIK, we do not.

With kind regards,

Mike

On 23 June 2011 10:11, style.x7 style...@gmail.com wrote:

 Hi all,

 I've tried both 5.1 and 5.2 CR version of Guvnor, seems like the search
 function is limited to matching filenames, understand that the search
 function is powered by Lucene which should be more powerful :) Any way to
 get Guvnor perform full-text or relevance search on the rules?

 Thanks in advance.

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Search-function-of-Guvnor-limited-to-filename-search-tp3099182p3099182.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 guided editor problem - add more options

2011-06-23 Thread marros
HI Mike,

Sorry I did not reply yesterd (I was out of work on holiday)

I decided to start again from scratch:

1. I downloaded (from www.jboss.org/jboss/downloads)
jboss-as-distribution-6.0.0.Final.zip. Unzipped it and am able to run this
version of the AS without a problem.

2. I then downloaded (from www.jboss.org/drools/downloads)
drools-5.1.1-guvnor.war. I then copied this to the deploy folder for the AS
server. I have attached a screenshot of what happens next.

http://drools.46999.n3.nabble.com/file/n3099330/AS_Screen.jpg 

The AS then just sits at this screen. 

If I then try to access http://localhost:8080/drools-guvnor I get a http 404
error.

At this point I tried stopping and restarting the AS. Part way through the
start up I get an error stating DEPLOYMENTS MISSING DEPENDENCIES, as in this
next screen shot:

http://drools.46999.n3.nabble.com/file/n3099330/as_screen2.jpg 

Any advice woudl be much appreciated.

-
--
Best Regards

Marros
--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-guided-editor-problem-add-more-options-tp3087495p3099330.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 guided editor problem - add more options

2011-06-23 Thread Michael Anstis
You can try this
http://community.jboss.org/wiki/InstallingDroolsGuvnor50InTomcat6xAndJBossAS5,
the same will probably apply to 5.1.1 too.

Guvnor 5.2 has customised versions for various AS's (that basically remove
unnecessary JARs). It should be available *today*. Have a look on
http://www.jboss.org/drools/downloads.html later (if all goes well!)

It is a shame, as a newbie, you are having this much problem :(

With kind regards,

Mike

On 23 June 2011 11:18, marros martin.ros...@vships.com wrote:

 HI Mike,

 Sorry I did not reply yesterd (I was out of work on holiday)

 I decided to start again from scratch:

 1. I downloaded (from www.jboss.org/jboss/downloads)
 jboss-as-distribution-6.0.0.Final.zip. Unzipped it and am able to run this
 version of the AS without a problem.

 2. I then downloaded (from www.jboss.org/drools/downloads)
 drools-5.1.1-guvnor.war. I then copied this to the deploy folder for the AS
 server. I have attached a screenshot of what happens next.

 http://drools.46999.n3.nabble.com/file/n3099330/AS_Screen.jpg

 The AS then just sits at this screen.

 If I then try to access http://localhost:8080/drools-guvnor I get a http
 404
 error.

 At this point I tried stopping and restarting the AS. Part way through the
 start up I get an error stating DEPLOYMENTS MISSING DEPENDENCIES, as in
 this
 next screen shot:

 http://drools.46999.n3.nabble.com/file/n3099330/as_screen2.jpg

 Any advice woudl be much appreciated.

 -
 --
 Best Regards

 Marros
 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Guvnor-guided-editor-problem-add-more-options-tp3087495p3099330.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] the condition starts with - in DSL mapping

2011-06-23 Thread James Gu

I didn't create a JIRA for this and I don't know where to create it. I know
this bug exists in drools-5.1.1-guvnor because I am using both 5.1.1 and
guvnor-5.2.0.CR1-jboss-as-5.1.

Thanks,
James

--
View this message in context: 
http://drools.46999.n3.nabble.com/the-condition-starts-with-in-DSL-mapping-tp3098986p3099430.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] the condition starts with - in DSL mapping

2011-06-23 Thread Michael Anstis
OK, here's the link https://issues.jboss.org/browse/GUVNOR

It's difficult for us to know what to fix when problems aren't recorded
anywhere except emails (and even more so IRC).

If you can attach a test repository export it makes tracking the bug down
easier. If you want to attach a patch for review you'll have new friends for
life ;)

Cheers,

Mike

On 23 June 2011 11:57, James Gu j...@cnsh.delphi-tech.com wrote:


 I didn't create a JIRA for this and I don't know where to create it. I know
 this bug exists in drools-5.1.1-guvnor because I am using both 5.1.1 and
 guvnor-5.2.0.CR1-jboss-as-5.1.

 Thanks,
 James

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/the-condition-starts-with-in-DSL-mapping-tp3098986p3099430.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] the condition starts with - in DSL mapping

2011-06-23 Thread Wolfgang Laun
 On 23 June 2011 09:16, James Gu j...@cnsh.delphi-tech.com wrote:

 Hi,

 I am using guvnor-5.2.0.CR1-jboss-as-5.1. I found a bug in DSL mapping.

 This is the DSL items.

 [when]There is an TestObject=TestObject()
 [when]-startDate is before {date}=startDateDateUtils.parseDate({date})
 [when]-endDate is after {date}=endDateDateUtils.parseDate({date})


Although not relevant for the error in the DRL creation - please note that
the wording
of the second DSL item contradicts the expression it is translated into.

Also, the constraints (even if inserted properly into the pattern) will not
compile, either in 5.1.1 or in 5.2.x, because they are syntactically
incorrect.

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


[rules-users] Question on Drools migration from 3.0 to 5.1

2011-06-23 Thread Liqun Du

 
Hi All,

We have an issue in rule when migrating drools from 3.0 to 5.1 with eval. To 
demo this error, I use the following code:

public class Info {
 public String getItem(int i) {
  return item is  + i;
 }
}

 
In Drools 3.0, the following rule is fine:
rule test eval
salience 1   
when
info : Info()
eval(into.getItem(0) != null)
   then
System.out.println(test eval);
   end

But when using drools 5.1, it shows error info can not be resolved.  I found 
a way to resolve this issue but don't know this is the best practice.

declare Item
 name : String
end

rule insert item before eval
salience 0   
when
info : Info()
   then
Item item = new Item();
   item.setName(info.getItem(0));
   insert( item );
   end

rule test eval
salience 1   
when
item : Item(n : name)
eval( n != null)
   then
System.out.println(test eval);
   end

BTW, using declare in rule may cause memory leaking? We are seeing heap size 
growing after migrated to 5.1.

Thanks,

Liqun

 


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


[rules-users] Drools rules spring integration without using any persistence

2011-06-23 Thread sv
Newbie here. Appreciate your help.
I am trying to integrate only drools expert (rules) with spring without any
persistence.  In spring beans config, i have specified like this. When i
start my local server, I received the following error.

[PersistenceUnitDeployment] Starting persistence unit
persistence.unit:unitName=#org.drools.grid
ERROR [AbstractKernelController] Error installing to Start:
name=persistence.unit:unitName=#org.drools.grid state=Create
Specification violation [EJB3 JPA 6.2.1.2] - You have not defined a
jta-data-source for a JTA enabled persistence context named: org.drools.grid


Spring beans config 


?xml version=1.0 encoding=UTF-8?
beans xmlns=http://www.springframework.org/schema/beans;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:drools=http://drools.org/schema/drools-spring;
xsi:schemaLocation=http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://drools.org/schema/drools-spring
http://drools.org/schema/drools-service-spring; 

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

drools:ksession id=statelessKSession type=stateless
name=statelessKSession kbase=kbase/drools:ksession
/beans






--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-rules-spring-integration-without-using-any-persistence-tp3100014p3100014.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] Troubles with Oryx designer in Guvnor - jBPM 5.1.CR1

2011-06-23 Thread roger
Guys,

I reconfigured my logging system, and found these lines:

http://localhost:8080/drools-guvnor/rest/packages/
Successfully deleted file :C:\Program
Files\java\apache-tomcat-6.0.32\webapps\designer\stencilsets/bpmn2.0jbpm/bpmn2.0jbpm.json
Created file:C:\Program
Files\java\apache-tomcat-6.0.32\webapps\designer\stencilsets/bpmn2.0jbpm/bpmn2.0jbpm.json
Unable to connect to Gunvor. Is it running?
[http://localhost:8080/*drools-guvnor*/org.drools.guvnor.Guvnor/oryxeditor?uuid=8b2cb280-c92c-4a61-81eb-8daddd596f87usr=adminpwd=admin]


And I realized that I was running Guvnor under http://localhost:8080/guvnor/
. Surely there is a config file that says what is Guvnor's url for Oryx.

I changed the deploy directory and it works fine.

Thanks,
Roger

--
View this message in context: 
http://drools.46999.n3.nabble.com/Troubles-with-Oryx-designer-in-Guvnor-jBPM-5-1-CR1-tp3088609p3100628.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] problems with process executions, constraints, and multiple sessions

2011-06-23 Thread Jordi Alvarez
Hello, regarding this point,

As a temporal patch, we have tried to directly modify drools-jpa
module behaviour by:

- Adding a new attribute to
org.drools.persistence.processinstance.ProcessInstanceInfo POJO identifying
the stateful session to which the process instance corresponds (and the
corresponding DB column).
- modifying the ProcessInstancesWaitingForEvent query in order to take into
account the session id as a (new) second parameter.
- modify the class org.drools.persistence.processinstance.JPASignalManager
in order to execute the query with both parameters.
- as a quick way to have the session id, we have a threadlocal.

After these modifications have been performed, the execution of processes
with intensive use of wait states has executed correctly, and no confussion
has been detected between process instances after the execution of some
stress tests that previously originated a lot of instances of the problem.

We will open an incident in Drools-JIRA regarding this issue.

best regards,
Jordi Alvarez


2011/6/22 Jordi Alvarez jalvar...@gmail.com

 Hi, after a bit more of study we have seen that the problem is in the JPA
 Query defined in META-INF/orm.xml of drools-persistence-jpa-5.1.1.jar
 (ProcessInstancesWaitingForEvent).

 This query, for version 5.1.1 of drools seems not to be prepared for
 storing multiple stateful sessions in the same database schema.

 In fact, the original query we got from the .jar was not properly working,
 and, while in project startup, we created our own orm.xml file with an
 updated query, such as described in:

 http://www.mail-archive.com/rules-users@lists.jboss.org/msg16068.html
 But the good query (and also the original in the jar file) seems to be
 not prepared for working with more than one stateful session stored in the
 same database schema and having exactly the same constraint activated.
 Should we open a JIRA for this?

 We have looked at source code in version 5.2 / jBPM 5, and the query is
 similar, with no reference to the stateful session. It should really be
 prepared for multiple sessions stored in the same database schema?

 thanks again,
 Jordi Alvarez


 2011/6/22 Jordi Alvarez jalvar...@gmail.com

 Hello,

 I am involved in a project in which we are using Drools as the BPM.

 We are experiencing some problems with wait state nodes. More concretely,
 the problem seems to deal with
 the execution of constraints in those wait states.

 Let me first describe our context:

 We are using JPA with Hibernate and Oracle. Our process instances are all
 identified by a
 business identifier (a string). This business identified would correspond
 to the identifier of a case;
 and a case normally has associated a process instances (and subprocesses
 of that process).

 Additionally, the processes we have developed make extensive
 use of timers and wait states with constraints that refer to the process
 instance and other facts that
 we are using as events.

 We have a stateful session for every case / business identifier.

 We have a main process that calls subprocesses. As we said, in that
 process and subprocesses we use wait states.
 The constraints in those wait states are waiting for a fact to be
 inserted in the stateful session. Once
 the corresponding fact is inserted, the corresponding constraint should be
 activated.

 At this point is where the problem arises. All the constraints have been
 unit tested with no problem at all.

 But we have detected some problems that can arise when there is more that
 one process waiting in the same wait state
 (every process in a different Drools stateful session).

 The situation is as follows:

 1. There is a main process instance MPA with business id BA that has a
 subprocess SPA (also with the same business id).
 This subprocess is waiting in a given wait state W1 (these processes are
 running in the stateful
 session corresponding to the business id BA, from now on SA).

 2. There is a second main process and subprocess with business id BB. The
 state for these second set of processes is the
 same one, and they are running in a second stateful session (the one for
 business id BB), from now on SB.

 3. A fact FA is inserted in SA. This fact makes the constaint in SPA true,
 which makes SPA to leave the wait
 state and continue with the execution.

 Then, in some situations stateful session SA tries to also continue SPB,
 which runs in a different stateful session
 (that of SB). That, of course, produces some posterior problems that were
 the origin of our investigations.
 After some more deep investigations, it seems that the reason session SA
 tries to continue SPB is that the constraint
 in W1 for SPA gets activated twice. We have detected (and posteriorly
 corrected) some situations in which this happens.

 For example: the process in the constraint was associated not only to SPA
 but to other processes in SA (the main process SPA for example).
 we corrected this and obtained a better behaviour in which 

Re: [rules-users] Troubles with Oryx designer in Guvnor - jBPM 5.1.CR1

2011-06-23 Thread Tihomir Surdilovic
On 6/23/11 1:05 PM, roger wrote:
 Surely there is a config file that says what is Guvnor's url for Oryx.
$designer_war/profiles/jbpm.xml
bottom on this file contains what you are looking for:

externalloadurl protocol=http host=localhost:8080 
subdomain=drools-guvnor/org.drools.guvnor.Guvnor/oryxeditor 
usr=admin pwd=admin/

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


[rules-users] usage of @startTimestamp

2011-06-23 Thread Lavoisier Farias
Hi everybody,

I am delepoing an application using Drools to correlate events from a
network management system. Can anyone recommend me a good tutorial which
teaches how to use real time clock ? I am using the book of  Michal Bali,
which is very good indeed. The book examples uses the following code:
clock.advanceTime(*xx seconds*, TimeUnit.SECONDS);

However, I would like to use the property of an event called *startTime *and
*endTime *which means the time on which the event starts and the time the
event finishes. I know there is the property @startTimestamp mentioned at
the book. But, where can I find more examples of usage of @startTimestamp in
rule files ?

Best Regards,
*
Lavoisier José Leite Farias*
Skype: lavoisierfarias
Twitter: http://twitter.com/LavoisierFarias
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools 5.2.0.Final released

2011-06-23 Thread Geoffrey De Smet
The Drools community is happy to announce the release of *Drools 
5.2.0.Final*.

This includes:

   * Drools Expert (rule engine)
   * Drools Fusion (CEP: complex event processing)
   * Drools Planner (planning optimization)
   * Guvnor (BRMS web application)
   * Drools IDE (Eclipse plugin)

Read the release announcement:
  http://blog.athico.com/2011/06/drools-52-released.html

--
With kind regards,
The Drools team

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


[rules-users] Avoid evaluation of expensive LHS terms

2011-06-23 Thread Joe Ammann
Stumbled over this today in a specific case, but my question is about a
general practice (I'm quite new to Drools, 5.2.0.M2 btw). I have a
knowledge session with a fair amount of facts (0.5 Mio) and mostly
simple rules. One rule has a LHS expression that I know will be
expensive to execute, in the example that I encountered this it looks like:

rule Count facts
when
all : Number() from accumulate (s : X(), count(s))
blacklisted : Number() from accumulate (s : X(status ==
X.BLACKLISTED), count(s))

then

end

I want to execute this rule only after other rules have already executed
(and changed the status of most of the X facts). There's quite a number
of X facts (~200'000). Most of them have their status modified during
execution of other rules. If I run the rule base without the above
rules, performance is perfect, some tens of seconds. If I activate the
rule, execution never finishes (I stop it after a few minutes, never saw
it finished).

I *THINK* (correct me if I'm wrong) what happens is that especially the
second expression of the LHS gets executes over and over again whenever
one of the facts is modified by one of the other rules. Makes sense, but
I nevertheless want to try to avoid it.

Until now I tried unsuccessfully:
- protect the rule with a guard fact as the first expression, which is
inserted only late in the processing
- move the rule to another ruleflow-group (or agenda-group) and activate
it only at the end of the processing
- use the rule in a second independent knowledge base and session, and
insert the facts once the first has finished

I'm perfectly aware that I could solve this specific problem of counting
facts with different techniques, but my question is more general (as the
subject says). Because I have other cases where (as a last resort) I
need to go to a database or online service to get the required
information. It seems that others have similar problems
(http://drools.46999.n3.nabble.com/Short-circuiting-evaluations-on-LHS-td56379.html).
But in my experience, that technique (protecting the expensive pattern
in the LHS with a cheap one that evaluates to false until you really
need the expensive one) does not work. I get the impression that
(contrary to popular experience that a false value in an AND sequence
terminates the whole sequence) the drools LHS are processed differently.

Am I missing something really stupid?!

-- 
CU, Joe

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


Re: [rules-users] Avoid evaluation of expensive LHS terms

2011-06-23 Thread Michael Anstis
Have you tried salience?

On 23 June 2011 20:20, Joe Ammann j...@pyx.ch wrote:

 Stumbled over this today in a specific case, but my question is about a
 general practice (I'm quite new to Drools, 5.2.0.M2 btw). I have a
 knowledge session with a fair amount of facts (0.5 Mio) and mostly
 simple rules. One rule has a LHS expression that I know will be
 expensive to execute, in the example that I encountered this it looks like:

 rule Count facts
when
all : Number() from accumulate (s : X(), count(s))
blacklisted : Number() from accumulate (s : X(status ==
 X.BLACKLISTED), count(s))

then

 end

 I want to execute this rule only after other rules have already executed
 (and changed the status of most of the X facts). There's quite a number
 of X facts (~200'000). Most of them have their status modified during
 execution of other rules. If I run the rule base without the above
 rules, performance is perfect, some tens of seconds. If I activate the
 rule, execution never finishes (I stop it after a few minutes, never saw
 it finished).

 I *THINK* (correct me if I'm wrong) what happens is that especially the
 second expression of the LHS gets executes over and over again whenever
 one of the facts is modified by one of the other rules. Makes sense, but
 I nevertheless want to try to avoid it.

 Until now I tried unsuccessfully:
 - protect the rule with a guard fact as the first expression, which is
 inserted only late in the processing
 - move the rule to another ruleflow-group (or agenda-group) and activate
 it only at the end of the processing
 - use the rule in a second independent knowledge base and session, and
 insert the facts once the first has finished

 I'm perfectly aware that I could solve this specific problem of counting
 facts with different techniques, but my question is more general (as the
 subject says). Because I have other cases where (as a last resort) I
 need to go to a database or online service to get the required
 information. It seems that others have similar problems
 (
 http://drools.46999.n3.nabble.com/Short-circuiting-evaluations-on-LHS-td56379.html
 ).
 But in my experience, that technique (protecting the expensive pattern
 in the LHS with a cheap one that evaluates to false until you really
 need the expensive one) does not work. I get the impression that
 (contrary to popular experience that a false value in an AND sequence
 terminates the whole sequence) the drools LHS are processed differently.

 Am I missing something really stupid?!

 --
 CU, Joe

 ___
 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] usage of @startTimestamp

2011-06-23 Thread Nathan Bell
The Drools Fusion documentation has a good explanation of how to define an 
event, including the use of the @timestamp attribute.

 

http://docs.jboss.org/drools/release/5.2.0.Final/drools-fusion-docs/html/ch02.html#d0e184

 

 

From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Lavoisier Farias
Sent: Thursday, June 23, 2011 11:45 AM
To: rules-users@lists.jboss.org
Subject: [rules-users] usage of @startTimestamp

 

Hi everybody,

I am delepoing an application using Drools to correlate events from a network 
management system. Can anyone recommend me a good tutorial which teaches how to 
use real time clock ? I am using the book of  Michal Bali, which is very good 
indeed. The book examples uses the following code:
clock.advanceTime(xx seconds, TimeUnit.SECONDS);

However, I would like to use the property of an event called startTime and 
endTime which means the time on which the event starts and the time the event 
finishes. I know there is the property @startTimestamp mentioned at the book. 
But, where can I find more examples of usage of @startTimestamp in rule files ?

Best Regards,

Lavoisier José Leite Farias
Skype: lavoisierfarias
Twitter: http://twitter.com/LavoisierFarias

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


Re: [rules-users] usage of @startTimestamp

2011-06-23 Thread Lavoisier Farias
Hi Nathan, thank you very much!!


2011/6/23 Nathan Bell nathan.b...@pharmacyonesource.com

 The Drools Fusion documentation has a good explanation of how to define an
 event, including the use of the @timestamp attribute.

 ** **


 http://docs.jboss.org/drools/release/5.2.0.Final/drools-fusion-docs/html/ch02.html#d0e184
 

 ** **

 ** **

 *From:* rules-users-boun...@lists.jboss.org [mailto:
 rules-users-boun...@lists.jboss.org] *On Behalf Of *Lavoisier Farias
 *Sent:* Thursday, June 23, 2011 11:45 AM
 *To:* rules-users@lists.jboss.org
 *Subject:* [rules-users] usage of @startTimestamp

 ** **

 Hi everybody,

 I am delepoing an application using Drools to correlate events from a
 network management system. Can anyone recommend me a good tutorial which
 teaches how to use real time clock ? I am using the book of  Michal Bali,
 which is very good indeed. The book examples uses the following code:
 clock.advanceTime(*xx seconds*, TimeUnit.SECONDS);

 However, I would like to use the property of an event called *startTime *and
 *endTime *which means the time on which the event starts and the time the
 event finishes. I know there is the property @startTimestamp mentioned at
 the book. But, where can I find more examples of usage of @startTimestamp in
 rule files ?

 Best Regards,
 *
 Lavoisier José Leite Farias*
 Skype: lavoisierfarias
 Twitter: http://twitter.com/LavoisierFarias

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




-- 
*Abraços,
Lavoisier José Leite Farias*
Skype: lavoisierfarias
Celular: 019-8122-1177
Twitter: http://twitter.com/LavoisierFarias
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Building

2011-06-23 Thread హరీష్ చౌదరి కూకట్ల
Hello EveryOne,
   I am new to drools and I have couple of questions.

1. How to build group of .drl files as a package and load it into the
session.

2. Is there a way to see what rules are loaded into the session
programatically

Thank you very much,
Harish Kukatla.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Avoid evaluation of expensive LHS terms

2011-06-23 Thread Joe Ammann
On 23.06.2011 21:27, Michael Anstis wrote:
 Have you tried salience?

Yeah, sorry forgot to mention. THis was the first thing I tried.

-- 
CU, Joe

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


Re: [rules-users] Guvnor Rules!!!

2011-06-23 Thread Sumeet Karawal
I downloaded from the link, but I am not able to find the mortgages example
there.

Thanks  Regards,
Sumeet Karawal



   
  From:   Michael Anstis michael.ans...@gmail.com 
   

   
  To: Rules Users List rules-users@lists.jboss.org
   

   
  Date:   06/23/2011 03:19 PM   
   

   
  Subject:Re: [rules-users] Guvnor Rules!!! 
   

   
  Sent by:rules-users-boun...@lists.jboss.org   
   

   





Have you looked at the mortgages example under the examples folder in
the guvnor-distribution;
http://download.jboss.org/drools/release/5.2.0.CR1/drools-distribution-5.2.0.CR1.zip
?

There is a similar example for 5.1, but TBH I'm not sure of the location in
either the download or internet.

2011/6/22 Sumeet Karawal sumeet.kara...@tcs.com

  Hi,

  I am not able to run Guvnor rules on eclipse. I have read the Knowledge
  Agent part from the user guide but not able to get through.

  I am doing the following steps:

    I have created a Java class in eclipse and exported it as a .jar file.
    Then I import it in Guvnor under the upload POJO Model.
    I create some rules for it
    Then I build the package and get the following URLs :

  URL for package documentation:


  
http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/com.JBoss/LATEST/documentation.pdf
   (Embedded
  image moved
  to file:
  pic32197.gif)



  URL for package source:


  
http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/com.JBoss/LATEST.drl
   (Embedded
  image moved
  to file:
  pic02151.gif)



  URL for package binary:


  
http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/com.JBoss/LATEST
   (Embedded
  image moved
  to file:
  pic18827.gif)



  URL for running tests:


  
http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/com.JBoss/LATEST/SCENARIOS
   (Embedded
  image moved
  to file:
  pic20956.gif)



  Change Set:


  
http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/com.JBoss/LATEST/ChangeSet.xml
   (Embedded
  image moved
  to file:
  pic21205.gif)




  I have gone through use  of KnowledgeAgent in the user guide but not
  getting how to do it. I mean what code should I write to get the
  KnowledgeBase from these URLs.

  It would be really helpful if someone could guide me on this.


  Thanks  Regards,
  Sumeet Karawal
  Mailto: sumeet.kara...@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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users