Re: [rules-users] Is this a bug? when using Human Task.

2010-08-03 Thread XiaoMiTang

i am using drools 5.1.0.CR1
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Is-this-a-bug-when-using-Human-Task-tp1021453p1021534.html
Sent from the Drools - User 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] Is this a bug? when using Human Task.

2010-08-03 Thread Mauricio Salatino
Hi, probably is something that is not allowed in MS SQL Sever2008.
Are you using drools 5.1? the trunk?
Greetings.

On Wed, Aug 4, 2010 at 2:25 AM, XiaoMiTang wrote:

>
> When use the Human Task,some tables were created in DB automatic,but one
> SQL
> statement  occured error is this:
>
> create table Notification_EmailNotificationHeader
> (
>   Notification_id numeric(19,0) not null,
>   emailHeaders_id numeric(19,0) not null,
>   mapkey varchar(255) null,
>   primary key (Notification_id, mapkey),
>  unique (emailHeaders_id)
> )
>
> the mapkey is nullable,can not be defined as primary key~
> Is this a bug? or something wrong with my development enviroment?
> Eclipse + tomcat + MS SQL Server2008
> Mina 2.0(hibernate-core-3.3.0.SP1.jar)
>
> persistence.xml is this:
> 
> 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";>
>
>  
>org.hibernate.ejb.HibernatePersistence
>org.drools.task.Attachment
>org.drools.task.Content
>org.drools.task.BooleanExpression
>org.drools.task.Comment
>org.drools.task.Deadline
>org.drools.task.Comment
>org.drools.task.Deadline
>org.drools.task.Delegation
>org.drools.task.Escalation
>org.drools.task.Group
>org.drools.task.I18NText
>org.drools.task.Notification
>org.drools.task.EmailNotification
>org.drools.task.EmailNotificationHeader
>org.drools.task.PeopleAssignments
>org.drools.task.Reassignment
>org.drools.task.Status
>org.drools.task.Task
>org.drools.task.TaskData
>org.drools.task.SubTasksStrategy
>org.drools.task.OnParentAbortAllSubTasksEndStrategy
>org.drools.task.OnAllSubTasksEndParentEndStrategy
>org.drools.task.User
>
>
>   value="org.hibernate.dialect.SQLServerDialect"/>
>   value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
>   value="jdbc:sqlserver://192.168.101.91:1433;DatabaseName=BinTest" />
>  
>  
>  
>  
>  
>  
>
>  
> 
>
> Can anyone help?
> XiaoMiTang
>
>
> --
> View this message in context:
> http://drools-java-rules-engine.46999.n3.nabble.com/Is-this-a-bug-when-using-Human-Task-tp1021453p1021453.html
> Sent from the Drools - User mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



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

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


[rules-users] Is this a bug? when using Human Task.

2010-08-03 Thread XiaoMiTang

When use the Human Task,some tables were created in DB automatic,but one SQL
statement  occured error is this:

create table Notification_EmailNotificationHeader 
(
   Notification_id numeric(19,0) not null, 
   emailHeaders_id numeric(19,0) not null, 
   mapkey varchar(255) null, 
   primary key (Notification_id, mapkey), 
  unique (emailHeaders_id)
)

the mapkey is nullable,can not be defined as primary key~
Is this a bug? or something wrong with my development enviroment?
Eclipse + tomcat + MS SQL Server2008
Mina 2.0(hibernate-core-3.3.0.SP1.jar)

persistence.xml is this:

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";>

  
org.hibernate.ejb.HibernatePersistence
org.drools.task.Attachment
org.drools.task.Content
org.drools.task.BooleanExpression
org.drools.task.Comment
org.drools.task.Deadline
org.drools.task.Comment
org.drools.task.Deadline
org.drools.task.Delegation
org.drools.task.Escalation
org.drools.task.Group
org.drools.task.I18NText
org.drools.task.Notification
org.drools.task.EmailNotification
org.drools.task.EmailNotificationHeader
org.drools.task.PeopleAssignments
org.drools.task.Reassignment
org.drools.task.Status
org.drools.task.Task
org.drools.task.TaskData
org.drools.task.SubTasksStrategy
org.drools.task.OnParentAbortAllSubTasksEndStrategy
org.drools.task.OnAllSubTasksEndParentEndStrategy
org.drools.task.User


  
  
  
  
  
  
  
  
  

  


Can anyone help?
XiaoMiTang


-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Is-this-a-bug-when-using-Human-Task-tp1021453p1021453.html
Sent from the Drools - User mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] How to use Drools Flow?

2010-08-03 Thread XiaoMiTang

Hi, Sony John:
My English is not good,so i can not explain well.
According to the previous mails,you can understand my confusion point.
If a work flow requires more than one person to finish it,like this:
(1)user A ask for a day's leave;
(2)user B approval it;
(3) An E-mail send to user A;
you can creat a *.rf file like this:

Start--->Action1--->Human Task--->Email--->End

In Action1,you can new an application form and add it to the DB using Java
code(this is your business logic,not Drools Flow's)

user A log in the system,run the code:
session.startProcess("……");
the work flow starts,an application form will be created and added to
DB,then,the flow reach the Human Task node, a task will be created and added
to DB.
user A log out.

user B log in.
user B claim and complete the task using Drools Flow's API:
client.claim(task.getId())
//here,do something to approve the application form(your business logic),eg.
change the application form's
// state from 'wait' to 'approved' in DB or something else.
client.complete(task.getId());
then,the work flow will go on,the email will be send automatically……

I just learned Drools a few days,can not guarantee that my understanding is
correct.
You can get some help here:
http://www.packtpub.com/article/drools-jboss-rules-5.0-flow-part2
http://www.packtpub.com/article/drools-jboss-rules-5.0-flow-part2 

You can also get some useful code here:
https://www.packtpub.com/support?nid=4009
https://www.packtpub.com/support?nid=4009 
Please notice the src under
\5647_Code\5647_Code\parent-1.0-examples\parent-1.0-examples\droolsBookParent\droolsFlow
Good luck~
XiaoMiTang
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/How-to-use-Drools-Flow-tp1014591p1021183.html
Sent from the Drools - User mailing list archive at Nabble.com.

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


Re: [rules-users] How to use Drools Flow?

2010-08-03 Thread sony . john
Hi Xiao ,
Could you explain to me also how done the workflow , becuase iam also
looking same solutions.
If you have sample code please update tha too.
Regards
Sony John


   
 XiaoMiTang
  To 
 Sent by:  rules-users@lists.jboss.org 
 rules-users-bounc  cc 
 e...@lists.jboss.or 
 g Subject 
   Re: [rules-users] How to use Drools 
   Flow?   
 08/04/2010 09:38  
 AM
   
   
 Please respond to 
 Rules Users List  
 
   
   





I have omitted DefaultProcessEventListener,so the workflow can not be
finished automatically when user B finished the task.
now all is ok,thank you~
--
View this message in context:
http://drools-java-rules-engine.46999.n3.nabble.com/How-to-use-Drools-Flow-tp1014591p1021025.html

Sent from the Drools - User mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
__


Information in this e-mail is intended solely for the person(s) to whom it is 
addressed and may contain confidential information. If you are not the intended 
recipient, please notify the sender and delete this e-mail message and any 
other record of it from your system immediately. You should not disclose or 
disseminate the information to any person, use it for any purpose or store or 
copy the information in any form or manner.  
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] How to use Drools Flow?

