Re: [rules-users] Guvnor 5.4 CR1 role based authentication with JBossAS 7

2012-05-08 Thread bhochhi
Any ideas guys? This is making me believe there is something mixing with bean
configuration. When I uncommented ...

 security:jaas.JaasAuthenticator
   s:modifies/

 jaasConfigNameother/jaasConfigName
/security:jaas.JaasAuthenticator

.. guvnor fails to deploy with following with following snippet of
exception.

02:20:35,659 WARN  [org.jboss.solder.config.xml.model.ModelBuilder] (MSC
service thread 1-6) Solder Config could not resolve XML namspace for: {}
02:20:35,659 ERROR [stderr] (MSC service thread 1-6)
java.lang.NullPointerException

02:20:35,659 ERROR [stderr] (MSC service thread 1-6)at
org.jboss.solder.config.xml.model.ModelBuilder.validateXmlItem(ModelBuilder.java:237)

02:20:35,659 ERROR [stderr] (MSC service thread 1-6)at
org.jboss.solder.config.xml.model.ModelBuilder.addNodeToResult(ModelBuilder.java:102)

02:20:35,659 ERROR [stderr] (MSC service thread 1-6)at
org.jboss.solder.config.xml.model.ModelBuilder.build(ModelBuilder.java:88)

02:20:35,664 ERROR [stderr] (MSC service thread 1-6)at
org.jboss.solder.config.xml.bootstrap.XmlConfigExtension.beforeBeanDiscovery(XmlConfigExtension.java:93)

Any help appreciated.

--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-5-4-CR1-role-based-authentication-with-JBossAS-7-tp3969454p3970612.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] Guvnor - support for custom file extensions

2012-05-08 Thread anchi
Hi!

I need to extend Guvnor to support custom file extensions for BPMN
processes. So instead of using /.bpmn/ or /.bpmn2/ we need to use our
own file extensions. At the moment Guvnor just assumes them the to be /Other
assets/ and ignores them when building a package.

I plan to change Guvnor source to achieve this. I would appreciate if I get
some guidelines from dev-team, what classes do I have to change. Since you
have recently been adding support for /.bpmn2/ extension, I guess you
could give me some hints.
I found out that I have to add my extensions to
/org.drools.guvnor.client.common.AssetFormats/, change
/org.drools.guvnor.server.builder.AssetItemValidator/ and
/org.drools.guvnor.server.verification.AssetVerifier/ . Is there something
else?


Thanks!

--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-support-for-custom-file-extensions-tp3970683.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] DRL Query and Guvnor

2012-05-08 Thread Michael Anstis
It is on our to do list...

https://issues.jboss.org/browse/GUVNOR-1532

On 8 May 2012 01:09, Welsh, Armand awe...@statestreet.com wrote:

   Any plans to integrate QUERY DRL into guvnor w/o breaking the
 global/imports view?  (currently using 5.3)

 ___
 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.4.0 final

2012-05-08 Thread FlyingEagle
Hi,

can anybody tell me, when Drools 5.4.0 will be available as final version?

Thx

--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-5-4-0-final-tp3970794.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools 5.4.0 final

2012-05-08 Thread Michael Anstis
I suspect this week... the final documentation is being completed and then
the build will commence.

On 8 May 2012 10:11, FlyingEagle elisabeth.wi...@wincor-nixdorf.com wrote:

 Hi,

 can anybody tell me, when Drools 5.4.0 will be available as final version?

 Thx

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Drools-5-4-0-final-tp3970794.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

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


Re: [rules-users] drools 5.0's RuleFlow drools 5.2's jbpm5

2012-05-08 Thread Alan . Gairey
I thought that jBPM5 would still process RuleFlow files for backward 
compatibility? IIRC, Kris Verlaenen mentioned that on this list a while 
ago. Is this no longer the case?

Alan




Mauricio Salatino sala...@gmail.com 
Sent by: rules-users-boun...@lists.jboss.org
05/05/2012 11:54
Please respond to
Rules Users List rules-users@lists.jboss.org


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

Subject
Re: [rules-users] drools 5.0's RuleFlow  drools 5.2's jbpm5






Yes, jbpm5 is focused on the BPMN2 modeling language, I suggest you to 
read about that specification in order to start working with jBPM5. From 
the technical point of view most of the things that you will read about 
Drools Flow are still valid for jBPM5 (except the modeling language - 
RuleFlow).
Cheers

