Re: [rules-users] Get authorized users rules only into application

2010-07-13 Thread G3

Hi 
Thanks for your reply.There can be any number of users through AD
connection.
Can I get all the drools user names and authorization rights into my
application?
Also can I get the user who created the rule as displayed in guvnor into my
application. Is there any restlet that can be used?
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Get-authorized-users-rules-only-into-application-tp959652p962828.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] Implementing Timers With Drools Persistence Enabled

2010-07-13 Thread Tan Hui Onn
Hi Nick,

You are absolutely right that the timer is not triggered in
CommandBasedStatefulKnowledgeSession (which is used for JPA
persistence). I have spent some time to troubleshoot it. There is some
finding regarding to this problem. Maybe other experts are willing to
solve it.

In org.drools.persistence.processinstance.JPASignalManager, when the
signal is triggered in method
signalEvent(long processInstanceId,
String type,
Object event),
the thread is blocked in
 commandService.execute(command);

I used debugger to trace it, and found that
SingleSessionCommandService.execute(GenericCommandT) is
synchronized.


I think the cause of untriggered timer is due to blocked
commandService.execute(command) in JPASignalManager.

(I am using drools-5.1.0.M2)
On Tue, Jul 13, 2010 at 6:09 AM, nanic23 nani...@hotmail.com wrote:

 Hi cafebabe,

 Thanks for your comment. I agree with you that work item ids are database
 primary keys but in this simple (very simple) case I just decided to
 harcoded as I know for a fact that the work item id is 1 because that is the
 only work item and each time I run the test the tables are dropped and
 recreated. So, there is never more than one row in the workItemInfo table
 and the only row always has 1 as its id.
 I could have stored the work item id or a work item object as a variable
 (like you mentioned) but in this case wouldn't make a difference for the
 timers.

 Are timers working for you when you use persistence? I do complete work
 items by workItem.getId() in all my code (other than this simple example
 :)). My problem is NOT completing the work item, my problem is triggering
 timers when persistence is enabled. The timers don't even trigger, thing
 that should happen before even trying to complete the work item.

 Thanks,

 Nick.


 --
 View this message in context: 
 http://drools-java-rules-engine.46999.n3.nabble.com/Implementing-Timers-With-Drools-Persistence-Enabled-tp923142p961658.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] Avoiding loops

2010-07-13 Thread Leonardo Gomes
Hi Droolers,

I'm trying to avoid loops and looking at different possibilities (no-loop,
activation-group, lock-on-active, etc.).

Scenario I want to avoid:

For example, the initial facts trigger *rule 1*, which inserts new facts
that will trigger *rule 2*, which will then insert facts that would
re-trigger *rule 1*.

Possibilities I tried:

no-loop - just prevents the re-activation of the same rule
lock-on-active - I can't know which rules should have lock-on-active set to
true, since I don't know what will be the initial facts.

What I'm trying to achieve:

All rules in my rule set should execute only once. So, a rule inserts new
facts only rules that haven't executed so far, should be activated.

Is there a way to do that, let's say 'out-of-the-box', with DRL?

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


[rules-users] Drools Guvnor Issues : Default Constructors Declaring Dialects

2010-07-13 Thread soc.frangis

I have successfully converted a previous rules engine project to Drools and
was attempting to make the next step by trying out Guvnor for the QA/Testing
module.

1)Even though my program executed and ran perfectly in Eclipse, i noticed
the testing QA section of Guvnor would crash with my fact models because i
did not have a default constructor with no arguments. I made the change, but
is this something that is required for Guvnor QA to work properly (all fact
models / POJOs MUST have a default no-arg constructor) OR did i just
configure Guvnor wrong?

I basically solved my problem, just trying to learn why there was a problem
to begin with.

2) Also, I noticed that even though the default dialect is java (and not
specifying it does not cause any issues in Eclipse), the Guvnor QA section
would not understand the rules unless they explicitly have dialect java in
their signature. Of course adding it fixes the problem, but again I am
trying to learn why. I assumed since it is the default dialect that it would
not need to be stated.  Is this again just the way Guvnor works (doesn't
work) or do i need to configure it a certain way?
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Guvnor-Issues-Default-Constructors-Declaring-Dialects-tp965078p965078.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 Guvnor Issues : Default Constructors Declaring Dialects

2010-07-13 Thread Esteban Aliverti
Hi,

I think that the non-args constructor is required because the classes are
instantiated using reflection: Class.forName(...).newInstance();

Best,



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


On Tue, Jul 13, 2010 at 9:01 PM, soc.frangis soc.fran...@gmail.com wrote:


 I have successfully converted a previous rules engine project to Drools and
 was attempting to make the next step by trying out Guvnor for the
 QA/Testing
 module.

 1)Even though my program executed and ran perfectly in Eclipse, i noticed
 the testing QA section of Guvnor would crash with my fact models because i
 did not have a default constructor with no arguments. I made the change,
 but
 is this something that is required for Guvnor QA to work properly (all fact
 models / POJOs MUST have a default no-arg constructor) OR did i just
 configure Guvnor wrong?

 I basically solved my problem, just trying to learn why there was a problem
 to begin with.

 2) Also, I noticed that even though the default dialect is java (and not
 specifying it does not cause any issues in Eclipse), the Guvnor QA section
 would not understand the rules unless they explicitly have dialect java
 in
 their signature. Of course adding it fixes the problem, but again I am
 trying to learn why. I assumed since it is the default dialect that it
 would
 not need to be stated.  Is this again just the way Guvnor works (doesn't
 work) or do i need to configure it a certain way?
 --
 View this message in context:
 http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Guvnor-Issues-Default-Constructors-Declaring-Dialects-tp965078p965078.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


Re: [rules-users] Get authorized users rules only into application

2010-07-13 Thread G3

Hi
Thanks for your reply.
I guess I have to use separate guvnor with a single package for each user
only.
The webdav shows only the packages and snapshots not the authorization
details. 

-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Get-authorized-users-rules-only-into-application-tp959652p965533.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