2010-08-03 Thread XiaoMiTang

I have omitted DefaultProcessEventListener,so the workflow can not be
finished automatically when user B finished the task.
now all is ok,thank you~
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/How-to-use-Drools-Flow-tp1014591p1021025.html
Sent from the Drools - User 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] Size of working memory

2010-08-03 Thread soc.frangis

I am in a very similar situation. We all know that the number of facts + the
way the rule was written / optimized can greatly affect memmory consumption.
But there has to be some number we could throw out where it most situations
that number for heap allocation is feasible. By the way, the reason i am
bringin this up is i am being presented with 'what is the minimum ammount of
ram you can run off of, because it is being cut'

Personally, i am in a situation with a batch of 16k-20k POJO's (1 fact model
type), 200-300 rules, and the rules are just pattern matching the fields of
the java object then setting a boolean within the pojo if a given rule is
fired.

I reviewed the benchmarks at
http://blogs.illation.com.au/category/benchmarks/ and despite the increase
in memory consumption at different numbers of fact models, they all seem to
taper off at some point around
600 MB RAM.  Those benchmarks are written to stress test the Rete algorithm,
but it appears a worst case would leave you with running at 600 MB. 

Is that a fair assumption, or do some of you look at the numbers and feel
there is some kind of f(x) to determine an appx allocation of memory which
should be reserved, based on # inputs and # of 'well written' rules that
just modify in memory facts.
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Size-of-working-memory-tp1020169p1020834.html
Sent from the Drools - User 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] Reusing Rules in a Rule Flow?

2010-08-03 Thread Michael Rhoden
Have you looked at "extends" keyword? You could use a base rule and  
extend it for ruleflows. Not positive it would work for your needs,  
but possibly.

-Michael

On Aug 3, 2010, at 1:59 PM, Jason Davidson   
wrote:

> Is it possible to use a rule in a rule flow without a "ruleflow- 
> group"?
>
> Here's our use case:  We have a base set of rules that are not part of
> a ruleflow-group.  But we want to allow the administrators of the
> system to build custom rule flows that reuse these existing base
> rules.  In most instances the "base" rules will be fired but in some
> instances the ruleflow will be executed too.
>
> What's the best way to reuse a rule in this case?
>
> Thanks!
> Jason
>
> ___
> 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] How to fire all rules at once and get the status of all the rules present in Guvnor

2010-08-03 Thread bbarani

Hi,

I am using Guvnor to store all the rules and I am having a webservice which
invokes the rules. As of now I use wrkMemory.fireAllRules(); to fire all the
rules.

Now I want to know if there is a way to get back the identifier back for
each rule such that I can validate the response returned from each rule in
my client side.

I need to aggregate all the results returned by different rules in a package
along with some identifier.

Not sure if its possible using rule flow in Guvnor.

Thanks,
Barani
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/How-to-fire-all-rules-at-once-and-get-the-status-of-all-the-rules-present-in-Guvnor-tp1020525p1020525.html
Sent from the Drools - User 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] Decision table creation query

2010-08-03 Thread Michael Anstis
Hi,

Have you read "1.4.2.4.4. Guided decision tables (web based)" at
http://downloads.jboss.com/drools/docs/5.1.0.34406.FINAL/drools-guvnor/html_single/index.html.
This provides a useful overview.

With kind regards,

Mike

2010/8/3 Kripa Nathwani 

>  Hello Admin,
>
>
>
> I am new to Drools.
>
> Kindly let me know the steps to create a decision table in Drools Guvnor.
>
>
>
> Best Regards,
>
> Kripa
>
> Mail: kripa.nathw...@lntinfotech.com 
>
>
>
>
> --
> This Email may contain confidential or privileged information for the
> intended recipient (s) If you are not the intended recipient, please do not
> use or disseminate the information, notify the sender and delete it from
> your system.
>
> __
>
> ___
> 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: monitor rules & report activity

2010-08-03 Thread Quinn, Dan
Drools(5.1+) has already added functionality to monitor rule activity in
your application using JMX. You can turn mbean rule monitoring on either
in the rulebase's configuration file(drools.mbeans=enabled||disabled) or
you can configure it through the command
line(-Ddrools.mbeans=enabled||disabled I believe). 

 

From: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Dieter
D'haeyere
Sent: Tuesday, August 03, 2010 9:49 AM
To: Rules Users List
Subject: Re: [rules-users] Drools Expert: monitor rules & report
activity

 

What I mean with 'all possible cases' is eg. that you will pass your
facts to the rule engine and that the rule engine will 'return' some
result.
I guess it is perfectly possible that in your test scenario's you
covered a lot of possible values for those facts but not all of them and
that you could get some unexpected results afterwards.
This would mean that your test scenario's / test data were not good
enough.  But I could imagine that stuff like this happens... At that
moment you should be able to see what rules were fired in a production
environment.

Ik will have a look at the drools execution server.

Dieter.





2010/8/3 Swindells, Thomas 

Guvnor is a user interface used to define sets of rules, it's not
designed to be an actual execution server - the demo test scenarios only
work on static predefined data, in a real execution environment the
input data has to be acquired/loaded from somewhere dynamically, hence
you always need some form of development - though look at the drools
execution server to minimize this.

 

What do you actually mean by covering all possible cases anyway?
Possible cases of what? What are you trying to detect?

 

Thomas

 

From: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Dieter
D'haeyere
Sent: 03 August 2010 14:35
To: Rules Users List
Subject: Re: [rules-users] Drools Expert: monitor rules & report
activity

 

Ok, this looks like a way to handle it.
But does this mean that there is no 'out of the box' monitoring
possibility ?

When deploying a rule base (with Guvnor), I would kind of expect that
Guvnor is accessible and that it can return some metrics (eg. after
switching on a monitoring option because I presume continuous logging
would slow down the system too much).

As I understand it now, some custom development is needed will be needed
to achieve 'real-time' monitoring.









2010/8/3 David Sinclair 

Have a look at the AgendaEventListener. You can use these callbacks to
see which rules fire and information about them

 void

activationCancelled
 (ActivationCancelledEvent
  event) 
   

 void

activationCreated
 (ActivationCreatedEvent
  event) 
   

 void

afterActivationFired
 (AfterActivationFiredEvent
  event) 
   

 void

agendaGroupPopped
 (AgendaGroupPoppedEvent
  event) 
   

 void

agendaGroupPushed
 (AgendaGroupPushedEvent
  event) 
   

 void

beforeActiv

Re: [rules-users] Not able to create object in [then] clause in DSL using Guvnor

2010-08-03 Thread bbarani

Esteban,

Thanks a lot for your timely help.. The below code did the trick..

[then] permitted = Decisions dec = new Decisions();
dec.setDecision("Granted")


Thanks,
Barani
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Not-able-to-create-object-in-then-clause-in-DSL-using-Guvnor-tp1020366p1020413.html
Sent from the Drools - User 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] Not able to create object in [then] clause in DSL using Guvnor

2010-08-03 Thread Esteban Aliverti
You have to write java (or mvel) in the THEN part. Have you tried this?

[when] IMRR action requested is in one of {acts} = Action(action in {acts})
[then] permitted =Decisions dec = new Decision(); dec.setDecision("Granted")