On Sat, May 5, 2012 at 11:28 AM, Ahmed Feki feki.ahmed@gmail.com 
wrote:
the jbpm5 runs with .bpmn process files not with .rf as in the 5.0, i 
still dont know if it is the only difference but i think these standards 
re not compatibles.


2012/5/5 bardelman feki.ahmed@gmail.com
Hi,
i m planning to learn jbpm5 and i ve 2 books :
-Drools-JBoss-Rules-5.0-Developers-Guide :which is about the version 5.0 
of
drools. in this book, there is a chapter about the Drools flow.

-The second book is the Drools Developper Cookbook(2012), here there is a
chapter about the jbpm5 in which it s said :jBPM5 is the new brand name 
of
the Drools process engine that was previously known as
Drools Flow.

As i want to optimize my learning curve for this framework(i mean for 
jbpm5)
i want to know if it is useful to read from the first book ? is it still
useful  the Drools flow of the version 5.0 ? sorry for my bad english ..!!

--
View this message in context: 
http://drools.46999.n3.nabble.com/drools-5-0-s-RuleFlow-drools-5-2-s-jbpm5-tp3964263.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




-- 
 - MyJourney @ http://salaboy.wordpress.com
 - Co-Founder @ http://www.jugargentina.org
 - Co-Founder @ http://www.jbug.com.ar
 
 - Salatino Salaboy Mauricio -
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

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


Re: [rules-users] agenda-groups

2012-05-08 Thread gboro54
I am not currently using agenda-groups. I believe my issue right now is one
of thread safety. A little background: I currently have a thread pulling
messages from a database running on the main thread. In several other
threads, I have drools session being fired every so often. It appears that
there may be a some type of deadlock caused by invoking fireAllRules on one
thread, while another is trying to insert. I am working through right now to
debug the issue. Has anyone else experienced this issue?


Vincent Legendre wrote
 
 I am having an issue where I have a catch all
 retraction rule setup as the lowest salience.
 
 Not sure to understand that (note that I am not english native ...)
 
 I see activations created for the facts but they are never fired.  Any
 thoughts on why this may happen?
 
 Send some rules. Activations never fired is just too vague to have a
 single answer.
 If you use agenda groups, may be that the group is simply not on focus ... 
 Add a first rule that set the focus, or set auto-focus for all your low
 salience rules, or don't set agenda group for them (their group will be
 the MAIN group).
 
 The session is run on a separate thread with fireAllRules called every
 1/2
 second. I have tried syncronizing inserts on the session so that thread
 would not be in the middle of firing when new facts come in but that does
 not seem to do anything
 
 Why not using fireUntilHalt instead ?
 Run your session.fireUntilHalt in a separate thread, and insert things in
 that session. 
 insert (or update or retract) will wake up the session.
 
 Of course, one day, you have to call halt() on your session to get out.
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users
 


--
View this message in context: 
http://drools.46999.n3.nabble.com/agenda-groups-tp3968541p3971147.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] agenda-groups

2012-05-08 Thread Wolfgang Laun
Periodically calling fireAllRules() in a thread running parallel to the one(s)
doing insertions doesn't make sense to me.

-W

On 08/05/2012, gboro54 gbor...@gmail.com wrote:
 I am not currently using agenda-groups. I believe my issue right now is one
 of thread safety. A little background: I currently have a thread pulling
 messages from a database running on the main thread. In several other
 threads, I have drools session being fired every so often. It appears that
 there may be a some type of deadlock caused by invoking fireAllRules on one
 thread, while another is trying to insert. I am working through right now
 to
 debug the issue. Has anyone else experienced this issue?


 Vincent Legendre wrote

 I am having an issue where I have a catch all
 retraction rule setup as the lowest salience.

 Not sure to understand that (note that I am not english native ...)

 I see activations created for the facts but they are never fired.  Any
 thoughts on why this may happen?

 Send some rules. Activations never fired is just too vague to have a
 single answer.
 If you use agenda groups, may be that the group is simply not on focus ...

 Add a first rule that set the focus, or set auto-focus for all your low
 salience rules, or don't set agenda group for them (their group will be
 the MAIN group).

 The session is run on a separate thread with fireAllRules called every
 1/2
 second. I have tried syncronizing inserts on the session so that thread
 would not be in the middle of firing when new facts come in but that
 does
 not seem to do anything

 Why not using fireUntilHalt instead ?
 Run your session.fireUntilHalt in a separate thread, and insert things in
 that session.
 insert (or update or retract) will wake up the session.

 Of course, one day, you have to call halt() on your session to get out.
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/agenda-groups-tp3968541p3971147.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] agenda-groups