Best,



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


On Tue, Aug 3, 2010 at 5:18 PM, bbarani  wrote:

>
> Hi,
>
> I am trying to execute a simple DSL as below. Decisions is the bean class
> which I have imported in to Guvnor
>
> [when] IMRR action requested is in one of {acts} = Action(action in {acts})
> [then] permitted =dec:Decisions dec.setDecision("Granted")
>
> Now I want the object for decision to be created and the value set in a
> single mapping. I tried the above code and got the error as below.
>
>  [NamedParameterRule] Unable to build expression for 'consequence':
> java.lang.Class cannot be cast to org.mvel2.util.MethodStub '
> System.out.println("Rule Fired From Guvnor");
>dec: Decisions () dec.setDecision("Granted")'
>
> If I create the object in [when] clause it works fine. Any idea when this
> error would pop up?? and how to resolve this?
>
> Thanks,
> Barani
> --
> View this message in context:
> http://drools-java-rules-engine.46999.n3.nabble.com/Not-able-to-create-object-in-then-clause-in-DSL-using-Guvnor-tp1020366p1020366.html
> Sent from the Drools - User 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] Not able to create object in [then] clause in DSL using Guvnor

2010-08-03 Thread bbarani

Hi,

I am trying to execute a simple DSL as below. Decisions is the bean class
which I have imported in to Guvnor

[when] IMRR action requested is in one of {acts} = Action(action in {acts})
[then] permitted =dec:Decisions dec.setDecision("Granted")

Now I want the object for decision to be created and the value set in a
single mapping. I tried the above code and got the error as below.

 [NamedParameterRule] Unable to build expression for 'consequence':
java.lang.Class cannot be cast to org.mvel2.util.MethodStub '   
System.out.println("Rule Fired From Guvnor");
dec: Decisions () dec.setDecision("Granted")' 

If I create the object in [when] clause it works fine. Any idea when this
error would pop up?? and how to resolve this?

Thanks,
Barani
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Not-able-to-create-object-in-then-clause-in-DSL-using-Guvnor-tp1020366p1020366.html
Sent from the Drools - User 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] Size of working memory

2010-08-03 Thread Wolfgang Laun
No formula is possible as this depends on the number and structure of your
rules and patterns.

Not too long ago there was a thread where a guy reported savings amounting
to orders of magnitude after following good advice, by avoiding Cartesian
products.

-W


2010/8/3 Nick Heudecker 

> I'm working on some capacity planning and I need an accurate way to
> determine the size of the working memory.  Any suggestions on getting
> visibility into the size of the WM?
>
> Thanks.
>
> ___
> 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] fireAllRules() - multiply times.

2010-08-03 Thread Wolfgang Laun
You'll have to use a single, dedicated fact and call modify/update before
each fireAllrules.

For your other problem: updating all facts is probably the best solution.
(You may, of course,
also add a pattern with a single "trigger" fact, again to be updated before
each call to
fireAllRules.)

As you have experienced, "fired" activations remain passive across multiple
calls to
fireAllRules.

-W


On 3 August 2010 18:00, Maverickthe6  wrote:

>
> Hmm,
> even that doesn't work. Do you test it by yourself?
>
> I just created a new project, with the standard hello world example. And
> add
> the rule to the Sample.drl file. After that, I add another
> ksession.fireAllRules() to the main and execute it. The only messages I've
> got are:
>
> TEST
> Hello World
> Goodbye cruel world
>
> and not (how expected)
>
> TEST
> Hello World
> Goodbye cruel world
> TEST
>
>
> --
> View this message in context:
> http://drools-java-rules-engine.46999.n3.nabble.com/fireAllRules-multiply-times-tp1019111p1019616.html
> Sent from the Drools - User 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 BPMN 2.0 service task error for process edited using Oryx

2010-08-03 Thread Patricia Bogoevici
Hi all,

I am using Drools 5.1 release, and I am testing the BPMN process definition 
created with Oryx designer. The main problem I ran into is the serviceTask 
element. I cannot open the  process file created with Oryx designer, in 
Eclipse, as it complains about this error:

"java.lang.IllegalArgumentException: No interfaces found at 
org.drools.bpmn2.legacy.beta1.ServiceTaskHandler.handleNode(ServiceTaskHandler.java:35)"
 

Below is a snippet from the BPMN 2.0 xml file got using Oryx for serviceTask. I 
also attached the whole xml file, in case that help. 

I appreciate a lot if someone can help me with this issue, as I am practically 
stuck at this point. 

On the other hand, I noticed that Drools Eclipse workflow editor allows only 
for 2 types of service tasks: Email and Log. Is that a limitation of the 
Eclipse workflow editor, or the serviceTask is not implemented in Drools BPMN 
2.0? 
Can I use serviceTask BPMN 2.0 element in Drools workflow? 


** serviceTask from Oryx process **



Thanks in advance,
Patricia



  

test_oryx.bpmn
Description: Binary data
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Invocation Patterns

2010-08-03 Thread vasilievip

It was just suggestion. Described use case sounds like some integration
process, my assumption that BPEL fits better in this situation than set of
custom workitem handlers for each of participants, also it works with XSD
very well - no need for custom model. 
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Invocation-Patterns-tp1019224p1020287.html
Sent from the Drools - User 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] Invocation Patterns

2010-08-03 Thread Mauricio Salatino
why do you want to use bpel if you have the power of the BPMN2 spec inside
Drools Flow?
Greetings.

On Tue, Aug 3, 2010 at 3:05 PM, vasilievip  wrote:

>
> Have you looked at BPEL?
>
> http://wiki.open-esb.java.net/Wiki.jsp?page=FileBCTutorialUsingBindingWizard
> --
> View this message in context:
> http://drools-java-rules-engine.46999.n3.nabble.com/Invocation-Patterns-tp1019224p1020107.html
> Sent from the Drools - User mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



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

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


[rules-users] Reusing Rules in a Rule Flow?

2010-08-03 Thread Jason Davidson
Is it possible to use a rule in a rule flow without a "ruleflow-group"?

Here's our use case:  We have a base set of rules that are not part of
a ruleflow-group.  But we want to allow the administrators of the
system to build custom rule flows that reuse these existing base
rules.  In most instances the "base" rules will be fired but in some
instances the ruleflow will be executed too.

What's the best way to reuse a rule in this case?

Thanks!
Jason

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


[rules-users] Size of working memory

2010-08-03 Thread Nick Heudecker
I'm working on some capacity planning and I need an accurate way to
determine the size of the working memory.  Any suggestions on getting
visibility into the size of the WM?

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


Re: [rules-users] fireAllRules() - multiply times.

2010-08-03 Thread sreekar

@maverickthe6 - can you please try to explain your use case once again... I
read your initial post but I didn't get it... 
why do you want to call fireAllRules() more than once for the same session?
if you are inserting some new facts everytime (and since you are using a
stateful session) - why don't you dispose the original session, create a new
session and insert facts on that one & call fireAllRules()?
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/fireAllRules-multiply-times-tp1019111p1020159.html
Sent from the Drools - User 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] Invocation Patterns

2010-08-03 Thread vasilievip

Have you looked at BPEL?
http://wiki.open-esb.java.net/Wiki.jsp?page=FileBCTutorialUsingBindingWizard
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Invocation-Patterns-tp1019224p1020107.html
Sent from the Drools - User 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] fireAllRules() - multiply times.

2010-08-03 Thread Maverickthe6

Hmm, 
even that doesn't work. Do you test it by yourself?

I just created a new project, with the standard hello world example. And add
the rule to the Sample.drl file. After that, I add another
ksession.fireAllRules() to the main and execute it. The only messages I've
got are:

TEST
Hello World
Goodbye cruel world

and not (how expected)

TEST
Hello World
Goodbye cruel world
TEST


-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/fireAllRules-multiply-times-tp1019111p1019616.html
Sent from the Drools - User 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] Invocation Patterns

2010-08-03 Thread Mauricio Salatino
that's correct!

2010/8/3 Dieter D'haeyere 

> Correct me if I'm wrong, but I understood that there would be a merge
> between jBPM and Drools Flow and that that merge would be jBPM v5.
> Dieter.
>
>
>
>
> On Tue, Aug 3, 2010 at 5:29 PM, Kenneth May  wrote:
>
>> You are correct, Drools Flow may not be the best choice of technology.
>>  I could certainly write what is required in core Java very easily!
>>
>> However, there are a few reasons why this was my intended approach:
>>  1) A large degree of flexibility may be required in the future.  I
>> like the concept of being able to change or apply new logic fairly
>> easily.
>>  2) Out of the box business activity monitorring is appealing
>>  3) I'm keen to explore BPM and rules technology in more depth
>>  4) The discussion in this (admittedly old) article suggested jBPM may
>> be a good fit: http://community.jboss.org/wiki/JBossRulesjBPMSQLorJava.
>>  My understanding is that Drools Flow is an alternative to jBPM and
>> from what I can tell has a far better integration with rules.
>>
>> That said: I'm not adverse to alternative approaches if what I'm
>> planning doesn't sound like a good fit.  What I need to do is
>> essentially pretty simple: take a file and process it through several
>> steps (with some logic deciding which steps are relevant).
>>
>> Thanks for your help!
>>
>> Ken
>> ___
>> 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
>
>


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

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


Re: [rules-users] Invocation Patterns

2010-08-03 Thread Dieter D'haeyere
Correct me if I'm wrong, but I understood that there would be a merge
between jBPM and Drools Flow and that that merge would be jBPM v5.
Dieter.



On Tue, Aug 3, 2010 at 5:29 PM, Kenneth May  wrote:

> You are correct, Drools Flow may not be the best choice of technology.
>  I could certainly write what is required in core Java very easily!
>
> However, there are a few reasons why this was my intended approach:
>  1) A large degree of flexibility may be required in the future.  I
> like the concept of being able to change or apply new logic fairly
> easily.
>  2) Out of the box business activity monitorring is appealing
>  3) I'm keen to explore BPM and rules technology in more depth
>  4) The discussion in this (admittedly old) article suggested jBPM may
> be a good fit: http://community.jboss.org/wiki/JBossRulesjBPMSQLorJava.
>  My understanding is that Drools Flow is an alternative to jBPM and
> from what I can tell has a far better integration with rules.
>
> That said: I'm not adverse to alternative approaches if what I'm
> planning doesn't sound like a good fit.  What I need to do is
> essentially pretty simple: take a file and process it through several
> steps (with some logic deciding which steps are relevant).
>
> Thanks for your help!
>
> Ken
> ___
> 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] Invocation Patterns

2010-08-03 Thread Kenneth May
You are correct, Drools Flow may not be the best choice of technology.
 I could certainly write what is required in core Java very easily!

However, there are a few reasons why this was my intended approach:
 1) A large degree of flexibility may be required in the future.  I
like the concept of being able to change or apply new logic fairly
easily.
 2) Out of the box business activity monitorring is appealing
 3) I'm keen to explore BPM and rules technology in more depth
 4) The discussion in this (admittedly old) article suggested jBPM may
be a good fit: http://community.jboss.org/wiki/JBossRulesjBPMSQLorJava.
 My understanding is that Drools Flow is an alternative to jBPM and
from what I can tell has a far better integration with rules.

That said: I'm not adverse to alternative approaches if what I'm
planning doesn't sound like a good fit.  What I need to do is
essentially pretty simple: take a file and process it through several
steps (with some logic deciding which steps are relevant).

Thanks for your help!

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


Re: [rules-users] fireAllRules() - multiply times.

2010-08-03 Thread Maverickthe6

No, for me, that's not working.

It will only be executed once by the first fireAllRules()...
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/fireAllRules-multiply-times-tp1019111p1019469.html
Sent from the Drools - User 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] fireAllRules() - multiply times.

2010-08-03 Thread Mauricio Salatino
To be more explicit..

rule "testRule"
when
   eval(true)
then
 //do something here
end

On Tue, Aug 3, 2010 at 12:09 PM, sreekar  wrote:

>
> "how can I design a rule, that has no
> condition at the LHS and will be executed each time I call fireAllRules()"
>
> - do not write anything in the LHS and it will be executed everytime you
> call fireAllRules()... something like this:
>
> rule "testRule"
> when
> then
>  //do something here
> end
> --
> View this message in context:
> http://drools-java-rules-engine.46999.n3.nabble.com/fireAllRules-multiply-times-tp1019111p1019449.html
> Sent from the Drools - User mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



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

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


Re: [rules-users] fireAllRules() - multiply times.

2010-08-03 Thread sreekar

"how can I design a rule, that has no
condition at the LHS and will be executed each time I call fireAllRules()"

- do not write anything in the LHS and it will be executed everytime you
call fireAllRules()... something like this:

rule "testRule"
when
then
 //do something here
end
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/fireAllRules-multiply-times-tp1019111p1019449.html
Sent from the Drools - User 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] Invocation Patterns

2010-08-03 Thread Mauricio Salatino
I think that using drools flow for that situation is a good fit. because if
he wants to call different webservices during the process, he can create
different work items and plug the implementations. Then with the process
definition in xml he can change in a visual way with more flexibility.

On Tue, Aug 3, 2010 at 11:31 AM, Wolfgang Laun wrote:

> Whether or not a Flow is really required for what (according to your
> !A,B,C,D") is merely a case distinction, remains to be seen. (It
> might also be handled by agenda groups or similar.)
>
> Much depends on how easily you can unmarshal the XML data and
> create facts from the resulting objects, which will the basis for
> fine-grained rules firing to send email, copying, etc.
>
> -W
>
>
> On 3 August 2010 16:03, Kenneth May  wrote:
> > I am new to Drools, but am an experienced programmer.  I was hoping
> > somebody with some Drools Flow experience could advise on a good
> > approach for dealing with the following requirements:
> >
> > 1) A large number of XML files are received: perhaps one every few
> > seconds (or more frequently).  Each time a file is received I want to
> > process these according to a pre-defined business process.  For
> > example:
> > - Calling a web service using some data contained in the file to do a
> > calculation
> > - Writing to a database
> > - Copying the file to another directory
> > - Sending an email
> > - Logging progress
> >
> > NB Some of the logic in the flow may vary depending on data within the
> > file which is being processed.
> >
> > 2) The business process may vary slightly depending on the nature of
> > the file being received.  For example I have four file types: A,B,C
> > &D.  I’d want to invoke 4 slightly different processes.  Each of these
> > may have slight variations depending on the contents of the file.
> >
> > 3) The business processes may be changed occasionally, but usually not
> > drastically.  This doesn’t need to be done dynamically.
> >
> >
> > I already have code which monitors a folder for new files.  With
> > drools, I’m just not sure what the best pattern is for how to deal
> > with this in an efficient manner.  I was thinking:
> >
> > Each time a file is received:
> > - Do an initial parse to determine which business process to invoke,
> > each of these would be built as a separate drools flow
> > - Construct the knowledgebase, session etc
> > - Start the relevant flow
> >
> > I’m pretty sure this isn’t the easiest or most efficient approach
> > though!  Any thoughts?
> >
> > Thanks,
> >
> > Ken
> >
> > ___
> > 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
>



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

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