2012-05-08 Thread gboro54
What do you recommend?  firUntilHalt seems to get locked out after
sometime... I am running out of ideas and have posted this question before.
I believe we talked about periodically using fireAllRules on a separate
thread.


laune wrote
 
 Periodically calling fireAllRules() in a thread running parallel to the
 one(s)
 doing insertions doesn't make sense to me.
 
 -W
 
 On 08/05/2012, gboro54 lt;gboro54@gt; wrote:
 I am not currently using agenda-groups. I believe my issue right now is
 one
 of thread safety. A little background: I currently have a thread pulling
 messages from a database running on the main thread. In several other
 threads, I have drools session being fired every so often. It appears
 that
 there may be a some type of deadlock caused by invoking fireAllRules on
 one
 thread, while another is trying to insert. I am working through right now
 to
 debug the issue. Has anyone else experienced this issue?


 Vincent Legendre wrote

 I am having an issue where I have a catch all
 retraction rule setup as the lowest salience.

 Not sure to understand that (note that I am not english native ...)

 I see activations created for the facts but they are never fired.  Any
 thoughts on why this may happen?

 Send some rules. Activations never fired is just too vague to have a
 single answer.
 If you use agenda groups, may be that the group is simply not on focus
 ...

 Add a first rule that set the focus, or set auto-focus for all your low
 salience rules, or don't set agenda group for them (their group will be
 the MAIN group).

 The session is run on a separate thread with fireAllRules called every
 1/2
 second. I have tried syncronizing inserts on the session so that thread
 would not be in the middle of firing when new facts come in but that
 does
 not seem to do anything

 Why not using fireUntilHalt instead ?
 Run your session.fireUntilHalt in a separate thread, and insert things
 in
 that session.
 insert (or update or retract) will wake up the session.

 Of course, one day, you have to call halt() on your session to get out.
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/agenda-groups-tp3968541p3971147.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users

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


--
View this message in context: 
http://drools.46999.n3.nabble.com/agenda-groups-tp3968541p3971245.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] agenda-groups

2012-05-08 Thread gboro54
Here is the code I am using to manage the running session(switched to
fireUntilHalt()). This seems to lockup after sometime. Any thoughts why?



import org.apache.log4j.Logger;
import org.drools.audit.WorkingMemoryFileLogger;
import org.drools.runtime.ObjectFilter;
import org.drools.runtime.StatefulKnowledgeSession;
import org.drools.runtime.rule.FactHandle;

import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;

/**
 * *Description:* RuleRunner is responsible for managing a drools session
 * running on another thread. The thread will allow insertion of facts and
 * global during it's execution.
 * 
 * @author Michael Weiss
 * 
 */