Re: [rules-users] Invocation Patterns

2010-08-03 Thread Wolfgang Laun
Whether or not a Flow is really required for what (according to your
!A,B,C,D") is merely a case distinction, remains to be seen. (It
might also be handled by agenda groups or similar.)

Much depends on how easily you can unmarshal the XML data and
create facts from the resulting objects, which will the basis for
fine-grained rules firing to send email, copying, etc.

-W


On 3 August 2010 16:03, Kenneth May  wrote:
> I am new to Drools, but am an experienced programmer.  I was hoping
> somebody with some Drools Flow experience could advise on a good
> approach for dealing with the following requirements:
>
> 1) A large number of XML files are received: perhaps one every few
> seconds (or more frequently).  Each time a file is received I want to
> process these according to a pre-defined business process.  For
> example:
> - Calling a web service using some data contained in the file to do a
> calculation
> - Writing to a database
> - Copying the file to another directory
> - Sending an email
> - Logging progress
>
> NB Some of the logic in the flow may vary depending on data within the
> file which is being processed.
>
> 2) The business process may vary slightly depending on the nature of
> the file being received.  For example I have four file types: A,B,C
> &D.  I’d want to invoke 4 slightly different processes.  Each of these
> may have slight variations depending on the contents of the file.
>
> 3) The business processes may be changed occasionally, but usually not
> drastically.  This doesn’t need to be done dynamically.
>
>
> I already have code which monitors a folder for new files.  With
> drools, I’m just not sure what the best pattern is for how to deal
> with this in an efficient manner.  I was thinking:
>
> Each time a file is received:
> - Do an initial parse to determine which business process to invoke,
> each of these would be built as a separate drools flow
> - Construct the knowledgebase, session etc
> - Start the relevant flow
>
> I’m pretty sure this isn’t the easiest or most efficient approach
> though!  Any thoughts?
>
> Thanks,
>
> Ken
>
> ___
> 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] Invocation Patterns

2010-08-03 Thread Mauricio Salatino
Yes, that sounds perfect..
If you find that your processes are too similar you should evaluate treating
all those differences using rules in order to just fire one single
processes. But the only way to learn that is doing it in the way that you
mention. Start simple, create a simple process for just one of the type of
the files that you receive and then plug different work items based on the
process that you want to apply to each type of file.

Just my two cents...

Greetings

On Tue, Aug 3, 2010 at 11:03 AM, Kenneth May  wrote:

> I am new to Drools, but am an experienced programmer.  I was hoping
> somebody with some Drools Flow experience could advise on a good
> approach for dealing with the following requirements:
>
> 1) A large number of XML files are received: perhaps one every few
> seconds (or more frequently).  Each time a file is received I want to
> process these according to a pre-defined business process.  For
> example:
> - Calling a web service using some data contained in the file to do a
> calculation
> - Writing to a database
> - Copying the file to another directory
> - Sending an email
> - Logging progress
>
> NB Some of the logic in the flow may vary depending on data within the
> file which is being processed.
>
> 2) The business process may vary slightly depending on the nature of
> the file being received.  For example I have four file types: A,B,C
> &D.  I’d want to invoke 4 slightly different processes.  Each of these
> may have slight variations depending on the contents of the file.
>
> 3) The business processes may be changed occasionally, but usually not
> drastically.  This doesn’t need to be done dynamically.
>
>
> I already have code which monitors a folder for new files.  With
> drools, I’m just not sure what the best pattern is for how to deal
> with this in an efficient manner.  I was thinking:
>
> Each time a file is received:
> - Do an initial parse to determine which business process to invoke,
> each of these would be built as a separate drools flow
> - Construct the knowledgebase, session etc
> - Start the relevant flow
>
> I’m pretty sure this isn’t the easiest or most efficient approach
> though!  Any thoughts?
>
> Thanks,
>
> Ken
>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



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

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


[rules-users] Invocation Patterns

2010-08-03 Thread Kenneth May
I am new to Drools, but am an experienced programmer.  I was hoping
somebody with some Drools Flow experience could advise on a good
approach for dealing with the following requirements:

1) A large number of XML files are received: perhaps one every few
seconds (or more frequently).  Each time a file is received I want to
process these according to a pre-defined business process.  For
example:
- Calling a web service using some data contained in the file to do a
calculation
- Writing to a database
- Copying the file to another directory
- Sending an email
- Logging progress

NB Some of the logic in the flow may vary depending on data within the
file which is being processed.

2) The business process may vary slightly depending on the nature of
the file being received.  For example I have four file types: A,B,C
&D.  I’d want to invoke 4 slightly different processes.  Each of these
may have slight variations depending on the contents of the file.

3) The business processes may be changed occasionally, but usually not
drastically.  This doesn’t need to be done dynamically.


I already have code which monitors a folder for new files.  With
drools, I’m just not sure what the best pattern is for how to deal
with this in an efficient manner.  I was thinking:

Each time a file is received:
- Do an initial parse to determine which business process to invoke,
each of these would be built as a separate drools flow
- Construct the knowledgebase, session etc
- Start the relevant flow

I’m pretty sure this isn’t the easiest or most efficient approach
though!  Any thoughts?

Thanks,

Ken

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


Re: [rules-users] Drools Expert: monitor rules & report activity

2010-08-03 Thread Dieter D'haeyere
What I mean with 'all possible cases' is eg. that you will pass your facts
to the rule engine and that the rule engine will 'return' some result.
I guess it is perfectly possible that in your test scenario's you covered a
lot of possible values for those facts but not all of them and that you
could get some unexpected results afterwards.
This would mean that your test scenario's / test data were not good enough.
But I could imagine that stuff like this happens... At that moment you
should be able to see what rules were fired in a production environment.

Ik will have a look at the drools execution server.

Dieter.




2010/8/3 Swindells, Thomas 