public class RuleRunner implements Runnable {

private static final Logger logger = Logger.getLogger(RuleRunner.class);

private StatefulKnowledgeSession session;

private WorkingMemoryFileLogger sessionLogger;

private boolean running;

private ImmutableListObjectFilter filters;

private String runningThreadName;

/**
 * *Description: * Construct a RuleRunner object with the given drools
 * stateful session
 * 
 * @param session
 *- The {@link org.drools.runtime.StatefulKnowledgeSession
 *StatefulKnowledgeSession} to be managed by the RuleRunner.
All
 *facts will be passed into this session for drools 
evaluation
 */
public RuleRunner(StatefulKnowledgeSession session) {
this.session = session;
this.running = false;
}

/**
 * *Description: * Construct a RuleRunner object with the given drools
 * stateful session
 * 
 * @param session
 *- The {@link org.drools.runtime.StatefulKnowledgeSession
 *StatefulKnowledgeSession} to be managed by the RuleRunner.
All
 *facts will be passed into this session for drools 
evaluation
 * 
 * @param filters
 *- An immutable list of {@link 
org.drools.runtime.ObjectFilter
 *object filters} which will be used to determine if the
session
 *is still processing.
 * 
 */
public RuleRunner(StatefulKnowledgeSession session,
ImmutableListObjectFilter filters) {
this.session = session;
this.filters = filters;
this.running = false;

}

/*
 * (non-Javadoc)
 * 
 * @see java.lang.Runnable#run()
 */
@Override
public void run() {
this.runningThreadName = Thread.currentThread().getName();
if (logger.isDebugEnabled()) {
logger.debug(Rule Runner has been kicked off on 
+ this.runningThreadName);
}
running = true;
while (running) {
session.fireUntilHalt();
}
logger.info(Disposing session);
session.halt();
if (sessionLogger != null) {
sessionLogger.writeToDisk();
sessionLogger = null;
}
this.session.dispose();

}

/**
 * *Description: * Insert's or update's the object based on weather the
 * object already exists in the currently active drools session.
 * 
 * @param fact
 *- The object to be inserted or updated.
 */
public synchronized void insertOrUpdate(Object fact) {
insert(fact);
}

private synchronized void insert(Object fact) {
if (!running) {
logger.warn(Inserting objects into non-running rules 
session);
}
Preconditions.checkNotNull(fact);
FactHandle factHandle = this.session.getFactHandle(fact);
if (factHandle == null) {
this.session.insert(fact);
} else {
this.session.update(factHandle, fact);
}
}

/**
 * *Description: * Add a global object with the given id to the drools
 * session. It is important to note that globals should not be used for 
an
 * object which needs to be evaluation by the drools session each time 
it
is
 * modified. A global placed in the drools session will not cause the 
rule
 * session to reevaluate. However globals are a great way to keep track 
of
 * information that may be needed to be retrieved from the running 
session.
 * 
 * @param identifier
 *- The identifier of the global as defined in the rules
 * @param value
 *- The global 

Re: [rules-users] agenda-groups

2012-05-08 Thread Wolfgang Laun
What about executing insert(s) followed by fireAllRules() in one thread?
-W

On 08/05/2012, gboro54 gbor...@gmail.com wrote:
 What do you recommend?  firUntilHalt seems to get locked out after
 sometime... I am running out of ideas and have posted this question before.
 I believe we talked about periodically using fireAllRules on a separate
 thread.


 laune wrote

 Periodically calling fireAllRules() in a thread running parallel to the
 one(s)
 doing insertions doesn't make sense to me.

 -W

 On 08/05/2012, gboro54 lt;gboro54@gt; wrote:
 I am not currently using agenda-groups. I believe my issue right now is
 one
 of thread safety. A little background: I currently have a thread pulling
 messages from a database running on the main thread. In several other
 threads, I have drools session being fired every so often. It appears
 that
 there may be a some type of deadlock caused by invoking fireAllRules on
 one
 thread, while another is trying to insert. I am working through right
 now
 to
 debug the issue. Has anyone else experienced this issue?


 Vincent Legendre wrote

 I am having an issue where I have a catch all
 retraction rule setup as the lowest salience.

 Not sure to understand that (note that I am not english native ...)

 I see activations created for the facts but they are never fired.  Any
 thoughts on why this may happen?

 Send some rules. Activations never fired is just too vague to have a
 single answer.
 If you use agenda groups, may be that the group is simply not on focus
 ...

 Add a first rule that set the focus, or set auto-focus for all your
 low
 salience rules, or don't set agenda group for them (their group will
 be
 the MAIN group).

 The session is run on a separate thread with fireAllRules called every
 1/2
 second. I have tried syncronizing inserts on the session so that
 thread
 would not be in the middle of firing when new facts come in but that
 does
 not seem to do anything

 Why not using fireUntilHalt instead ?
 Run your session.fireUntilHalt in a separate thread, and insert things
 in
 that session.
 insert (or update or retract) will wake up the session.

 Of course, one day, you have to call halt() on your session to get out.
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/agenda-groups-tp3968541p3971147.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users

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



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/agenda-groups-tp3968541p3971245.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] agenda-groups

2012-05-08 Thread gboro54
The point is to be able to stream a large volume of messages into the rule
session without tying up that thread. In addition I don't want there to be
millions of messages in a session at a given point, thus the point of
executing the rules on a different thread while inserting facts from
another. 


laune wrote
 
 What about executing insert(s) followed by fireAllRules() in one thread?
 -W
 
 On 08/05/2012, gboro54 lt;gboro54@gt; wrote:
 What do you recommend?  firUntilHalt seems to get locked out after
 sometime... I am running out of ideas and have posted this question
 before.
 I believe we talked about periodically using fireAllRules on a separate
 thread.


 laune wrote

 Periodically calling fireAllRules() in a thread running parallel to the
 one(s)
 doing insertions doesn't make sense to me.

 -W

 On 08/05/2012, gboro54 lt;gboro54@gt; wrote:
 I am not currently using agenda-groups. I believe my issue right now is
 one
 of thread safety. A little background: I currently have a thread
 pulling
 messages from a database running on the main thread. In several other
 threads, I have drools session being fired every so often. It appears
 that
 there may be a some type of deadlock caused by invoking fireAllRules on
 one
 thread, while another is trying to insert. I am working through right
 now
 to
 debug the issue. Has anyone else experienced this issue?


 Vincent Legendre wrote

 I am having an issue where I have a catch all
 retraction rule setup as the lowest salience.

 Not sure to understand that (note that I am not english native ...)

 I see activations created for the facts but they are never fired. 
 Any
 thoughts on why this may happen?

 Send some rules. Activations never fired is just too vague to have a
 single answer.
 If you use agenda groups, may be that the group is simply not on focus
 ...

 Add a first rule that set the focus, or set auto-focus for all your
 low
 salience rules, or don't set agenda group for them (their group will
 be
 the MAIN group).

 The session is run on a separate thread with fireAllRules called
 every
 1/2
 second. I have tried syncronizing inserts on the session so that
 thread
 would not be in the middle of firing when new facts come in but that
 does
 not seem to do anything

 Why not using fireUntilHalt instead ?
 Run your session.fireUntilHalt in a separate thread, and insert things
 in
 that session.
 insert (or update or retract) will wake up the session.

 Of course, one day, you have to call halt() on your session to get
 out.
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/agenda-groups-tp3968541p3971147.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users

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



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/agenda-groups-tp3968541p3971245.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users

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


--
View this message in context: 
http://drools.46999.n3.nabble.com/agenda-groups-tp3968541p3971305.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] agenda-groups

2012-05-08 Thread gboro54
Perhaps a blocking queue which has facts put on from other threads, the
thread then inserts x number of facts and fires the rule set?


gboro54 wrote
 
 The point is to be able to stream a large volume of messages into the rule
 session without tying up that thread. In addition I don't want there to be
 millions of messages in a session at a given point, thus the point of
 executing the rules on a different thread while inserting facts from
 another. 
 
 
 laune wrote
 
 What about executing insert(s) followed by fireAllRules() in one thread?
 -W
 
 On 08/05/2012, gboro54 lt;gboro54@gt; wrote:
 What do you recommend?  firUntilHalt seems to get locked out after
 sometime... I am running out of ideas and have posted this question
 before.
 I believe we talked about periodically using fireAllRules on a separate
 thread.


 laune wrote

 Periodically calling fireAllRules() in a thread running parallel to the
 one(s)
 doing insertions doesn't make sense to me.

 -W

 On 08/05/2012, gboro54 lt;gboro54@gt; wrote:
 I am not currently using agenda-groups. I believe my issue right now
 is
 one
 of thread safety. A little background: I currently have a thread
 pulling
 messages from a database running on the main thread. In several other
 threads, I have drools session being fired every so often. It appears
 that
 there may be a some type of deadlock caused by invoking fireAllRules
 on
 one
 thread, while another is trying to insert. I am working through right
 now
 to
 debug the issue. Has anyone else experienced this issue?


 Vincent Legendre wrote

 I am having an issue where I have a catch all
 retraction rule setup as the lowest salience.

 Not sure to understand that (note that I am not english native ...)

 I see activations created for the facts but they are never fired. 
 Any
 thoughts on why this may happen?

 Send some rules. Activations never fired is just too vague to have a
 single answer.
 If you use agenda groups, may be that the group is simply not on
 focus
 ...

 Add a first rule that set the focus, or set auto-focus for all your
 low
 salience rules, or don't set agenda group for them (their group will
 be
 the MAIN group).

 The session is run on a separate thread with fireAllRules called
 every
 1/2
 second. I have tried syncronizing inserts on the session so that
 thread
 would not be in the middle of firing when new facts come in but that
 does
 not seem to do anything

 Why not using fireUntilHalt instead ?
 Run your session.fireUntilHalt in a separate thread, and insert
 things
 in
 that session.
 insert (or update or retract) will wake up the session.

 Of course, one day, you have to call halt() on your session to get
 out.
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/agenda-groups-tp3968541p3971147.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users

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



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/agenda-groups-tp3968541p3971245.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users

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


--
View this message in context: 
http://drools.46999.n3.nabble.com/agenda-groups-tp3968541p3971415.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] Creating a business process programatically, Jbpm5 tutorials for beginners

2012-05-08 Thread Ahmed Feki
Hi,

i m a jbpm5 beginner and i m reading the  Drools Developer's Cookbook
-[Packt Publishing, Jan 2012] and on its chapter 9 :jBPM5: Managing
,Business Processes there is a sample project for Creating a business
process manually (creating-process-using-the-api) in i which there is an
EventNode instanciation :



EventNode eventNode = new EventNode();

eventNode.setName(EventNode);

eventNode.setId(2);

eventNode.setScope(external);

EventTypeFilter eventFilter = new EventTypeFilter();

eventFilter.setType(eventType);

eventNode.addEventFilter(eventFilter);





i want to understand what the eventNode.setScope(external); means and
also about filters.

i googled for the jbpm-flow-builder API but didnt find any documentation.

i dont know where to find some tuorials for these stuffs..



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


[rules-users] Fwd: Creating a business process programatically, Jbpm5 tutorials for beginners

2012-05-08 Thread Ahmed Feki
-- Forwarded message --
From: Ahmed Feki feki.ahmed@gmail.com
Date: 2012/5/8
Subject: Creating a business process programatically, Jbpm5 tutorials for
beginners
To: Rules Users List rules-users@lists.jboss.org


Hi,

i m a jbpm5 beginner and i m reading the  Drools Developer's Cookbook
-[Packt Publishing, Jan 2012] and on its chapter 9 :jBPM5: Managing
,Business Processes there is a sample project for Creating a business
process manually (creating-process-using-the-api) in i which there is an
EventNode instanciation :



EventNode eventNode = new EventNode();

eventNode.setName(EventNode);

eventNode.setId(2);

eventNode.setScope(external);

EventTypeFilter eventFilter = new EventTypeFilter();

eventFilter.setType(eventType);

eventNode.addEventFilter(eventFilter);





i want to understand what the eventNode.setScope(external); means and
also about filters.

i googled for the jbpm-flow-builder API but didnt find any documentation.

i dont know where to find some tuorials for these stuffs..



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


[rules-users] Creating a business process programatically, Jbpm5 tutorials for beginners

2012-05-08 Thread bardelman
Hi,

i m a jbpm5 beginner and i m reading the  Drools Developer's Cookbook
-[Packt Publishing, Jan 2012] and on its chapter 9 :jBPM5: Managing
,Business Processes there is a sample project for Creating a business
process manually (creating-process-using-the-api) in i which there is an
EventNode instanciation :

 

EventNode eventNode = new EventNode();

eventNode.setName(EventNode);

eventNode.setId(2);

eventNode.setScope(external);

EventTypeFilter eventFilter = new EventTypeFilter();

eventFilter.setType(eventType);

eventNode.addEventFilter(eventFilter);

 

 

i want to understand what the eventNode.setScope(external); means and
also about filters.

i googled for the jbpm-flow-builder API but didnt find any documentation.

i dont know where to find some tuorials for these stuffs..

 

thnx for help !

--
View this message in context: 
http://drools.46999.n3.nabble.com/Creating-a-business-process-programatically-Jbpm5-tutorials-for-beginners-tp3971577.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] DRL Query and Guvnor

2012-05-08 Thread Welsh, Armand
Thanks.  Some of these things are hard to find if we don't know where to look.  
I'll keep in mind to search the issues list.

From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Michael Anstis
Sent: Tuesday, May 08, 2012 1:19 AM
To: Rules Users List
Subject: Re: [rules-users] DRL Query and Guvnor

It is on our to do list...

https://issues.jboss.org/browse/GUVNOR-1532
On 8 May 2012 01:09, Welsh, Armand 
awe...@statestreet.commailto:awe...@statestreet.com wrote:
Any plans to integrate QUERY DRL into guvnor w/o breaking the global/imports 
view?  (currently using 5.3)

___
rules-users mailing list
rules-users@lists.jboss.orgmailto: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] NoClassDefFoundError: org/eclipse/core/runtime/Plugin in fresh Drools IDE install

2012-05-08 Thread eoliphan
Hi, I've created a new Drools dev setup with the latest version of the IDE
(problem exists in Helios also), but having an issue running projects.  Have
stripped this down, and the problem exists even with a brand new project
created with the Drools wizard.  When running even the base DroolsTest in a
default project I get the following error. 

Any ideas?

---

java.lang.NoClassDefFoundError: org/eclipse/core/runtime/Plugin
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at
org.eclipse.jdt.internal.compiler.Compiler.initializeParser(Compiler.java:741)
at org.eclipse.jdt.internal.compiler.Compiler.init(Compiler.java:295)
at org.eclipse.jdt.internal.compiler.Compiler.init(Compiler.java:161)
at
org.drools.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:356)
at
org.drools.commons.jci.compilers.AbstractJavaCompiler.compile(AbstractJavaCompiler.java:49)
at
org.drools.rule.builder.dialect.java.JavaDialect.compileAll(JavaDialect.java:368)
at
org.drools.compiler.DialectCompiletimeRegistry.compileAll(DialectCompiletimeRegistry.java:53)
at 
org.drools.compiler.PackageRegistry.compileAll(PackageRegistry.java:70)
at 
org.drools.compiler.PackageBuilder.compileAll(PackageBuilder.java:844)
at 
org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:801)
at
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:385)
at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:563)
at
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:35)
at com.sample.DroolsTest.readKnowledgeBase(DroolsTest.java:40)
at com.sample.DroolsTest.main(DroolsTest.java:23)
Caused by: java.lang.ClassNotFoundException: org.eclipse.core.runtime.Plugin
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 27 more
--

--
View this message in context: 
http://drools.46999.n3.nabble.com/NoClassDefFoundError-org-eclipse-core-runtime-Plugin-in-fresh-Drools-IDE-install-tp3971867.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] using Drools global variables inside operator timer(int: variable name s)

2012-05-08 Thread Davide Sottara
Hi, there's a recently added feature that should allow you to do so.
It's the expr mode for timers:

timer( expr: delay MVEL expr here, optional period MVEL expr here ; ) 

It supports up to two valid MVEL expressions, which resolve to delay and
period. 
They need to be separated by a , if you use both, and need at ; at the
end.
The expressions need to evaluate to a timer String or to a long (assumed to
be milliseconds).
Locally bound variables are known to work, globals should be usable too

Cheers,
Davide


--
View this message in context: 
http://drools.46999.n3.nabble.com/using-Drools-global-variables-inside-operator-timer-int-variable-name-s-tp3950828p3971912.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] agenda-groups

2012-05-08 Thread Wolfgang Laun
On 8 May 2012 16:04, gboro54 gbor...@gmail.com wrote:

 Perhaps a blocking queue which has facts put on from other threads, the
 thread then inserts x number of facts and fires the rule set?


Yes, I'd say that's more like it.

If these zillions of facts aren't related, they can be processed by
disjoint sessions. So,
if you want to feed more than one CPU, run several sessions like that.

It might be desirable to have small batches of facts inserted and processed
by a single
call. You should know whether there is a way to do that...

-W



 gboro54 wrote
 
  The point is to be able to stream a large volume of messages into the
 rule
  session without tying up that thread. In addition I don't want there to
 be
  millions of messages in a session at a given point, thus the point of
  executing the rules on a different thread while inserting facts from
  another.
 
 
  laune wrote
 
  What about executing insert(s) followed by fireAllRules() in one thread?
  -W
 
  On 08/05/2012, gboro54 lt;gboro54@gt; wrote:
  What do you recommend?  firUntilHalt seems to get locked out after
  sometime... I am running out of ideas and have posted this question
  before.
  I believe we talked about periodically using fireAllRules on a separate
  thread.
 
 
  laune wrote
 
  Periodically calling fireAllRules() in a thread running parallel to
 the
  one(s)
  doing insertions doesn't make sense to me.
 
  -W
 
  On 08/05/2012, gboro54 lt;gboro54@gt; wrote:
  I am not currently using agenda-groups. I believe my issue right now
  is
  one
  of thread safety. A little background: I currently have a thread
  pulling
  messages from a database running on the main thread. In several other
  threads, I have drools session being fired every so often. It appears
  that
  there may be a some type of deadlock caused by invoking fireAllRules
  on
  one
  thread, while another is trying to insert. I am working through right
  now
  to
  debug the issue. Has anyone else experienced this issue?
 
 
  Vincent Legendre wrote
 
  I am having an issue where I have a catch all
  retraction rule setup as the lowest salience.
 
  Not sure to understand that (note that I am not english native ...)
 
  I see activations created for the facts but they are never fired.
  Any
  thoughts on why this may happen?
 
  Send some rules. Activations never fired is just too vague to have a
  single answer.
  If you use agenda groups, may be that the group is simply not on
  focus
  ...
 
  Add a first rule that set the focus, or set auto-focus for all your
  low
  salience rules, or don't set agenda group for them (their group
 will
  be
  the MAIN group).
 
  The session is run on a separate thread with fireAllRules called
  every
  1/2
  second. I have tried syncronizing inserts on the session so that
  thread
  would not be in the middle of firing when new facts come in but
 that
  does
  not seem to do anything
 
  Why not using fireUntilHalt instead ?
  Run your session.fireUntilHalt in a separate thread, and insert
  things
  in
  that session.
  insert (or update or retract) will wake up the session.
 
  Of course, one day, you have to call halt() on your session to get
  out.
  ___
  rules-users mailing list
  rules-users@.jboss
  https://lists.jboss.org/mailman/listinfo/rules-users
 
 
 
  --
  View this message in context:
 
 http://drools.46999.n3.nabble.com/agenda-groups-tp3968541p3971147.html
  Sent from the Drools: User forum mailing list archive at Nabble.com.
  ___
  rules-users mailing list
  rules-users@.jboss
  https://lists.jboss.org/mailman/listinfo/rules-users
 
  ___
  rules-users mailing list
  rules-users@.jboss
  https://lists.jboss.org/mailman/listinfo/rules-users
 
 
 
  --
  View this message in context:
  http://drools.46999.n3.nabble.com/agenda-groups-tp3968541p3971245.html
  Sent from the Drools: User forum mailing list archive at Nabble.com.
  ___
  rules-users mailing list
  rules-users@.jboss
  https://lists.jboss.org/mailman/listinfo/rules-users
 
  ___
  rules-users mailing list
  rules-users@.jboss
  https://lists.jboss.org/mailman/listinfo/rules-users
 
 


 --
 View this message in context:
 http://drools.46999.n3.nabble.com/agenda-groups-tp3968541p3971415.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

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


[rules-users] Complex pattern

2012-05-08 Thread rcano
Hi there,

I've been struggling for almost a day now, trying to create a pattern that goes 
something as follows (notice it doesn't compile):

rule Complex pattern
when
  $triviaResponse : TriviaResponseArrived($matchers: matchers)
  $subscriptions : ArrayList() from collect (
$s: Subscription()
$lock: Lock(object == $s)
exists SubscriptionMatcher(matches($s)) from $matchers
  )
then
  logger.info(NO TRANSACTION, Selected subscriptions  + $subscriptions);
end

where TriviaResponseArrived, contains a List of SubscriptionMatchers (a simple 
object which just returns true or false when its matches method is called).
Upon receiving this TriviaResponseArrived fact, I'm trying to select all 
subscriptions from the working memory, for which there is also a Lock, and that 
there exists a matcher within the matchers
list that validates it. To sum up, all subscriptions in the list subscription, 
should be locked, and matched by a matcher in the triviaResponseArrived fact.

The closes I've managed to come is: 

rule Complex pattern
when
  $triviaResponse : TriviaResponseArrived($matchers: matchers)
  $subscription : Subscription()
  $lock: Lock(object == $subscription)
  exists SubscriptionMatcher(matches($subscription)) from $matchers
then
  logger.info(NO TRANSACTION, Subscription  + $subscription);
end

Which is not quite right, since I need to process all the subscription that 
match the above logic at once.

As always, all help is really appreciated. Thanks.

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


[rules-users] Drools integration with Spring

2012-05-08 Thread Ini
Hi All,
 I am new to drools and have some how got through my previous
issue of updating  user defined error  object with details.
I need help in following items:

1. how to integrate the drools with my Spring application.
2. I have a scenario like i need to write different rules file for different
beans ... say i have two beans (Employee, Department) to validate for which
i have written two rules file say EmployeeRule.drl and DepartmentRule.drl
files. i have a common method where i am passing the object(either employee
or Department) that need to be checked. In this case how will i add
different drl file in KnowledgeBuilder.
Like to validate Employee bean i need to add EmployeeRule.drl file and to
validate Department bean i need to add DepartmentRule.drl file.

Hope i am making some sense here..

thanks,
Ini 

--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-integration-with-Spring-tp3973016.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