>  Guvnor is a user interface used to define sets of rules, it’s not
> designed to be an actual execution server – the demo test scenarios only
> work on static predefined data, in a real execution environment the input
> data has to be acquired/loaded from somewhere dynamically, hence you always
> need some form of development – though look at the drools execution server
> to minimize this.
>
>
>
> What do you actually mean by covering all possible cases anyway? Possible
> cases of what? What are you trying to detect?
>
>
>
> Thomas
>
>
>
> *From:* rules-users-boun...@lists.jboss.org [mailto:
> rules-users-boun...@lists.jboss.org] *On Behalf Of *Dieter D'haeyere
> *Sent:* 03 August 2010 14:35
> *To:* Rules Users List
> *Subject:* Re: [rules-users] Drools Expert: monitor rules & report
> activity
>
>
>
> Ok, this looks like a way to handle it.
> But does this mean that there is no 'out of the box' monitoring possibility
> ?
>
> When deploying a rule base (with Guvnor), I would kind of expect that
> Guvnor is accessible and that it can return some metrics (eg. after
> switching on a monitoring option because I presume continuous logging would
> slow down the system too much).
>
> As I understand it now, some custom development is needed will be needed to
> achieve 'real-time' monitoring.
>
>
>
>
>
>
>
>
>  2010/8/3 David Sinclair 
>
> Have a look at the AgendaEventListener. You can use these callbacks to see
> which rules fire and information about them
>
>  void
>
> *activationCancelled
> *(ActivationCancelledEvent
>  event)
>
>
>  void
>
> *activationCreated
> *(ActivationCreatedEvent
>  event)
>
>
>  void
>
> *afterActivationFired
> *(AfterActivationFiredEvent
>  event)
>
>
>  void
>
> *agendaGroupPopped
> *(AgendaGroupPoppedEvent
>  event)
>
>
>  void
>
> *agendaGroupPushed
> *(AgendaGroupPushedEvent
>  event)
>
>
>  void
>
> *beforeActivationFired
> *(BeforeActivationFiredEvent
>  event)
>
>
>
> 2010/8/3 Dieter D'haeyere 
>
> @ll,
> I have a que

Re: [rules-users] Drools Expert: monitor rules & report activity

2010-08-03 Thread Swindells, Thomas
Guvnor is a user interface used to define sets of rules, it's not designed to 
be an actual execution server - the demo test scenarios only work on static 
predefined data, in a real execution environment the input data has to be 
acquired/loaded from somewhere dynamically, hence you always need some form of 
development - though look at the drools execution server to minimize this.

What do you actually mean by covering all possible cases anyway? Possible cases 
of what? What are you trying to detect?

Thomas

From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Dieter D'haeyere
Sent: 03 August 2010 14:35
To: Rules Users List
Subject: Re: [rules-users] Drools Expert: monitor rules & report activity

Ok, this looks like a way to handle it.
But does this mean that there is no 'out of the box' monitoring possibility ?

When deploying a rule base (with Guvnor), I would kind of expect that Guvnor is 
accessible and that it can return some metrics (eg. after switching on a 
monitoring option because I presume continuous logging would slow down the 
system too much).

As I understand it now, some custom development is needed will be needed to 
achieve 'real-time' monitoring.








2010/8/3 David Sinclair 
mailto:dsincl...@chariotsolutions.com>>
Have a look at the AgendaEventListener. You can use these callbacks to see 
which rules fire and information about them
 void

activationCancelled(ActivationCancelledEvent
 event)


 void

activationCreated(ActivationCreatedEvent
 event)


 void

afterActivationFired(AfterActivationFiredEvent
 event)


 void

agendaGroupPopped(AgendaGroupPoppedEvent
 event)


 void

agendaGroupPushed(AgendaGroupPushedEvent
 event)


 void

beforeActivationFired(BeforeActivationFiredEvent
 event)


2010/8/3 Dieter D'haeyere 
mailto:dieter.dhaey...@gmail.com>>
@ll,
I have a question regarding the possibilities to monitor and report on the 
rules activity.
I have seen that with Drools Guvnor, it is perfectly possible to monitor 
scenario's, see what rules fired, etc.

Now, going further, I have two questions:
- Is it possible to monitor rule activity (which rules got fired etc) in a 
production situation.  Eg. Is it possible to start recording activity at some 
time until a proble occured and to review the logs afterwards.  This would be 
of use when scenario's are not covering all possible cases.
- Is it possible to produce reports on rules, usage of rules (eg. what rules 
are fired and what rules were fired most), performance, ...
And if not, what could be a good starting point to create them ?

My experience with Drools is r

Re: [rules-users] Drools Expert: monitor rules & report activity

2010-08-03 Thread Dieter D'haeyere
Ok, this looks like a way to handle it.
But does this mean that there is no 'out of the box' monitoring possibility
?

When deploying a rule base (with Guvnor), I would kind of expect that Guvnor
is accessible and that it can return some metrics (eg. after switching on a
monitoring option because I presume continuous logging would slow down the
system too much).

As I understand it now, some custom development is needed will be needed to
achieve 'real-time' monitoring.









2010/8/3 David Sinclair 

> Have a look at the AgendaEventListener. You can use these callbacks to see
> which rules fire and information about them
>
>   void 
> *activationCancelled
> *(ActivationCancelledEvent
>  event)
>   void 
> *activationCreated
> *(ActivationCreatedEvent
>  event)
>   void 
> *afterActivationFired
> *(AfterActivationFiredEvent
>  event)
>   void 
> *agendaGroupPopped
> *(AgendaGroupPoppedEvent
>  event)
>   void 
> *agendaGroupPushed
> *(AgendaGroupPushedEvent
>  event)
>   void 
> *beforeActivationFired
> *(BeforeActivationFiredEvent
>  event)
>
> 2010/8/3 Dieter D'haeyere 
>
>> @ll,
>> I have a question regarding the possibilities to monitor and report on the
>> rules activity.
>> I have seen that with Drools Guvnor, it is perfectly possible to monitor
>> scenario's, see what rules fired, etc.
>>
>> Now, going further, I have two questions:
>> - Is it possible to monitor rule activity (which rules got fired etc) in a
>> production situation.  Eg. Is it possible to start recording activity at
>> some time until a proble occured and to review the logs afterwards.  This
>> would be of use when scenario's are not covering all possible cases.
>> - Is it possible to produce reports on rules, usage of rules (eg. what
>> rules are fired and what rules were fired most), performance, ...
>> And if not, what could be a good starting point to create them ?
>>
>> My experience with Drools is rather limited.  Let's say that I am
>> interested in expert system and technologies surrounding it.  At this moment
>> I am getting a 'theoretical' grip on Drools and its possibilities (of
>> course, I couldn't help also creating some kind of poc :)  ).
>>
>> Sincerely,
>> Dieter D'haeyere.
>>
>>
>> ___
>> 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] fireAllRules() - multiply times.

2010-08-03 Thread Maverickthe6

Hey!

I'm new to drools-expert and try to modell the following situation:

- I have a ruleflow
- I want to collect data and all few seconds (like 10 seconds), I want to
execute fireAllRules(). (Called by a timer).

FireUntilHalt() is not an option, and in the situation above the following
"problem" arises:

I lost some facts, because in a new fireAllRules() run, some of these facts
wasn't touched anymore and therefore didn't set on the agenda once more. So
they will be only regarded in the first fireAllRules() run... But - of
course - I want the facts to be regarded once more in later turns. At the
moment,  I update the facts (as last rule that fires) per ruleflow-group,
even if they haven't had been modified. This is..ehm.. not so nice ;) (but
helps..), and the question is now: what is the state-of-the-art to model
this?

And a question that comes along is, how can I design a rule, that has no
condition at the LHS and will be executed each time I call fireAllRules().

Thanks! 
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/fireAllRules-multiply-times-tp1019111p1019111.html
Sent from the Drools - User 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: monitor rules & report activity

2010-08-03 Thread David Sinclair
Have a look at the AgendaEventListener. You can use these callbacks to see
which rules fire and information about them

 void 
*activationCancelled
*(ActivationCancelledEvent
 event)
  void
*activationCreated
*(ActivationCreatedEvent
 event)
  void
*afterActivationFired
*(AfterActivationFiredEvent
 event)
  void
*agendaGroupPopped
*(AgendaGroupPoppedEvent
 event)
  void
*agendaGroupPushed
*(AgendaGroupPushedEvent
 event)
  void
*beforeActivationFired
*(BeforeActivationFiredEvent
 event)

2010/8/3 Dieter D'haeyere 

> @ll,
> I have a question regarding the possibilities to monitor and report on the
> rules activity.
> I have seen that with Drools Guvnor, it is perfectly possible to monitor
> scenario's, see what rules fired, etc.
>
> Now, going further, I have two questions:
> - Is it possible to monitor rule activity (which rules got fired etc) in a
> production situation.  Eg. Is it possible to start recording activity at
> some time until a proble occured and to review the logs afterwards.  This
> would be of use when scenario's are not covering all possible cases.
> - Is it possible to produce reports on rules, usage of rules (eg. what
> rules are fired and what rules were fired most), performance, ...
> And if not, what could be a good starting point to create them ?
>
> My experience with Drools is rather limited.  Let's say that I am
> interested in expert system and technologies surrounding it.  At this moment
> I am getting a 'theoretical' grip on Drools and its possibilities (of
> course, I couldn't help also creating some kind of poc :)  ).
>
> Sincerely,
> Dieter D'haeyere.
>
>
> ___
> 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: monitor rules & report activity

2010-08-03 Thread Dieter D'haeyere
@ll,
I have a question regarding the possibilities to monitor and report on the
rules activity.
I have seen that with Drools Guvnor, it is perfectly possible to monitor
scenario's, see what rules fired, etc.

Now, going further, I have two questions:
- Is it possible to monitor rule activity (which rules got fired etc) in a
production situation.  Eg. Is it possible to start recording activity at
some time until a proble occured and to review the logs afterwards.  This
would be of use when scenario's are not covering all possible cases.
- Is it possible to produce reports on rules, usage of rules (eg. what rules
are fired and what rules were fired most), performance, ...
And if not, what could be a good starting point to create them ?

My experience with Drools is rather limited.  Let's say that I am interested
in expert system and technologies surrounding it.  At this moment I am
getting a 'theoretical' grip on Drools and its possibilities (of course, I
couldn't help also creating some kind of poc :)  ).

Sincerely,
Dieter D'haeyere.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] How to use Drools Flow?

2010-08-03 Thread Mauricio Salatino
Hi guys,
You can accomplish your use case following the steps that diego mention.
Take a look at the documentation and at the Human Task module to see how to
use it.
If your process will "run" for long periods, you will need to take a look on
persistence configuration also.
Greetings.

On Mon, Aug 2, 2010 at 11:28 PM, XiaoMiTang wrote:

>
> hi diego,thank u for your reply.
>
> As far as I understand, we start the work flow using the code:
>
> session.startProcess("……");
>
> Once it starts,it runs from Start node to End node~
>
> User A runs the code session.startProcess("……"),the work flow starts,runs
> step by step:
>
> (1)"Human Task assigned to user A"   what you will do with this? create
> a new task and add it to DB?
>
> (2)"Action1"
>
> (3) now,it must be stopped,because of the remaining work should be done by
> user B,so user A log out.
>
>
>
> Several days later,user B log in,he completes the task ,can the work flow
> be
> finished automatically?
>
> if can not ,how do I make the rest the workflow can be completed?
>
> --
> View this message in context:
> http://drools-java-rules-engine.46999.n3.nabble.com/How-to-use-Drools-Flow-tp1014591p1017862.html
> Sent from the Drools - User mailing list archive at Nabble.com.
>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



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

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


[rules-users] Decision table creation query

2010-08-03 Thread Kripa Nathwani
Hello Admin,

I am new to Drools.
Kindly let me know the steps to create a decision table in Drools Guvnor.

Best Regards,
Kripa
Mail: kripa.nathw...@lntinfotech.com



This Email may contain confidential or privileged information for the intended 
recipient (s) If you are not the intended recipient, please do not use or 
disseminate the information, notify the sender and delete it from your system.

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


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

2010-08-03 Thread Han Ming Low
Hi Jervis,

Thanks for the reply.

Yes, this solve the problem.

Thanks again.


Han Ming

On Mon, Aug 2, 2010 at 2:24 PM, Jervis Liu  wrote:

> Hi, the rolesProperties file (eg,  guvnor-roles.properties) configured
> in JBoss AS is not used by Guvnor authorization. Before you enable
> enable-role-based-authorization, you need to login and configure user
> permissions in Guvnor "Administration". For example, you need to give
> your "admin" user a full admin permission.
>
> Hope this helps,
> Jervis
>
> Han Ming Low wrote:
> > Hi all,
> >
> > I try to enable the Role Base Authorization in Guvnor after it was
> > running fine with the default login mechanism.
> > But, encountered some problem with the attempt.
> >
> > What I did was that in the components.xml,
> > - commented out the default  > authenticate-method="#{defaultAuthenticator.authenticate}"/>
> > - uncomment the  > authenticate-method="#{authenticator.authenticate}"
> > jaas-config-name="other"/>
> > - change the role base authorization to true,
> >  > enable-role-based-authorization="true"/>
> >
> > And at the login-config.xml
> > I have changed the "other" application policy to
> > 
> >
> >> "org.jboss.security.auth.spi.UsersRolesLoginModule"
> >  flag = "required" >
> > > name="usersProperties">props/guvnor-users.properties
> > > name="rolesProperties">props/guvnor-roles.properties
> >   
> >
> > 
> >
> > guvnor-users.properties
> > admin=admin12
> > krisv=krisv
> > john=john
> > mary=mary
> >
> > guvnor-roles.properties
> > admin=admin
> > krisv=admin,manager,user
> > john=admin,manager,user
> > mary=admin,manager,user
> >
> > After restarting JBoss, I can login based on the user and password
> > defined in the guvnor-users.properties.
> > And, by changing the password in the properties, I verified that it is
> > taking in the value from the file itself.
> >
> > However, when I login as user admin and tried to access the
> > Administration | User Permission or Event Log,
> > I'm prompt "Sorry, insufficient permissions to perform this action."
> >
> > The error from the console is
> > 11:15:36,046 INFO  [STDOUT] ERROR 29-07 11:15:36,046
> > (LoggingHelper.java:error:76)
> > Service method 'public abstract java.util.Map
> > org.drools.guvnor.client.rpc.RepositoryService.listUserPermissions()
> >throws
> > org.drools.guvnor.client.rpc.DetailedSerializationException'
> >threw an unexpected exception:
> > org.jboss.seam.security.AuthorizationException:
> >  Authorization check failed for
> > permission[org.drools.guvnor.server.security.admint...@bf7a4d,admin]
> > org.jboss.seam.security.AuthorizationException: Authorization check
> > failed for
> > permission[org.drools.guvnor.server.security.admint...@bf7a4d,admin]
> > at
> > org.jboss.seam.security.Identity.checkPermission(Identity.java:581)
> > at
> >
> org.drools.guvnor.server.ServiceImplementation.listUserPermissions(ServiceImplementation.java:2604)
> > .
> >
> > Checking on the org.drools.guvnor.server.security.RoleTypes code, the
> > available role should be
> > admin
> > analyst
> > analyst.readonly
> > package.admin
> > package.developer
> > package.readonly
> >
> > Can anyone help to let me know what's wrong with my configuration?
> >
> > Thanks.
> >
> >
> > Han Ming
> > 
> >
> > ___
> > rules-users mailing list
> > rules-users@lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Need help to call method with input parameter and return type

2010-08-03 Thread Sanjib Karmakar

Hi 

at line number 51 of RuleHandler.java following assignment is there

FlifoDTO flifoDTO = flDTO;

this flDTO is comming as parameter of initMessage() which is an instance 
of FlifoDTO created in main method.

Regards
Sanjib Karmakar
SkyTech Solutions Pvt. Ltd

Please consider the environment before printing this email.



"Wolfgang Laun-2 [via Drools - Java Rules Engine]" 
 
08/03/2010 11:08 AM

To
Sanjib Karmakar 
cc

Subject
Re: Need help to call method with input parameter and return type






ksession hasn't been assigned an object when you call ksession.insert 
in RuleHandler.java:61. 
-W 

On 3 August 2010 06:31, Sanjib Karmakar <[hidden email]> wrote: 

> 
> Hi 
> 
> I am new in drools. In my project I have to call the method define in 
xml 
> rule file using java 
> 
> ## Following is my rule xml 
> 
>  
> Â  Â  Â  Â  Â xmlns="http://drools.org/drools-5.0"; 
> Â  Â  Â  Â xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"; 
> Â  Â  Â  Â xs:schemaLocation="http://drools.org/drools-5.0 
drools.org/drools-5.0.xsd"> 
>  
> 
>  
> 
>  
> Â  Â  
> Â  Â  
> Â  Â  System.out.println("appId " + appId); 
> Â  Â  if(appId==2) 
> Â  Â  Â { 
> Â  Â  Â  Â flifoDTO.setChnlName("SKYFUSION.UNI.SIMU.TXT.QUEUE"); 
> Â  Â  Â } 
> Â  Â  if(appId==3) 
> Â  Â  Â { 
> Â  Â  Â  Â flifoDTO.setChnlName("SKYFUSION.BASE.MSGFLTR.TXT.TOPIC"); 
> Â  Â  Â } 
> Â  Â  
>  
> 
>  
> Â  Â  Â  Â  
> Â  Â  Â  Â  Â  Â  Â  Â  
> Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  
> Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  
  evaluator="==">FlifoDTO.FLIFO 
> Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  
> Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  
> Â  Â  Â  Â  Â  Â  Â  Â  
> Â  Â  Â  Â  
> Â  Â  Â  Â  
> Â  Â  Â  Â  Â  Â  Â  Â  Â //System.out.println(ruleDTO); 
> Â  Â  Â  Â  Â  Â  Â  Â  Â System.out.println("Find Channel"); 
> Â  Â  Â  Â  Â  Â  Â  Â  Â //show(appId); 
> Â  Â  Â  Â  
>  
> 
>  
> 
> ## Following is my DTO class 
> 
> package com.skyfusion.dto; 
> 
> public class FlifoDTO 
> { 
> Â  Â  Â  Â public static final int FLIFO = 1; 
> 
> Â  Â  Â  Â private String ruleId; 
> Â  Â  Â  Â private int appId; 
> Â  Â  Â  Â private int flifoType; 
> Â  Â  Â  Â private String chnlName; 
> 
> Â  Â  Â  Â public FlifoDTO() { 
> Â  Â  Â  Â } 
> Â  Â  Â  Â public int getAppId() { 
> Â  Â  Â  Â  Â  Â  Â  Â return appId; 
> Â  Â  Â  Â } 
> Â  Â  Â  Â public void setAppId(int appId) { 
> Â  Â  Â  Â  Â  Â  Â  Â this.appId = appId; 
> Â  Â  Â  Â } 
> Â  Â  Â  Â public String getChnlName() { 
> Â  Â  Â  Â  Â  Â  Â  Â return chnlName; 
> Â  Â  Â  Â } 
> Â  Â  Â  Â public void setChnlName(String chnlName) { 
> Â  Â  Â  Â  Â  Â  Â  Â this.chnlName = chnlName; 
> Â  Â  Â  Â } 
> Â  Â  Â  Â public void setRuleId(String ruleId) { 
> Â  Â  Â  Â  Â  Â  Â  Â this.ruleId = ruleId; 
> Â  Â  Â  Â } 
> Â  Â  Â  Â public String getRuleId() { 
> Â  Â  Â  Â  Â  Â  Â  Â return ruleId; 
> Â  Â  Â  Â } 
> Â  Â  Â  Â public int getFlifoType() { 
> Â  Â  Â  Â  Â  Â  Â  Â return flifoType; 
> Â  Â  Â  Â } 
> Â  Â  Â  Â public void setFlifoType(int flifoType) { 
> Â  Â  Â  Â  Â  Â  Â  Â this.flifoType = flifoType; 
> Â  Â  Â  Â } 
> } 
> 
> ## Following is my rule execution class 
> 
> package com.skyfusion.rule.handler; 
> 
> import org.drools.KnowledgeBase; 
> import org.drools.KnowledgeBaseFactory; 
> import org.drools.builder.KnowledgeBuilder; 
> import org.drools.builder.KnowledgeBuilderError; 
> import org.drools.builder.KnowledgeBuilderErrors; 
> import org.drools.builder.KnowledgeBuilderFactory; 
> import org.drools.builder.ResourceType; 
> import org.drools.io.ResourceFactory; 
> import org.drools.runtime.StatefulKnowledgeSession; 
> 
> import com.skyfusion.dto.FlifoDTO; 
> 
> public class RuleHandler { 
> 
> Â  Â  Â  Â private StatefulKnowledgeSession ksession = null; 
> Â  Â  Â  Â private KnowledgeBase kbase = null; 
> 
> Â  Â  Â  Â public RuleHandler() 
> Â  Â  Â  Â { 
> Â  Â  Â  Â  Â  Â  Â  Â try { 
> Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â // load up the knowledge base 
> Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â kbase = readKnowledgeBase(); 
> Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â ksession = 
kbase.newStatefulKnowledgeSession(); 
> Â  Â  Â  Â  Â  Â  Â  Â } catch (Exception t) { 
> Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â t.printStackTrace(); 
> Â  Â  Â  Â  Â  Â  Â  Â } 
> Â  Â  Â  Â } 
> 
> Â  Â  Â  Â private KnowledgeBase readKnowledgeBase() 
> Â  Â  Â  Â throws Exception 
> Â  Â  Â  Â { 
> Â  Â  Â  Â  Â  Â  Â  Â KnowledgeBuilder kbuilder = 
KnowledgeBuilderFactory.newKnowledgeBuilder(); 
> Â  Â  Â  Â  Â  Â  Â  
 kbuilder.add(ResourceFactory.newClassPathResource("fliforule.xml"), 
> ResourceType.XDRL); 
> Â  Â  Â  Â  Â  Â  Â  Â KnowledgeBuilderErrors errors = 
kbuilder.getErrors(); 
> Â  Â  Â  Â  Â  Â  Â  Â if (errors.size() > 0) { 
> Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â for (KnowledgeBuilderError error: 
errors) { 
> Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  
 System.out.println(error); 
> Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â } 
> Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â throw new 
IllegalArgumentE