Re: [rules-users] Doubt regardging Drools-RETE

2010-11-10 Thread Mark Proctor

On 11/11/2010 07:07, Harshit Bapna wrote:

Yes Mark. It is definitely beneficial.
I would really appreciate your answer on my questions.
I have read a lot about RETE performance boost but struggling to find 
answer to my questions as my understanding on RETE is limited.
  1. If there are not many common facts i.e all rules are operating on 
distinct facts / data. Does this mean the algorithm will not   bring 
in much benefit ?
  2. Also if the facts are same but the LHS of a rule is quite 
different from others then will RETE have its benefits.
Much benefit compared to what? These are relative questions with nothing 
to relate them too. Will they have benefits related to the price of 
cheese on a sunday afternoon?


So I'll just answer yes, with the caveat that it's certainly not 
pushing the limits of our Rete or taking advantage of some of the core 
optimisations; but that's the benefit as it's an algorithm that will 
grow with your needs.


Mark

I hope learned people on rete and drools can help me on this..
2010/11/11 Mark Proctor mproc...@codehaus.org 
mailto:mproc...@codehaus.org


On 11/11/2010 05:28, Harshit Bapna wrote:

Hello everyone,
1. If there are not many common facts i.e all rules are operating
on distinct facts / data. Does this mean the algorithm will not
bring in much benefit ?
2. Also if the facts are same but the LHS of a rule is quite
different from others then will RETE have its benefits.

I have gone through the RETE algorithm documentation and RETE
node diagram chart but still finding difficulty to understand it.
Can somebody please provide a layman language link to understand
RETE.

I would forget about the algorithm and focus on the language. Does
the declarative language allow you to solve your problem in a
better way?

Mark



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



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







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


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


Re: [rules-users] Custom UI for Drools rules

2010-11-07 Thread Mark Proctor

On 08/11/2010 06:35, Balasenthil D wrote:


Hi,

Is it possible to create a custom UI to create/edit drools rules( 
instead of Drools Guvnor).  Are there APIs that let you do it?


For e.g., oracle provides a java API for create/edit rules. With this 
you can come up with your own UI, if you are not happy with jdeveloper.


Is something similar possible with Drools too?

Guvnor provides a webdav API, which it uses for team synchronisation 
with eclipse. You can probably use that in a custom UI environment.


What UI are you looking to make, will it be useful to others and do you 
have plans to OSS it under ASL?


Mark


Thank you

Bala

 CAUTION - Disclaimer *
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
for the use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further, you are 
not
to copy, disclose, or distribute this e-mail or its contents to any other 
person and
any such actions are unlawful. This e-mail may contain viruses. Infosys has 
taken
every reasonable precaution to minimize this risk, but is not liable for any 
damage
you may sustain as a result of any virus in this e-mail. You should carry out 
your
own virus checks before opening the e-mail or attachment. Infosys reserves the
right to monitor and review the content of all messages sent to or from this 
e-mail
address. Messages sent to or from this e-mail address may be stored on the
Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***


___
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] Performance monitoring and hotspot detection in rules?

2010-11-07 Thread Mark Proctor
On 07/11/2010 21:59, H.C. wrote:
 Mark,

 Thanks for your reply. I figured 3 and 4 were currently possible but 1 and 2
 puzzled me.

 it interates from root to tip repeatedly, so you can't easily determine how
 long it spends in each node

 Sorry, looks like my prior statement (#2) was misleading. Actually, I don't
 care so much about timing each condition of a rule but are looking to get
 the total time it takes to evaluate all conditions of a rule.
This isn't possible as conditions are shared amoung rules and a rule's 
conditions are not tested all at the time time, but incrementally as 
knowledge is added that matches that rule. The best you can get is the 
time it takes to evaluate all conditions for all rules by testing the 
time it takes for an insert to do.
 I am not
 looking to break out statistics for each conditional statement of the rule.
 Would this be easier/possible to do or does it face the same issues?
same issue.
 Thanks so much...was good talking to you guys at Rules Fest.


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


Re: [rules-users] Performance monitoring and hotspot detection in rules?

2010-11-06 Thread Mark Proctor
On 05/11/2010 20:52, H.C. wrote:
 I am trying to implement a performance monitor to find the most problematic
 rules in order to optimize performance. The main performance metrics I want
 to gather are:

 1. How any times a rule's conditions have been evaluated
 2. How long each rule's condition evaluation took
1 and 2 are hard because it's not that straight forward, it's not a 
single block. And the tree traversal approach to our current Rete impl 
means it interates from root to tip repeatedly, so you can't easily 
determine how long it spends in each node, you could probably add a 
counter but this would be custom code. We ar working on an new algorithm 
that is single pass, more like a pipeline, which will make ti easier to 
get statistics and timings.
 3. How many times a rule's then clause actually executed
 4. How long execution of a rule's then clause took
That you can do with the agenda listener. Also try looking at the audit 
log impl.
 Are there any existing or recommended approaches to do this? I have looked
 some at the AgendaEventListener methods but can't clearly map events to the
 above. Is there some other logging interface with more events?

 Thanks in advance.






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


Re: [rules-users] Marshalling Error : JBRULES-2453

2010-11-04 Thread Mark Proctor

On 04/11/2010 08:36, Michael Anstis wrote:
If it's impossible to debug *with* a test case imagine how difficult 
it must be without one!

hehe, yes meant without :)

Mark


;-)

On 4 November 2010 04:49, Mark Proctor mproc...@codehaus.org 
mailto:mproc...@codehaus.org wrote:


On 03/11/2010 15:01, drooRam wrote:
 bump
you'll need to make a minimal self contained test that removes
everything but what is necessary to show the problem, then attach
it as
a jira. The marshalling stuff is very cryptic and impossible to debug
with a test case.

Mark

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



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


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


Re: [rules-users] Marshalling Error : JBRULES-2453

2010-11-03 Thread Mark Proctor
On 03/11/2010 15:01, drooRam wrote:
 bump
you'll need to make a minimal self contained test that removes 
everything but what is necessary to show the problem, then attach it as 
a jira. The marshalling stuff is very cryptic and impossible to debug 
with a test case.

Mark

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


Re: [rules-users] Starting resource change scanner and notifier in drools-server.

2010-11-03 Thread Mark Proctor

It won't detect changes on the classpath. Needs to be file or http.

Mark
On 03/11/2010 21:49, Jason Davidson wrote:

Hello,

Any tips on this?  I'm seeing this same behavior using Drools 5.1.1:

Spring Beans:

!-- Drools : --

drools:resource-change-scannerid=scannerinterval=10/

drools:kbaseid=ruleKBase

/drools:kbase

drools:kagentid=kagent1kbase=ruleKBase

drools:resources

drools:resourcetype=CHANGE_SETsource=classpath:drools-changeset.xml/

/drools:resources

/drools:kagent


Changeset:

change-setxmlns='http://drools.org/drools-5.0/change-set'

xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'

xs:schemaLocation='http://drools.org/drools-5.0/change-set 
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/main/resources/change-set-1.0.0.xsd'


add

resourcesource=http://10.1.109.54:8080/drools-5.1.1-guvnor/org.drools.guvnor.Guvnor/package/com.cjs.jworks.rules.cases/LATEST;

type='PKG'basicAuthentication=enabledusername=adminpassword=admin/

/add

/change-set



At startup I see that the KnowledgeAgent registers a listener but 
never detects changes:


[2010:11:307 15:11:506:info] ResourceChangeScanner reconfigured with 
interval=60


[2010:11:307 15:11:506:info] ResourceChangeScanner created with 
default interval=60


[2010:11:307 15:11:506:info] ResourceChangeScanner reconfigured with 
interval=10


[2010:11:307 15:11:528:info] ResourceChangeNotification created

[2010:11:307 15:11:528:debug] ResourceChangeNotification monitor added 
monitor=org.drools.io.impl.resourcechangescanneri...@616181be


[2010:11:307 15:11:529:debug] KnowledgeAgent building resource map

[2010:11:307 15:11:529:info] KnowledegAgent has started listening for 
ChangeSet notifications


[2010:11:307 15:11:529:info] KnowledgeAgent created, with configuration:

monitorChangeSetEvents=true scanResources=true scanDirectories=true 
newInstance=true


[2010:11:307 15:11:530:info] KnowledgeAgent applying ChangeSet

[2010:11:307 15:11:531:debug] KnowledgeAgent processing sub 
ChangeSet=[ClassPathResource path='drools-changeset.xml']


[2010:11:307 15:11:919:debug] KnowledgeAgent notifier subscribing to 
resource=[UrlResource 
path='http://10.1.109.54:8080/drools-5.1.1-guvnor/org.drools.guvnor.Guvnor/package/com.cjs.jworks.rules.cases/LATEST']


[2010:11:307 15:11:920:debug] ResourceChangeNotification subscribing 
listener=org.drools.agent.impl.knowledgeagenti...@d2a7c1e to 
resource=[UrlResource 
path='http://10.1.109.54:8080/drools-5.1.1-guvnor/org.drools.guvnor.Guvnor/package/com.cjs.jworks.rules.cases/LATEST']


[2010:11:307 15:11:920:debug] ResourceChangeScanner subcribing 
notifier=org.drools.io.impl.resourcechangenotifieri...@603a9c52 to 
resource=[UrlResource 
path='http://10.1.109.54:8080/drools-5.1.1-guvnor/org.drools.guvnor.Guvnor/package/com.cjs.jworks.rules.cases/LATEST']


[2010:11:307 15:11:920:debug] KnowledgeAgent rebuilding KnowledgeBase 
using ChangeSet



Thanks!

Jason


2010/9/23 Clandes Tino clandestino_...@yahoo.co.uk 
mailto:clandestino_...@yahoo.co.uk


Hi,
I've also faced the same problem.
Hope somebody could give a hint.
thanks  best,
milan

--- On *Mon, 20/9/10, Graham Thomson /gthom...@fizzback.com
mailto:gthom...@fizzback.com/* wrote:


From: Graham Thomson gthom...@fizzback.com
mailto:gthom...@fizzback.com
Subject: [rules-users] Starting resource change scanner and
notifier in drools-server.
To: rules-users@lists.jboss.org
mailto:rules-users@lists.jboss.org
Date: Monday, 20 September, 2010, 15:24



Hi,

I would like to ask for help with setting up drools-server
with Guvnor. I am using version 5.1.1 of both.

I am trying to set up an instance of drools-server in Tomcat
that periodically loads new updates of packages published in
Guvnor (both drools-server and Guvnor run in the same instance
of Tomcat).

My change set definition is as follows:

?xml version=1.0 encoding=UTF-8?
change-set xmlns='http://drools.org/drools-5.0/change-set'
http://drools.org/drools-5.0/change-set%27
  xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
http://www.w3.org/2001/XMLSchema-instance%27
  xs:schemaLocation='http://drools.org/drools-5.0/change-set

http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/main/resources/change-set-1.0.0.xsd'

http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/main/resources/change-set-1.0.0.xsd%27
add
resource

source='http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/one
of my packages/LATEST'
  type='PKG' basicAuthentication=enabled
username=username password= /
resource

source=http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/another
of my packages/LATEST
  type=PKG 

Re: [rules-users] Integration of Drools with Hadoop

2010-10-30 Thread Mark Proctor

On 31/10/2010 05:35, Roger Smith wrote:


We are working on a project to integrate Drools with Apache Hadoop, 
http://hadoop.apache.org/, and run into some road blocks. We would 
very much appreciate any suggestions/help from this list.


We have an app where we call drools rule engine inside the reducer 
task of a Hadoop map reduce job. It throws a NullPointerException when 
we the rule package resource to the knowledge builder. The same code 
works fine when run as part of a stand alone app.


Code:

private static MapString, StatefulKnowledgeSession sessions =
new HashMapString, StatefulKnowledgeSession();
private static final String RULE_PACK_DIR = 
file:///home/roger/Projects/gridx/ 
file:///%5C%5Chome%5Cpranab%5CProjects%5Cgridx%5C;

private static final String RULE_PACK_EXT = .drl;


public int process(String rulePackage, String dateTime, String 
type) throws TException {

int rate = 0;
StatefulKnowledgeSession session = sessions.get(rulePackage);
if (null == session){
KnowledgeBuilder kbuilder = 
KnowledgeBuilderFactory.newKnowledgeBuilder();
String rulePackPath = RULE_PACK_DIR + rulePackage + 
RULE_PACK_EXT;
kbuilder.add( ResourceFactory.newFileResource(rulePackPath 
), ResourceType.DRL);

if ( kbuilder.hasErrors() ) {
System.err.println( kbuilder.getErrors().toString() );
}
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());

session = kbase.newStatefulKnowledgeSession();
sessions.put(rulePackage, session);
}

ContractRule contractRule = new ContractRule();
contractRule.prepare(dateTime, type);;
FactHandle ruleHandle = session.insert(contractRule);
session.fireAllRules();
System.out.println( + contractRule);
rate = contractRule.getRate();
session.retract(ruleHandle);

return rate;
}

This line throws the exception:
kbuilder.add( ResourceFactory.newFileResource(rulePackPath ), 
ResourceType.DRL);


ResourceFactory.newFileResource just creates a file object but cleaning 
up the paths.

public FileSystemResource(File file) {
if ( file == null ) {
throw new IllegalArgumentException( File must not be null );
}
this.file = new File( StringUtils.cleanPath(file.getPath()) );
}
The code is borrowed from Spring and uses the sme cleanPath logic. Once 
the file is created it just creates the stream as so:

public InputStream getInputStream() throws IOException {
this.lastRead = getLastModified();
return new FileInputStream(this.file);
}

So it's pretty basic, the stack trace with line numbers may help. But I 
suspect you'll need to do a debug and step into the drools code at the 
point where you get the nullpointer and see what's going on.


Mark



It works fine as a stand alone app, outside hadoop

Roger Smith





___
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] build and branches

2010-10-25 Thread Mark Proctor
We now have quite a few people working on different things and the build 
is breaking a lot and those breaking it are just leaving it broken.

If you are doing feature development, can you please work in a branch 
and commit regularly there. Then sync up with trunk prior to a merge and 
make sure you do a full build there before commiting the merge.

If you are doing minor bug fixing then that is ok in trunk, but you MUST 
monitor the build closely and jump on it if it breaks.

We are looking into moving to GIT to facilitate this type of development.

Thanks

Mark

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


Re: [rules-users] Using Drools and Spring in an OSGi environment

2010-10-20 Thread Mark Proctor
  On 20/10/2010 11:26, O.S. wrote:
 Has nobody tried to get Drools-Spring working with OSGi? Otherwise it would
 be enough for me if i could configure the Kbases, KSessions and so on with
 the Drools-Spring-Syntax (drools-spring-1.0.0.xsd). Is there something like
 a DroolsConfigurationHelper ?
If you find things are missing, open a jira with the specific requests 
and hopefully add a patch for what you need too :)

Mark

 O.S. wrote:
 Hello,
 I'm actually using Drools in an OSGi environment and everything looks fine
 so far. But now I want to configure the KnowledgeBases etc. via
 Spring-XML-Configuration, like it's shown in the 5.1.1 Integration
 Guidehttp://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-integration/html_single/index.html#d0e76.
 I have read the
 Test-caseshttp://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-container/drools-spring/src/test/java/org/drools/container/spring/SpringDroolsTest.javaand
 tried to copy them, but it didn't worked. I think it's because he
 couldn't find the necessary classes (because of OSGi Classloader-Strategy
 and so on). My question is now: Has someone already tried to use Drools
 including Spring in an OSGi environment? I don't know where to start
 because
 I'm new at Drools and have never worked with Spring.

 Kind regards,

 O.S.

 ___
 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] [rules-dev] Rules Fest October 2010 and BRF 2010

2010-10-20 Thread Mark Proctor
  Just a reminder that I and others of the core team are on conference 
at the moment, so apologies for lack of responsiveness.

Mark
On 12/10/2010 01:08, Mark Proctor wrote:
Rules Fest is in full swing, http://rulesfest.org/html/home.html.
 Great attendance with around 100 people and great food :)

 Myself, Edson and Davide are here. Davide did a great lunch time talk.
 Kris will be arriving on Wednesday to help with the BootCamp.

 It's been a lot of preparation last week and we'll be very busy this
 week and next, so apologies if our responses aren't timely on mailing
 lists and irc.

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




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


[rules-users] Rules Fest October 2010

2010-10-11 Thread Mark Proctor
  Rules Fest is in full swing, http://rulesfest.org/html/home.html. 
Great attendance with around 100 people and great food :)

Myself, Edson and Davide are here. Davide did a great lunch time talk. 
Kris will be arriving on Wednesday to help with the BootCamp.

It's been a lot of preparation last week and we'll be very busy this 
week and next, so apologies if our responses aren't timely on mailing 
lists and irc.

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


[rules-users] University of Texas Austin

2010-10-04 Thread Mark Proctor
  I'm looking for locations for the next USA based conference for 
febuary (end of febuary).
http://blog.athico.com/2010/09/drools-boot-camps-2011-usa-and-emea.html

I figured most people want somewhere warm and Austin is centrally 
located. I don't know about pricing but Austin University seems to have 
nice conference facilities:
http://www.meetattexas.com/

If we do this around austin university it would be good if we could 
double up organisation with the local logic based programming groups, 
maybe a professor at Austin University wants to be actively involved? If 
anyone has any ideas, please let me know :)

Mark

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


Re: [rules-users] 5.1.1 import com.sun.tools.xjc

2010-09-30 Thread Mark Proctor
  On 30/09/2010 16:19, Barry Kaplan wrote:
 It seems that KnowledgeBuilderFactory in api now has a dependency on these
 sun packages. However the pom declares them as provided. This seems to
 imply that drools will only be run in some kind of app-server?? I had to
 manually add a bunch of dependencies just to get my drools app to compile.
 What is the rational behind this?
I think the rational was more to make it easy to work with JAXB, in 
theory if you aren't using JAXB you shouldn't need the dependency. If 
that's not working, we might have to look into an alternative way to add 
in the abstraction.

Mark



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


Re: [rules-users] Chained Rules

2010-09-28 Thread Mark Proctor

 On 06/05/2010 08:37, miguel machado wrote:

there is the 'extends' feature.. i guess that's what you're looking for.

rule xyz
...
end

rule abc extends xyz...
...
end

it's been recently talked about in this forum.
_ miguel

and rule flow.

Mark



On Tue, May 4, 2010 at 10:46 AM, djb dbrownel...@hotmail.com 
mailto:dbrownel...@hotmail.com wrote:



Hi all,

I know there are some basic ways to chain rules together, by
setting flags
in consequences that are checked in the conditions of other rules...

but in a large system based on rule templates, where thousands of
rules are
generated, it is not feasible to chain rules in this manner,
especially when
they are chained in a somewhat arbitrary fashion
(eg. True if Rule 130 AND Rule 200 AND Rule 480 fire)

has anyone had this situation before?  would I need to execute
this as a
post-processing step?  or, is there any design pattern that will
allow rules
to be chained, preferably in a manageable way?

regards,
Daniel
--
View this message in context:

http://drools-java-rules-engine.46999.n3.nabble.com/Chained-Rules-tp775491p775491.html
Sent from the Drools - User mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org mailto:rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users




--
To understand what is recursion you must first understand recursion


___
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] Challenge! Using javassist and drools presents an issue with drl

2010-09-28 Thread Mark Proctor
  On 29/04/2010 09:38, Swindells, Thomas wrote:
 Isn't the simplest solution just to add the imports at the start of the 
 imported drl file?
 That is the users don't need to worry about writing the imports but before 
 you feed the files into your code simply prepends the required imports.

 You can do this easily in memory with something like the following:
 StringWriter drlContents = new StringWriter();
 drlContents.write(import ...\n);
 FileInputStream stream = new FileInputStream(drlFile);
 InputStreamReader inR = new InputStreamReader(stream, UTF-8);
 IOUtils.copy(inR, drlContents);
 kbuilder.add(ResourceFactory.newReaderResource(new 
 StringReader(drlContents.toString())), 
 ResourceType.DRL);
Make sure you generate the classes first and put them into a 
classloader. Then specify that ClassLoader as the root classload to the 
kbuilder and kbase configurations.

Mark
 Thomas

 -Original Message-
 From: rules-users-boun...@lists.jboss.org [mailto:rules-users-
 boun...@lists.jboss.org] On Behalf Of Dave Cracauer
 Sent: 28 April 2010 19:35
 To: Rules Users List; rules-users@lists.jboss.org
 Subject: Re: [rules-users] Challenge! Using javassist and drools presents an
 issue with drl


 It sounds like the stated goal is to make things easier for non-developers to
 write rules. What about a dsl?

 What about using a templating language?  I have used velocity in the past for
 dynamically generating rules based on templates, and I think that there is
 built in support for templates using mvel.

 -Original Message-
 From: markricardmarkric...@gmail.com
 Sent: Apr 28, 2010 11:53 AM
 To: rules-users@lists.jboss.org
 Subject: Re: [rules-users] Challenge! Using javassist and drools presents an
 issue with drl

 Perhaps there is an easier way to ask this question

 Rather than having to do an 'import' of a class in a drl text file, is there
 a way in the Java code that constructs the KnowledgeBase to via java
 dynamically import any class file required by any drl file that is added?

 Instead of the drl having:

 import com.foo.Instance;
 rule Walgreens Test
 

 It just has:

 rule Walgreens Test
 


 And in the KnowledgeBuilder does something like this:

 KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
 kbuilder.addImport(com.foo.Instance);
 ...



 --
 View this message in context: http://drools-java-rules-
 engine.46999.n3.nabble.com/Challenge-Using-javassist-and-drools-presents-an-
 issue-with-drl-tp763086p763118.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

 **
 This message is confidential and intended only for the addressee. If you have 
 received this message in error, please immediately notify the 
 postmas...@nds.com and delete it from your system as well as any copies. The 
 content of e-mails as well as traffic data may be monitored by NDS for 
 employment and security purposes. To protect the environment please do not 
 print this e-mail unless necessary.

 NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 
 4EX, United Kingdom. A company registered in England and Wales. Registered 
 no. 3080780. VAT no. GB 603 8808 40-00
 **

 This message is confidential and intended only for the addressee. If you have 
 received this message in error, please immediately notify the 
 postmas...@nds.com and delete it from your system as well as any copies. The 
 content of e-mails as well as traffic data may be monitored by NDS for 
 employment and security purposes.
 To protect the environment please do not print this e-mail unless necessary.

 An NDS Group Limited company. www.nds.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] Is RETE algo optimizes the performance in a stateless session.

2010-09-24 Thread Mark Proctor

 On 24/09/2010 16:18, Leonardo Gomes wrote:

Have a look here: http://www.drdobbs.com/184405218

here: http://blog.athico.com/2007/07/sequential-rete.html

and here: http://herzberg.ca.sandia.gov/guidelines.shtml

The easy answer for your question is Yes ;-)

It depends :)

In general a stateless session is just a convenience api for stateful, 
it just wraps. So no performance gain at all.


There is a sequential mode, but in all honest you won't get any 
measurable perf gain. So I wouldn't use sequential mode for performance, 
the only reason to use it is if you want your rules to execute sequentially.


Mark


Cheers,
Leo.

2010/9/24 Harshit Bapna hrba...@gmail.com mailto:hrba...@gmail.com

Hi All,

In a scenario where lets say 10 rule are to be fired (in any
order) in a stateless session than will I get the benefits of RETE
algorithm (i.e increased performance).
i.e Whether the engine will fire all the ten results in a parallel
fashion or Whether the engine will file each rule one by one.

How RETE algorithm will improve the performance of the engine for
rules fired in stateless session ?


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



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


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


Re: [rules-users] Ruleflow and events

2010-09-22 Thread Mark Proctor
  On 22/09/2010 06:57, pieter wrote:
 I am using drools version 5.1.0.M1
5.1.1 is out now, please try that fitst.
 Thanks
 Pieter

 On Wed, 2010-09-22 at 07:38 +0200, pieter wrote:
 Hi,

 I have a foreach node with a composite node nested inside it. In the
 composite node I have an exception handler defined and a fault node. The
 exception handler calls

 context.getProcessEngine().signalEvent(MyFaultType,
 context.getVariable(MyFaultVariable));

 However if the MyFaultType event node is nested in either the foreach or
 composite node then the process engine can not find it. It only finds it
 if the event node is outside both the foreach and composite node.

 Caused by: java.lang.IllegalArgumentException: Unknown node id: 57
  at 
 org.drools.workflow.core.impl.NodeContainerImpl.getNode(NodeContainerImpl.java:46)
  at 
 org.drools.workflow.core.node.CompositeNode.getNode(CompositeNode.java:33)
  at 
 org.drools.workflow.core.node.ForEachNode.internalGetNode(ForEachNode.java:102)
  at 
 org.drools.workflow.instance.impl.NodeInstanceImpl.getNode(NodeInstanceImpl.java:91)
  at 
 org.drools.workflow.instance.node.EventNodeInstance.getEventNode(EventNodeInstance.java:66)
  at 
 org.drools.workflow.instance.node.EventNodeInstance.signalEvent(EventNodeInstance.java:36)
  at 
 org.drools.workflow.instance.node.CompositeNodeInstance.signalEvent(CompositeNodeInstance.java:219)
  at 
 org.drools.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent(WorkflowProcessInstanceImpl.java:278)

 Is this expected behavior?

 I am trying to have the foreach loop continue after the fault is raised.

 Thanks
 Pieter


 ___
 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] DroolsjBPM Boot Camps 2011 USA and EMEA (Rules, Workflow, Event Processing and Ontologies)

2010-09-22 Thread Mark Proctor



We are looking into an end of February date to do the next week long 
Boot Camp, location to be decided - proposals for USA so far are 
Chicago, Austin and Miami. The EMEA one will be Berlin, probably 
overlapping with the 2011 JudCon.


The last boot camp had a medical focus and was a huge success. We have 
more budget this year so hoping to build on that.


We are thinking of doing a Monday optional 1 day pre-conference basics 
day, to avoid repeating the what is a process, what is a rule, what is 
an event type talks. This also means we don't bore returning people 
with repeated content and that everyone there has the basics.


Then follow up with 2 days of applied industry talks split into 
vertical tracks. Because of the high level of interest and success 
last time, we will run a dedicated 2 day Medical/Healthcare track again. 
Whether we run dedicated or mixed tracks for other verticals depends on 
interest and people's willingness to present or organise and lead other 
verticals. I imagine initially we'd probably do mini tracks, say half a 
day per vertical. Some target verticals would be telecoms, commercial 
finance (trading), consumer finance (mortgage/insurance/loans), logistics.


The 4^th day would then be an organised workshop day. We'll provide 
bootable USB keys for all in attendance, so that we have a quick start 
off (previously we wasted hours getting everyone up and running with 
virtual images). The workshops will allow people to go through the very 
basic examples or the more advanced examples and infrastructure set-up 
with us on hand. Those that have their own projects and just want to 
work on that with us on hand to offer help can do so too.


The 5^th day will be more of an open floor. Some people will leave 
early, others will want to continue working through the basic examples 
and making sure they can configure and set everything up. Others will 
want dedicated discussion time to work on their own problems and ideas. 
In general it's the day where the developers will be on hand for what 
ever anyone wants -- you'll get out of it what you put in.


If you would like to present or even run and organise a vertical let me 
know. In the past I've found for a vertical to work it needs a well 
connected industry person to chair it, so we definitely need community 
people to take up the mantle here. Talks can either be What we did with 
Drools and/or jBPM or This is an industry problem use case that could 
be solved with Drools and/or jBPM or just something that we think will 
be of interest to the audience. The range of technologies covers (but 
not limited too) rules (expert systems and other derivatives domains), 
workflow, event processing and ontologies.


The event will again be free for attendance. We are thinking of opening 
it up for sponsorship to help towards food and drink.


So if you are interested in talking, organising, sponsoring or just have 
some general input then let us know - we want to progress in moving 
these events to a more industry focus and not pure technology, for that 
to happen we need YOU the community.


Mark

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


Re: [rules-users] SAML 2.0 support ?

2010-09-22 Thread Mark Proctor
  On 22/09/2010 16:38, Lavabit wrote:
 Hi,

 le Mon, 20 Sep 2010 17:03:17 +0200
 Lavabitlangou...@lavabit.com  a écrit :
 I would like to know if any of you as ever succesfully tested JBoss against a
 certified SAML 2.0 Identity Provider ?
 My question seems to be a bad one as I have no answer :-).
 So I will try to reduce the query :

 Is anybody aware of any successful JBoss testing against a SAML 2.0 Identity
 Provider ?

 Thank you very much.
I don't believe this is a question related to Drools, maybe try the 
JBoss security mailing list.

Mark
 Pierre


 ___
 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 Fusion High Availability

2010-09-21 Thread Mark Proctor

 On 21/09/2010 13:02, Thomas Peuß wrote:


Hello!

We are thinking about using Drools Fusion 5.1 for Complex Event 
Processing. We have a prototype running that consumes events from a 
Tibco JMS server. Everything works as expected. My boss is now asking 
about HA features that are available. I have read the documentation 
and found nearly nothing about HA features. In the case of Fusion you 
have long running threads working on fireUntilHalt(). So when the node 
goes down you loose all the events that live in the ksession memory. 
What possibilities do you see to run Fusion in an HA environment?



There are two bespoke solutions you can do.
1) Setup 2 or more engines and the JMS queues sends facts to both so 
that you have redundancy.
2) Keep all facts in a HA cloud, using something like infinispan, if the 
engine goes down restart it and reload the data.


Mark



Thanks for your ideas
Thomas


___
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 vs jbpm

2010-09-21 Thread Mark Proctor
  On 21/09/2010 18:07, woods5242-photogra...@yahoo.com wrote:
 Hi,
 We need a rules engine for our project and I am trying to determine the main
 differences between Drools and JBPM. Can anyone on here provide a brief
 explanation maybe offering why one is better than the other, chances of them
 being merged or one being retired over the other?  Are they competing 
 projects?
Drools Flow will be incorporated into jBPM5. The safest bet for now is 
to adopt Drools Flow, as the changes for adoptiong jBPM5 when we release 
it will be minimal.

Mark
 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] drools vs jbpm

2010-09-21 Thread Mark Proctor
  On 21/09/2010 19:44, Bernd Rücker wrote:
 Hey!

 If you asked for just a rule engine, this is nothing available in jBPM
 (which is a process engine).

 If you asked for processes and workflow then I have a follow up question
 for Mark: Is there already any timeline on jBPM 5?
Sometime next year :) There should be minimal api changes from what we 
have now on drools flow, just a bit more separation and modularity on 
the backend code.

Mark
 Cheers
 Bernd

 -Ursprüngliche Nachricht-
 Von: rules-users-boun...@lists.jboss.org
 [mailto:rules-users-boun...@lists.jboss.org] Im Auftrag von Mark Proctor
 Gesendet: Dienstag, 21. September 2010 19:52
 An: rules-users@lists.jboss.org
 Betreff: Re: [rules-users] drools vs jbpm

On 21/09/2010 18:07, woods5242-photogra...@yahoo.com wrote:
 Hi,
 We need a rules engine for our project and I am trying to determine the
 main
 differences between Drools and JBPM. Can anyone on here provide a brief
 explanation maybe offering why one is better than the other, chances of
 them
 being merged or one being retired over the other?  Are they competing
 projects?
 Drools Flow will be incorporated into jBPM5. The safest bet for now is
 to adopt Drools Flow, as the changes for adoptiong jBPM5 when we release
 it will be minimal.

 Mark
 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
 ___
 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] Schema Error with Drools spring xsd

2010-09-20 Thread Mark Proctor
  We do not maintain publicly accessible schemas. So take the xsds from 
the jar and host them somewhere locally and make the schemaLocation 
referenec that.

Mark
On 20/09/2010 15:35, Evert Penninckx wrote:
 Hi

 I had a similar problem. Since the drools jars contain the xsd I tried
 referring to them with http://drools.org/schema/drools-spring-1.0.0.xsd;.
 Didn't work. Might be because spring.schemas in
 drools-container/drools-spring/src/main/resources/META-INF has not been
 updated. If I refer to drools-spring.xsd it's solved.

 -Evert


 beans xmlns=http://www.springframework.org/schema/beans;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xmlns:context=http://www.springframework.org/schema/context;
 xmlns:tx=http://www.springframework.org/schema/tx;
 xmlns:util=http://www.springframework.org/schema/util;
 xmlns:drools=http://drools.org/schema/drools-spring;
 xsi:schemaLocation=
 http://www.springframework.org/schema/beans
 http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
 http://www.springframework.org/schema/aop
 http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
 http://www.springframework.org/schema/context

 http://www.springframework.org/schema/context/spring-context-3.0.xsd
 http://www.springframework.org/schema/tx
 http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
 http://www.springframework.org/schema/util
 http://www.springframework.org/schema/util/spring-util-3.0.xsd
 http://drools.org/schema/drools-spring
 http://drools.org/schema/drools-spring.xsd;



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


Re: [rules-users] Fwd: Early bird registration ENDS TODAY: Rules Fest 2010

2010-09-17 Thread Mark Proctor

 On 17/09/2010 19:07, Abdel Dridi wrote:

Edson,
Would you please clarify what kind of exercise you guys are planing to 
do for the Drools Bootcamp?

which level of Drools knowledge is required to attend the bootcamp?
Is it worth it for people who have been using Drools for some time now?
The morning will be talks, for those that know Drools well, it will 
mostly be what they know. The afternoon will be an open workshop, this 
means people work through examples with us onhand to help. There are 
also more experience people there who are already working on their own 
projects and just want a bit of mentoring/advice/insite, and often bring 
their code along with them. Those people will probably just code away in 
the morning, with one eye on the talks if anything interests them they 
haven't seen before. The other type of person are those wanting to 
actually hack on Drools internals adding news features.


You get the most out of the Day if you know what it is you specifically 
want and know how to ask it. What the day isn't is 8 hours of spoon fed 
step by step workshop tutorials that you would get on a training course.


In the past we used virtual machine images on a USB stick, but setting 
that up always caused a lot of problems. So this year I think we are 
going to provide bootable usb sticks with Fedora and Drools ready to go, 
so people can work through examples and just hack code.


Mark


Thanks,
Abde

2010/9/17 Edson Tirelli tire...@post.com mailto:tire...@post.com


   Hey people,

   I am glad to see that people are registering for the bootcamp
(and the conference)! Hope to meet you all there! If you've never
been to Rules Fest before (this is the 3rd year it is happening),
it is the only technical, no-fluff, conference in Rules Engines
and related technologies that I know of.  I had a great time last
2 years and I know it will not be different this year.

   And for those that did not registered yet, just a reminder, the
early bird discount ends today as per the e-mail bellow.

   Edson

-- Forwarded message --
From: *Rules Fest Association*
rules_fest_associat...@mail.vresp.com
mailto:rules_fest_associat...@mail.vresp.com
Date: 2010/9/17
Subject: Early bird registration ENDS TODAY: Rules Fest 2010
To: tire...@post.com mailto:tire...@post.com


International Rules Fest 2010 Conference

Header.jpg
*Studied, Defined, Explained, Illustrated*:
Rules  Decisioning Technologies Made Easy

Register Now Before September 17 deadline!

http://cts.vresp.com/c/?VisionArtsCommunicat/b85f095f0f/4dadcb8b59/934511bf7e
*Conference fee*:
*$399*
*Early Bird Registration*
*$349*
*Register today and save $50!*
*Conference package deal*:

* 4 nights and 3 days at the historic Dolce Hayes Mansion
  Resort
  
http://cts.vresp.com/c/?VisionArtsCommunicat/b85f095f0f/4dadcb8b59/01a454ee54
* A boot camp of choice
* Continental breakfast and lunch each day
* Discount off from the Rules Fest 2011 conference
* *$999 ($225 savings)*

*Bootcamps*

Rules Fest 2010 offers a number of hands-on tutorial and coding
sessions known as bootcamps. These events give all developers —
from novice to advanced — a chance to learn new technologies
and/or techniques while being coached by those who know them well.
All bootcamps are a full day, and they run concurrently on
Thursday, October 14th, the day after the main conference ends.

More info on Bootcamps...

http://cts.vresp.com/c/?VisionArtsCommunicat/b85f095f0f/4dadcb8b59/ba8eecf2ba



Hi ,

Dozens of the world’s top thinkers, developers , architects,
engineers and programmers from industry and academia will come
together on October 11-14 to present a single-track of 17 hot
topics reasoning, inferencing, artificial intelligence and pattern
matching  …  at the heart of many solutions to modern, complex
computing problems.
The world's only technical conference devoted to the practical
application of all rule-based and knowledge-based reasoning,
inferencing, and decisioning technologies will feature 3 days of
presentations.
*Conference Agenda

http://cts.vresp.com/c/?VisionArtsCommunicat/b85f095f0f/4dadcb8b59/6091ae8061*

Topic categories include:

* Reasoning /in Action/
* Reasoning Methodologis  Best Practices
* Reasoning and Management
* Reasoning Trends

Factoid: RulesFest 2010 speakers comprise

7 CEOs

6 Ph.D.s

4 CTOs

8 Senior Developers

1 Vice President

View abstracts

http://cts.vresp.com/c/?VisionArtsCommunicat/b85f095f0f/4dadcb8b59/23762bda94
*Click to register and save $50

http://cts.vresp.com/c/?VisionArtsCommunicat/b85f095f0f/4dadcb8b59/8f91725229*

For info: www.rulesfest.org


Re: [rules-users] URGENT - using lock-on-active or not

2010-09-16 Thread Mark Proctor
 please don't title your subjects with URGENT. i'm sure everyone's 
email here is urgent. See netiquette here:

http://www.jboss.org/drools/lists.html

Mark
On 16/09/2010 08:55, Yaniv Itzhaki wrote:


Hi All,

I have an urgent problem which I hope someone can explain it to me and 
how it can be solved.


I created 2 rules Update 1 and Update 2, basically the rules are 
the same, get all the CaseLog objects according to Category and 
Value and update the Case, which holds a list of CaseLogs, with a 
new object.


Note that in the update method I am updating the working memory by 
retracting the old log and inserting the new one.


Now for the problem:


The problem is that on one hand, when I insert a new log line all 
rules without lock-on-active re-fire. On the other hand, rules with 
lock-on-active seem to disregard the addition of the new object and 
fire only on the lines that were present when their group was activated.


Please see the rules below

Thanks

Yaniv

* *

*rule* Update 1

*salience* 4

*ruleflow-group* group1

*lock-on-active*

*when*

$case : Case()

$myLog : CaseLog( myClass == Category,

  myValue == 1 )

*then*

System.out.println(Logic: Update 1);

$case.update($myLog,40.0,*null*);

*end*

*rule* Update 2

*salience* 0

*ruleflow-group* group1

*lock-on-active*

*when*

$case : Case()

$myLog : CaseLog( myClass == Category,

  myValue == 1, $score : myScore )

*then*

System.out.println(Logic: Update 2  + $score + 5.0);

$case.update($myLog,$score + 5,*null*);

*end*


___
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 flow and BPEL (Drools 5.1)

2010-09-16 Thread Mark Proctor
  On 16/09/2010 03:29, tim wrote:
 Do you mean that there isn't embedded BPEL (i.e Apache ODE) in Drools 5.1?If
 that's true, I'll have to find other ways to support BPEL in our product.

 I find there is a guvnor-BPEL-editor component in Drools 5.1.1 source code.
 Are you planning to provide a BPEL editor in Guvnor? And in which release?
We have no plans at the moment to embed BPEL into Drools. BPMN2 is far 
supperior to BPEL and that is were our focus is.

Mark
 Thanks!


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


Re: [rules-users] Drools dependencies

2010-09-15 Thread Mark Proctor
  On 15/09/2010 11:00, Evert Penninckx wrote:
 Hello

 I'm using ant to compile and deploy a project which uses drools. I ran in
 some jar dependency problems and have a hard time understanding which
 packages are required for what and which dependent libs are really needed.

 I read the README_DEPENDENCIES file, but it's rather outdated by now. Is it
 possible to update this file?
The file is just a summary of what's defined in the maven pom.xml.

Mark

 Tnx

 Evert


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


Re: [rules-users] Drools flow and BPEL (Drools 5.1)

2010-09-15 Thread Mark Proctor
  On 15/09/2010 07:46, tim wrote:
 Hello,
 I am studying how to integrate Drools 5.1 into our product. And we will need
 a BPEL engine embedded in Drools. I read from the Drools Flow User Guide
 that the Drools Flow engine is based on a generic process engine that
 allows the definition and execution of different types of process languages,
 like for example our RuleFlow language, WS-BPEL ... But I can't find any
 documentation or examples available for using BPEL in Drools. If you have
 done something similar, please let me know. Any suggestion will be helpful!
 Thanks in advarce!
Drools Flow core engine is generic, although we provide an out of the 
box BPMN2 solution, we do not provide any BPEL functionality. You could 
write a BPEL engine ontop of Drools Flow core engine, but we haven't 
done so or plan to do so. imho don't bother with BPEL and just adopt BPMN2.

Mark

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


Re: [rules-users] Verify if an objects attribute exists

2010-09-14 Thread Mark Proctor
  Pattern( field != null, eval( someFunc( field ) ) )

Mark
On 14/09/2010 05:18, lnguyen wrote:
 Sorry here is some additional details...I hope I'm not making this sound more
 complicated than it really is but I am attempting to restrict access to view
 an account based on the logged in user.

 public class User
 {
   private Long id;

   ...
   
   private UserProfile userProfile;

 }


 public class UserProfile
 {

   private Long id;

   
   
   private User supervisor;

 }


 So I created a function called isUserMatching to determine if the
 currentUser is looking at their own account or if their supervisor is
 looking at an employees account:

 function boolean isUserMatching(User user)
 {
  User currentUser = (User) Component.getInstance(currentUser);

  User supervisor = (User) user.getUserProfile().getSupervisor();

  boolean result = false;  


  if(currentUser == user)
  {
  System.out.println(## currentUser = user is
 TRUE #);
  result = true;
  }
  else if((supervisor != null)
 (currentUser.getId().equals(supervisor.getId(
  {
   System.out.println(## currentUser = supervisor is 
 TRUE
 #);
  result = true;
  }
  else
  {
  System.out.println(## currentUser/supervisor !=
 user is FALSE #);
  }

  return result;


 }

 This function works as desired but not all users have a supervisor. What I'd
 like to know is how can I check if a supervisor is null so that I can
 prevent passing null values into functions?

 Doing this eval (isUserMatching($supervisor)) results in an runtime error
 of course when there is no supervisor.


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


Re: [rules-users] [rules-dev] Technical Rules

2010-09-14 Thread Mark Proctor

 On 14/09/2010 21:17, Leonardo Gomes wrote:
The thing is that, afaik, the DrlParser in itself doesn't give you 
something that you can use to generate the BRL XML, even for a 
well-behaved DRL. You would have to do some sort of model-to-model 
transformation that would have RuleModel as an outcome. With the 
RuleModel at hand you can easily marshal it to BRL XML.


There are visitors for the RuleModel that generate BRL XML (quite 
simple with XStream) and pure DRL, and when you want to compile a BRL 
rule package today, it uses the DRL visitor to generate the DRL that 
can be used to compile.


BRL XML: hasn't evolved lately mainly because Mark and the others are 
waiting for RuleML to become the canonical XML representation. I think 
that the BRL Schema misses a lot of things that you have today in a 
DRL and that's why nobody wanted to make the effort to have a DRL - 
BRL parser. This part risk to be completely rewritten the day they 
decide to use RuleML.
Exactly, we don't want to mature and promote a proprietary XML and waste 
the time and create the confusion from not following a standard.


I think people working on the guided editor are just doing hacks to limp 
the current xml along for the purposes of the guided editor until we can 
move to something more long term.


Mark


Having said that, I still thing that I might be wrong since I haven't 
looked much at the 5.x code except for the parts that I already knew 
from 4.0.7 :)


Cheers,
Leo.

On Tue, Sep 14, 2010 at 2:00 PM, Wolfgang Laun 
wolfgang.l...@gmail.com mailto:wolfgang.l...@gmail.com wrote:


You are right, of course.  The BRL editor has its own XML format.

I just wonder whether going through a DrlParser - DrlDumper cycle
might produce a sufficiently well-behaved DRL text that could be
easily enough transformed to the BRL XML. But nothing of this is
in the stable API, so it would be wobbly in more than one way.

-W


2010/9/14 Leonardo Gomes leonardo.f.go...@gmail.com
mailto:leonardo.f.go...@gmail.com

I might be wrong, but I think DRL - BRL is still not possible.


Just had a look at
org.drools.ide.common.server.util.BRDRLPersistence, and we
have the following:

public RuleModel unmarshal(String str) {
throw new UnsupportedOperationException(
Still not possible to convert pure DRL to
RuleModel);
}


Leo.

2010/9/14 Wolfgang Laun wolfgang.l...@gmail.com
mailto:wolfgang.l...@gmail.com

There is a short hint in the Expert Manual, subsection
4.11.3, where conversion between DRL and XML using classes
such as DrlParser and XmlDumper is discussed. A .brk is
just the native Drools XML format.

-W


On 14 September 2010 01:17, Leonardo Gomes
leonardo.f.go...@gmail.com
mailto:leonardo.f.go...@gmail.com wrote:

Hi Amisha,

You should use the user's list:
rules-users@lists.jboss.org
mailto:rules-users@lists.jboss.org for this sort of
question.

AFAIK, no you can't convert technical rules (manually
written drl) to business rules (.brl) generated with
the graphical editor using Guvnor.

Cheers,
Leo.


On Mon, Sep 13, 2010 at 10:42 PM, apatel
apa...@ondeckcapital.com
mailto:apa...@ondeckcapital.com wrote:


Hi,

Is it possible to port Technical Rules in Drools
to Business Rules? Is the
procedure posted somewhere?

Also is it possible to apply Drools Categories to
Technical Rules?

Thanks for your help,
Amisha
--
View this message in context:

http://drools-java-rules-engine.46999.n3.nabble.com/Technical-Rules-tp1468563p1468563.html
Sent from the Drools - Dev mailing list archive at
Nabble.com.
___
rules-dev mailing list
rules-...@lists.jboss.org
mailto:rules-...@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev



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



___
rules-users mailing list
rules-users@lists.jboss.org
mailto:rules-users@lists.jboss.org

Re: [rules-users] [rules-dev] Hold the Beans!

2010-09-11 Thread Mark Proctor
  These seem like two good student projects, so I updated the wiki as 
it's that time of year when students are picking up projects:
http://community.jboss.org/wiki/DroolsProjects

Please feel free to correct if some stuff I say is a bit high level or 
needs more explanation.

Mark
On 11/09/2010 08:35, Mark Proctor wrote:
 The first aspect is to allow the type and the property accessors to be 
 dynamically defined
 declare Element
 @type( nodeName )
 @property( get( $1 ) )
 end

 Where $1 is the interpolation point for the passed property name. That 
 would then allow access to Dom Elements as though they were natural 
 facts. Same can be done for Maps, or similar constructs
 declare Map
 @type( get( type )  //the type is a key in the Map
 @propert( get( $1 ) )
 end

 declare MyFact
 @type( type ) //The type is field
 @property( getProperty( $1 ) ) // all properties are via this getter
 end

 If you look at the expiremental FactTemplates you can see the guts of 
 how fields are accessed and figure out how to plumb this all up. Then 
 there is the RHS, which is a big more difficult, if you want the 
 properties supported as named fields, and not emulated getters.


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


Re: [rules-users] OWL (2 RL) reasoning support

2010-09-11 Thread Mark Proctor

 On 11/09/2010 09:29, Semweb Developer wrote:

Hi all,

as far as I know, Drools does not support a built-in ruleset for 
reasoning on OWL (2 RL) in the form of triple-based rules.
Is there any custom approach towards this field with a publicly 
available ruleset for Drools?
Davide Sottara is working on OWL support via the Manchester Syntax - we 
don't feel exposing RDF tripples to end users is a good idea.


But if the triples are pojos then you can reason over them on the LHS.

Mark


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] Virtual box dev environment

2010-09-10 Thread Mark Proctor

 On 09/09/2010 16:34, Leonardo Gomes wrote:

Hi Guys,

I'm trying to setup a drools developer environment and currently 
facing some issues with missing dependencies.


Is it still worth to install the virtual box described here: 
*http://blog.athico.com/2009/06/pre-installed-drools-development.html*

and do a svn update, etc.

Or is it completely outdated and will be harder do deal with than 
going through the regular setup?

pretty outdates now :) If the svn update works let us know :)

Mark


Thanks,
Leonardo.


___
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] What's the use of the RemoveIdentitiesOption?

2010-09-08 Thread Mark Proctor

 On 08/09/2010 10:04, Wolfgang Laun wrote:
I do understand both ways of the AssertBehaviorOption, but what's the 
function of the RemoveIdentitiesOption? (This one's not in Drools 
Expert, and Javadoc doesn't explain.)
It stops self joins, although I'm not a fan of it really and it's off by 
default.

so:
A() A()

Internally is generated as:
a: A() ( this != a )

Mark


-W


___
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] JMS Messenger

2010-09-08 Thread Mark Proctor

 On 08/09/2010 12:21, Tina Vießmann wrote:
I've looked at the Drools Expert User Guide for version 5.0.  There 
it's chapter 3.3.8.5

In Drools 5.1 we recommend you use Camel, as that abstracts all messaging.

Mark


On 7 September 2010 01:14, Tina Vießmann 
tviessm...@stud.hs-bremen.de mailto:tviessm...@stud.hs-bremen.de 
wrote:


 Hi,

I'm using JMS (especially Apache ActiveMQ) in my application. Right
now,  I'm manually establishing the JMS connection, extracting my
Java
objects from the JMS messages and inserting the objects into the
knowledge base. It's simple without any hype.
Until now, I've always missed the chapter about the JMS Messenger
in the
Expert User Guide somehow. Now I've read about it, I'm asking
myself if
it can be helpful to me. But based on the short description I
can't make
really head or tail of it.


Where is it? I have Drools Expert User Guide for version 5.1.0,
and not even JMS is in it.

-W


Could someone explain its functionality more detailed to me, please?

Thank you for any help! :)
Tina
___
rules-users mailing list
rules-users@lists.jboss.org mailto:rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



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



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


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


Re: [rules-users] JMS Messenger

2010-09-08 Thread Mark Proctor

 On 08/09/2010 13:27, Tina Vießmann wrote:
In this case I would like to ask a non-Drools-question to 
Camel-experienced developers: Would it be useful in case of a very 
simple using of JMS to switch from manual to Camel or does it bring to 
many overload?


Is the recommendation written somewhere? I couldn't find anything on 
it. Maybe a sentence should state the recommendation considering the 
pipeline chapter in Drools Expert User Guide 5.0!?



http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-integration/html_single/index.html

Thanks :)
CJ


Am 08.09.2010 13:39, schrieb Mark Proctor:

On 08/09/2010 12:21, Tina Vießmann wrote:
I've looked at the Drools Expert User Guide for version 5.0.  There 
it's chapter 3.3.8.5
In Drools 5.1 we recommend you use Camel, as that abstracts all 
messaging.


Mark


On 7 September 2010 01:14, Tina Vießmann 
tviessm...@stud.hs-bremen.de 
mailto:tviessm...@stud.hs-bremen.de wrote:


 Hi,

I'm using JMS (especially Apache ActiveMQ) in my application. Right
now,  I'm manually establishing the JMS connection, extracting
my Java
objects from the JMS messages and inserting the objects into the
knowledge base. It's simple without any hype.
Until now, I've always missed the chapter about the JMS
Messenger in the
Expert User Guide somehow. Now I've read about it, I'm asking
myself if
it can be helpful to me. But based on the short description I
can't make
really head or tail of it.


Where is it? I have Drools Expert User Guide for version 5.1.0,
and not even JMS is in it.

-W


Could someone explain its functionality more detailed to me,
please?

Thank you for any help! :)
Tina
___
rules-users mailing list
rules-users@lists.jboss.org mailto:rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



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



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



___
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


[rules-users] Drools 5.1 Released

2010-09-03 Thread Mark Proctor

 http://www.theserverside.com/news/thread.tss?thread_id=60824

Drools 5.1 
http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-introduction/html_single/index.html#d0e47 
has been released. The main focus for this release has been around 
improved consumerability for users with declarative services based on 
Spring, Camel and CXF integration as well as the BPMN2 implementation 
for Flow and an improved Rete algorithm for reduced memory consumption 
providing better scalability for large number of objects.


You can get full release details here:
Drools 5.1 New and Noteworthy 
http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-introduction/html_single/index.html#d0e47

Download http://www.jboss.org/drools/downloads.html
Documentation http://jboss.org/drools/documentation.html
Drools Blog http://blog.athico.com
Oryx integration for web based BPMN2 Authoring 
http://blog.athico.com/2010/09/bpmn2-authoring-in-drools-guvnor.html



Core
JMX Monitoring
Spring, Camel and CXF integration
Knowledge Agent Incremental Change Set Support

Expert
Differential Update (reduced memory consumption for better scalability)
Channels
Live Querries
Timers and Calendars

Flow
BPMN2 (Eclipse + Web authoring)
Pluggable Variable Persistence

Guvnor
Discussions
Inbox (to monitor changes)
Bulk Importer
Built in Selector
Working Sets
Fact Constraints
Guided editor improvements
Rule Templates
Oryx integration for web based BPMN2 editing (more details here 
http://blog.athico.com/2010/09/bpmn2-authoring-in-drools-guvnor.html)


Rules Fest http://rulesfest.org/html/home.html
Don't forget about the San Jose Rules Fest Oct 2010 
http://rulesfest.org/html/home.html. It's a 3 day event of talks 
followed by a one day Boot Camp with separate rooms for Jess, 
DroolsjBPM, Grind Works and Open Rules. You may attend the talks or the 
bootcamps or both.


The Boot Camp will spend the morning introducing the 4 Drools 
technologies: Expert, Fusion, Flow and Guvnor and will additionally 
cover what's new in Drools 5.1. We will also discuss the plans for 
jBPM3, jBPM4 and Drools Flow. The afternoon will be an open floor where 
you can get time with us core developers for any questions, mentoring or 
assistance that you would like.


Thanks
Drools 5.1 wouldn't have been possible without the following people:

Core:
Mark Proctor
Edson Tirelli
Kris Verlaenen
Toni Rikkola
Geoffrey De Smet
Jervis Liu

Community:
Antoine Toulm
Wolfgang Laun
Nicolas Héron
Hadrian Zbarcea
Tihomir Surdilovic
Pablo Nussembaum
Lucaz Amador
Esteban Aliverti
Diego López León
Mauricio Salatino


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


Re: [rules-users] Shame on Progress and Savvion

2010-09-03 Thread Mark Proctor
 We just made #4 on dzone, please keep the votes coming, let's see if 
we can make #1
http://www.dzone.com/links/progress_buy_a_bridge_in_brooklyn_savvion_brms_an.html 
http://www.dzone.com/links/progress_buy_a_bridge_in_brooklyn_savvion_brms_an.html


Mark
On 03/09/2010 01:47, Mark Proctor wrote:
Progress has recently ripped off the Drools community and has offered 
nothing in return, not even a curtesy nod of accreditation for our 
hard work.. 30% of that 49mill USD would go a long way to helping us 
invest in our tooling which would benefit all of us :) and maybe the 
Drools team can have it's next team meeting in Hawaii and pay for all 
the community members to come too. Cocktails anyone? :)


http://blog.athico.com/2010/09/progress-buy-bridge-in-brooklyn-savvion.html

I'm just having a little bit of fun, at their expense, which is well 
deserved for such shockingly bad behaviour. So I would urge anyone 
else to join in and have some fun too :) Do your own blogs, polls etc 
to bring attention to this.


http://blog.athico.com/2010/09/breaking-news-have-your-vote-on-what.html

And please vote up at Digg and DZone to help raise awareness:
http://www.dzone.com/links/progress_buy_a_bridge_in_brooklyn_savvion_brms_an.html 
http://www.dzone.com/links/progress_buy_a_bridge_in_brooklyn_savvion_brms_an.html

http://digg.com/news/technology/drools_progress_buy_a_bridge_in_brooklyn_savvion_brms_and_make_del_boy_trotter_proud

Being slightly less tongue in check, this is just the reality of open 
source, I've been doing this a long time now and I know you just have 
to live with it, take the lumps with the smooth - as long as you get 
more smooth than lumps, it's still worthwhile :) At it's best it 
brings people together who collaborate and help each other and enrich 
the open-source eco system. At it's worst you have organisations such 
as Progress executing on predatory amoral tactics. The debate on 
whether all corporations are ultimately operating on degrees of 
amorality is out of scope for today :) As each year goes buy you start 
to appreciate Red Hat more for the sterling work it does in open 
source. While it would be nice if Progress got involved and 
contributed to Drools, the reality is that this doesn't both me as 
much as you think it would. It hasn't lestened the Drools community 
and technology, we still go from strength to strength, and I've always 
been more concerned about what we are doing and achieving than what 
someone else may or may not be doing with regards to taking advantage 
of our work.


Ultimately this is actually quite flattering and re-affirms the 
strength of our technology and the directions we are going. I'd rather 
have an organisation using Drools and moving it one step closing to 
being a defacto standard, than they partner with someone else or 
develop yet another rule engine splintering the market and confusing 
users. Drools Everywhere has alwas been my moto :)


However that said, anyone who knows me, knows I have a mischievous 
sense of humour and if Progress and Savvion aren't even going to at 
the very least accredit us then they are fair game and surely myself 
and the Drools community deserve a little fun at their expense :)



Mark - The Mischievous Lead


___
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] what happened to . org.drools.util.ProviderLocator in drools 5.1.1??

2010-09-03 Thread Mark Proctor

 On 03/09/2010 21:03, Jeff Parks wrote:


Upgrading from 5.0 to 5.1.1, I can't seem to find this class anymore

That's internal factory loading stuff, you probably shouldn't be using 
that anyway.


In drools-api there is org.drools.util that has similar stuff. But all 
are for internal Drools stuff, so don't expect them to stay stable. Use 
the proper Drools knowledge apis for stabiity.


Mark



___
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] Question about BPMN2 and Drools

2010-09-03 Thread Mark Proctor
  On 03/09/2010 22:48, Cristiano Gavião wrote:
 Hi,

 I'm investigating the new Oryx editor... I'm delighted with it. It's a
 such nice work :-)

 and I would like to know how will Drools to address BPMN2 diagrams with
 more than one pool/ swimlanes.

 Something like this:
 http://blog.bpmn.info/wp-content/uploads/2008/10/chor1.png, will be
 runnable by Drools flow and editable at eclipse editor?
both are a work in progress, we'll keep improving them and adding more 
features. The more community members that get involved, the faster it'll 
happen :)

Mark
 thanks

 cheers

 Cristiano


 ___
 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] Shame on Progress and Savvion

2010-09-02 Thread Mark Proctor
 Progress has recently ripped off the Drools community and has offered 
nothing in return, not even a curtesy nod of accreditation for our hard 
work.. 30% of that 49mill USD would go a long way to helping us invest 
in our tooling which would benefit all of us :) and maybe the Drools 
team can have it's next team meeting in Hawaii and pay for all the 
community members to come too. Cocktails anyone? :)


http://blog.athico.com/2010/09/progress-buy-bridge-in-brooklyn-savvion.html

I'm just having a little bit of fun, at their expense, which is well 
deserved for such shockingly bad behaviour. So I would urge anyone else 
to join in and have some fun too :) Do your own blogs, polls etc to 
bring attention to this.


http://blog.athico.com/2010/09/breaking-news-have-your-vote-on-what.html

And please vote up at Digg and DZone to help raise awareness:
http://www.dzone.com/links/progress_buy_a_bridge_in_brooklyn_savvion_brms_an.html 
http://www.dzone.com/links/progress_buy_a_bridge_in_brooklyn_savvion_brms_an.html

http://digg.com/news/technology/drools_progress_buy_a_bridge_in_brooklyn_savvion_brms_and_make_del_boy_trotter_proud

Being slightly less tongue in check, this is just the reality of open 
source, I've been doing this a long time now and I know you just have to 
live with it, take the lumps with the smooth - as long as you get more 
smooth than lumps, it's still worthwhile :) At it's best it brings 
people together who collaborate and help each other and enrich the 
open-source eco system. At it's worst you have organisations such as 
Progress executing on predatory amoral tactics. The debate on whether 
all corporations are ultimately operating on degrees of amorality is out 
of scope for today :) As each year goes buy you start to appreciate Red 
Hat more for the sterling work it does in open source. While it would be 
nice if Progress got involved and contributed to Drools, the reality is 
that this doesn't both me as much as you think it would. It hasn't 
lestened the Drools community and technology, we still go from strength 
to strength, and I've always been more concerned about what we are doing 
and achieving than what someone else may or may not be doing with 
regards to taking advantage of our work.


Ultimately this is actually quite flattering and re-affirms the strength 
of our technology and the directions we are going. I'd rather have an 
organisation using Drools and moving it one step closing to being a 
defacto standard, than they partner with someone else or develop yet 
another rule engine splintering the market and confusing users. Drools 
Everywhere has alwas been my moto :)


However that said, anyone who knows me, knows I have a mischievous sense 
of humour and if Progress and Savvion aren't even going to at the very 
least accredit us then they are fair game and surely myself and the 
Drools community deserve a little fun at their expense :)



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


Re: [rules-users] copyright violation issue on Drools

2010-09-01 Thread Mark Proctor

 On 01/09/2010 02:27, 山本 裕介 wrote:

Richard's answer was:
- I am actually currently on PTO but will get back to you as soon as 
practicable when I return.(Aug 21)
- We will not be removing those changes. Please do not continue asking about 
this matter.(Aug 31)

Yusuke Yamamoto,

A mailing list is not the right place to raise legal questions, there 
won't be many lawyers on here. I made my own opinion on how OSS 
licensing works very clear and the need for certainty. If you think I'm 
wrong then go through the Red Hat legal department and i'll obide by 
their decision.


Whatever your dispute is with Red Hat, don't take it out by needlessly 
harrasing my community and throwing your toys out of the pram; it won't 
achieve anything other than to make yourself look like a very troubled 
individual.


I've been as polite as I can, but you've harassed us on irc recently, 
despite me politely pleeding with you to leave and then decided to paste 
your own stupidity (irc log) into jira https://jira.jboss.org/o 
browse/JBRULES-2660. Now your pasting private conversations into public 
forums on a topic that no one on here cares about.


If you think your grievances are real and not achieving satisfaction 
directly with the Red Hat legal department,  then seek legal council and 
do it through the proper channels, otherwise STFU.


My guess is you are hoping to achieve your spiteful aims by being a 
bully and publicly harassing Red Hat communities and trying to publicly 
embarass Red Hat, your former employer. Unfortunately, for you, the only 
thing you are achieving is leaving a trail of google search results for 
your future employers to find, that will be on the internet FOREVER. Do 
you want them to form their opinion of youself from this thread?


So do yourself and your career a favour, take a holiday, go relax and 
put this behind you. Move forward with your life as you won't achieve 
anything positive going going down this route.


I think it's at times like this we can all learn a thing or two from 
Grand Master Yoda - Fear is the path to the dark side. Fear leads to 
anger. Anger leads to hate. Hate leads to suffering.


Mark

PS. My advice is for you not to reply to this, and let this thread die 
here, nothing positive for you can be achieved.

That's why I post this matter to this list.

On Sep 1, 2010, at 6:19 AM, Mark Proctor wrote:


Because this is a legal matter no one in my team can do anything or discuss 
anything with you, we've been instructed that everything must go through RHT 
legal. Please discuss this directly with Richard Fontana: rfont...@redhat.com

Mark


On 31/08/2010 17:41, 山本 裕介 wrote:

I have consulted RH legal dept. only to get no meaningful response.
I guess Edson is the one who commit most of these files.
The how and why they need to be uncommitted is attached to the Jira issue.

Thanks,
Yusuke

On Sep 1, 2010, at 1:34 AM, Mauricio Salatino wrote:


Hi Yusuke, good question. I'm not sure where is the right place, but you are 
only asking to rollback your changes right?
who commit all your contributions to the jboss repo?
I also saw that you mention: For several reasons, I decided to withdraw those 
contributions introduced from my spare time. 
can you mention those reasons? so we, as community can learn why you want to 
remove your contributions. I'm just curious.
Greetings.


On Tue, Aug 31, 2010 at 12:50 PM, 山本 裕介yamam...@gmail.com  wrote:
Where is the appropriate forum for copyright issues?

On Sep 1, 2010, at 12:45 AM, Greg Barton wrote:


This is not the appropriate forum for copyrighgt issues.

GreG

On Aug 31, 2010, at 9:40, 山本 裕介yamam...@gmail.com  wrote:

Hi,

There's a copyright violation issue on Drools 5.1 release.
Please remove the changes listed in the following issue.
https://jira.jboss.org/browse/JBRULES-2660

Thanks,
Yusuke
___
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



--
  - 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 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] Archived documentation for Drools 3?

2010-09-01 Thread Mark Proctor
  On 01/09/2010 08:52, Alexandros Karypidis wrote:
Hi all,

 The Drools web site only has the docs/tutorials/etc for version 4
 onwards. I am looking for archived documentation of Drools version 3.x.y
 (I am new to Drools and need to work on a legacy application written
 with that version). Does anyone happen to have it?

 Kind regards,
 Alexandros
You should be able to build the docs from here:
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/tags/3.0.6-GA/

Mark
 ___
 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] Problem with importing DrlParser and XmlDumper classes.

2010-09-01 Thread Mark Proctor

 On 01/09/2010 10:07, tom ska wrote:

Hi,
I have problem with importing and using DrlParser  XmlDumper classes. 
In Eclipse I get thoose communicate:
Discouraged access: The type DrlParser is not accessible due to 
restriction on required library [path hier]\drools-compiler.jar


I googled this problem (maybe not too long) but I haven't found a 
solution. I want to mark, that my Eclipse configuration is correct - I 
don't get error, but only warning. But this is annoying :) I tried to 
look in docs, but Drools 5.1 has no javadocs, and in Drools 5.0.'s 
javadocs there are no DrlParser and XmlDumper classes! Why? (In Drools 
5.1. Expert User Guide 4.11.4 is written that Drools 5.1. uses those 
classes). I don't understand what's going on :)
The XML stuff is unmaintained, so few people used it and it was a lot of 
work to do. Further more rather than pushing our own XML, we are waiting 
on RuleML and will hopefully adopt that as the default xml storage format.


Tehre are Drools 5.1 docs. DrlParer and XmlDumper are considered 
internal classes and as such don't get published in the main javadocs, 
which is restrictied to drools-api. This allows us to provide a clear 
delineation on what is supported and unlikely to change and what is 
likely to change.

http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/javadocs/index.html

Mark


Greetings,
tom.


___
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] Please ignore Yusuke Yamamoto do not reply (don't feed the troll)

2010-09-01 Thread Mark Proctor
  It is unfortunate that in Open Source from time to time we have to 
deal with people of a more unstable nature, the inveritable troll. see 
http://drools-java-rules-engine.46999.n3.nabble.com/Re-rules-users-copyright-violation-issue-on-Drools-td1397208.html#a1397208
 


Anyway please don't feed the troll :)
http://www.collegehumor.com/video:1926079

Mark

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


Re: [rules-users] copyright violation issue on Drools

2010-08-31 Thread Mark Proctor

 Yusuke,

At the time of your contributions to Drools and other projects you were 
a Red Hat employee. The Red Hat legal department has determined that it 
has the right to copy, modify and distribute your contributions under 
the Apache License version 2.0 and considers this matter closed. If you 
have any further need to discuss this please do so with Red Hat legal, - 
you have their contact details.


Even if you were not a Red Hat employee, which you were at the time, you 
cannot undo an OSS code contribution, that is not how OSS licensing 
works. At the time the code was contributed in good faith under the 
Apache license, you cannot then decide at a later date to change your 
mind. The OSS licenses, be it ASL or LGPL or GPL, are designed 
specifically to provide certainty in that area. Without this level of 
certainty end user OSS adoption would be a minefield as every time 
developers fall out, which happens often, one could demand all their 
code be removed and this would impact everyone who has invested time 
installing that software in production systems.


Mark


On 31/08/2010 17:41, 山本 裕介 wrote:

I have consulted RH legal dept. only to get no meaningful response.
I guess Edson is the one who commit most of these files.
The how and why they need to be uncommitted is attached to the Jira issue.

Thanks,
Yusuke

On Sep 1, 2010, at 1:34 AM, Mauricio Salatino wrote:

Hi Yusuke, good question. I'm not sure where is the right place, but 
you are only asking to rollback your changes right?

who commit all your contributions to the jboss repo?
I also saw that you mention: For several reasons, I decided to 
withdraw those contributions introduced from my spare time. 
can you mention those reasons? so we, as community can learn why you 
want to remove your contributions. I'm just curious.

Greetings.


On Tue, Aug 31, 2010 at 12:50 PM, 山本 裕介 yamam...@gmail.com 
mailto:yamam...@gmail.com wrote:


Where is the appropriate forum for copyright issues?

On Sep 1, 2010, at 12:45 AM, Greg Barton wrote:

 This is not the appropriate forum for copyrighgt issues.

 GreG

 On Aug 31, 2010, at 9:40, 山本 裕介 yamam...@gmail.com
mailto:yamam...@gmail.com wrote:

 Hi,

 There's a copyright violation issue on Drools 5.1 release.
 Please remove the changes listed in the following issue.
 https://jira.jboss.org/browse/JBRULES-2660

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





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


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




--
 - CTO @ http://www.plugtree.com http://www.plugtree.com/
 - MyJourney @ http://salaboy.wordpress.com 
http://salaboy.wordpress.com/

 - Co-Founder @ http://www.jbug.com.ar http://www.jbug.com.ar/

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



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


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


[rules-users] Rules Fest and Drools Bootcamp San Jose Oct 2010

2010-08-30 Thread Mark Proctor

 Time is ticking, so don't forget about the San Jose Rules Fest Oct 2010:
http://rulesfest.org/html/home.html

It's a 3 day event of talks followed by a one day Boot Camp with 
separate rooms for Jess, DroolsjBPM, Grind Works and Open Rules. You 
may attend the talks or the bootcamps or both:

http://rulesfest.org/html/registration.html

The BootCamp will spend the morning introducing the 4 technologies: 
expert, fusion, flow and guvnor. We will also cover what's new in Drools 
5.1. The afternoon will be an open floor where you can get time with us 
core developers for any questions, mentoring or assistance that you 
would like.


Some Sample Talks:
http://rulesfest.org/html/abstracts.html
Artificial General Intelligence Engines, and Modes of Learning 
http://rulesfest.org/html/abstracts.html#abstract-21
Using Enterprise Architecture and Knowledge Engineering to Build Mobil's 
Lube Knowledge Base and Knowledge Supply Chain 
http://rulesfest.org/html/abstracts.html#abstract-5
Building a Distributed Rules Engine: an Experience Report 
http://rulesfest.org/html/abstracts.html#abstract-6
Three Good Reasons to Adopt the W3C Rule Interchange Format (RIF) 
http://rulesfest.org/html/abstracts.html#abstract-2
Emergence of a Unified Event-Driven Business Process Management (edBPM) 
Platform http://rulesfest.org/html/abstracts.html#abstract-10
Software Practices and Experiences of Rules in CEP Applications 
http://rulesfest.org/html/abstracts.html#abstract-19


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


Re: [rules-users] Drools v5.1.0 KnowledgeAgent using Spring Beans

2010-08-25 Thread Mark Proctor
  On 25/08/2010 13:08, KiranP wrote:
 hi all,
 I am trying to configure Drools v5.1.0 [Guvnor + Spring 3.0 + Web
 App.(Tomcat)]
 i don't understand how can i do it in the simplest way
 please point to some examples or provide concept to go with

 thanks and regards,

Sorry looks like that one got missed in the documentation, luckily we 
have a unit test to show you:
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-container/drools-spring/src/test/resources/org/drools/container/spring/kagents-beans.xml


 -
 Keep Working
 KiranP


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


Re: [rules-users] Drools and Java EE

2010-08-25 Thread Mark Proctor
  Let's continue this discussin on the dev mailing list, as it's 
definitely of interest:
http://www.jboss.org/drools/lists.html

Mark
On 25/08/2010 03:50, ljnelson wrote:
 Hello; I've made a JCA resource adapter for Drools.

 I've had to hack quite a bit to get it so that the KnowledgeAgent- and
 resource-scanning-related parts don't use Threads, but, instead, use the
 JCA-supplied WorkManager and BootstrapContext#createTimer() for asynchronous
 operations (like resource scanning and notifying).

 Here are some changes it would sure be nice to see, that I needed to hack
 around in order to make it so that a KnowledgeAgent-produced KnowledgeBase
 could be shared by Java EE components in a specification compliant manner:

 1. ResourceChangeNotifierImpl#ProcessChangetSet is an inner class that is
 marked as public static, but which has a package-protected constructor.  I
 have to create a new instance of this in order to create a
 ResourceChangeNotifierImpl subclass that doesn't use threads.  I hope this
 constructor could be made public instead.  Right now I'm calling
 setAccessible(true).  Yecch.

 2. ResourceFactory#setFactoryService(): sure do wish this were public, or
 that there were another way to install a ResourceFactoryService.  I need to
 do this so that the scanner and notifier are under my control (and don't use
 Threads, but instead use Timers as provided by the JCA BootstrapContext
 class).  It appears that I do have some control here in Drools 5.1 with the
 (undocumented) ServiceRegistry interface (how do I get an instance of it?
 what does it do? is it used pervasively?), but I don't know, since it's
 undocumented, whether it's the preferred way to do this sort of thing or
 not.

 3. All this indirection is really quite clunky, especially given the
 META-INF/services facility.  Was there a good reason this was not used?  I'm
 sure there was something, because having to consult a factory for a service
 to get a provider to produce an instance of something is a bit much.

 Hacking around those limitations, I was able to produce a Drools resource
 adapter that vends KnowledgeBase instances as its user connection factories.
 This means to use it in a spec-compliant manner, you do this in your
 stateless (or stateful) session bean:

 @Resource
 private KnowledgeBase kb;

 ...and you get injected a wrapper KnowledgeBase that uses the Java EE
 container's JCA machinery to invoke operations on the shared KnowledgeBase.

 Is this something that would be interesting to other people?  If so I am
 happy to open source it.

 Thanks for a great toolkit.

 Best,
 Laird


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


Re: [rules-users] Rileflow / Domain-specific processes / thread model

2010-08-25 Thread Mark Proctor
  On 25/08/2010 13:38, jschmied wrote:
 Hi!

 When I define a ruleflow with parallel branches and have my own WorkItems in
 both branches do they get executed in parallel threads?
no

Mark
 Thanks

 juergen


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


Re: [rules-users] Difference between Rule Base and Knowledge Base

2010-08-21 Thread Mark Proctor
  rulebase is legacy, it's still there for backwards comptability.

Mark
On 21/08/2010 15:47, Swapnil Sawant wrote:
 Hi,


 I had a very basic doubt. 'Rule Base' and 'Knowledge Base' are two different 
 concepts (may be from implementation point of view )?

 I got this doubt when I was going through section '1.4.7.2. Drools execution 
 server' of drools guvnor (v5.0) where it was written like :
 The drools execution server (drools-server) module is a war which you can 
 deploy to execute knowledgebases (rulebases) remotely for any sort of 
 client application


 The thing is that , I have created Knowledge base  from changeset.xml as 
 follows :

   kagent = KnowledgeAgentFactory.newKnowledgeAgent( MyRuleAgent );
   kagent.applyChangeSet( ResourceFactory.newUrlResource( changesetUrl 
 ) );
   kbase = kagent.getKnowledgeBase();


 Now if I wish to get Rule Base corresponding to my changeset(or rather my DRL 
 file) using 'this kbase object' , how can I do that ?


 Thanks,

 Swapnil Sawant

 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] Migration from drools 5.0 to 5.1

2010-08-20 Thread Mark Proctor

 On 20/08/2010 11:28, Swapnil Sawant wrote:


Hi,

Using drools 5.0 APIs, I have written a kind of framework component 
code using which I am able to achieve following functionalities 
successfully :


- Running rules using changeset.xml

- Executing workflow

Example of framework component code can be :

- Creating knowledge agent

- Applying changeset to it

- Building knowledge base out of that agent

- Creating stateful knowledge session

- Inserting fact types into this session , fire rules and get result

Now that 5.1 stable version has been released, I want to know if I 
just replace the 5.0 jars with 5.1 jars in my framework code, would I 
be able to achieve same results as they were when I was using 5.0 API ?


Or there is/are some change/s in the APIs ?

There are no api changes. I wouldn't recommend you just stick the jars 
into an already running production environment though, as in some cases 
its src compatible but not binary compatible, due to changes in 
generics. So just make sure you recompile against those jars before 
deploying.


Mark


Thanks  Regards,

Swapnil Sawant



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


[rules-users] Left and Right Unlinking - Community Project Proposal

2010-08-20 Thread Mark Proctor
 In an effort to help encourage those thinking of learning more about 
the internals of rule engines. I have made a document on implementating 
left and right unlinking. I describe the initial paper in terms relevant 
to Drools users, and then how that can be implemented in Drools and a 
series of enhancements over the original paper. The task is actually 
surprisingly simple and you only need to learn a very small part of the 
Drools implementation to do it, as such it's a great getting started 
task. For really large stateful systems of hundreds or even thousands of 
rules and hundreds of thousands of facts it should save significant 
amounts of memory.

http://blog.athico.com/2010/08/left-and-right-unlinking-community.html

Any takers?

Mark

Introduction
The following paper describes Left and Right unlinking enhancements for 
Rete based networks:
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.45.6246 
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.45.6246


A rete based rule engine consists of two parts of the network, the alpha 
nodes and the beta nodes. When an object is first inserted into the 
engine it is discriminated against by the object type Node, this is a 
one input and one output node. From there it may be further 
discriminated against by alpha nodes that constrain on literal values 
before reaching the right input of a join node in the beta part of the 
network. Join nodes have two inputs, left and right. The right input 
receives propagations consisting of a single object from the alpha part 
of the network. The left input receives propagations consisting of 1 or 
more objects, from the parent beta node. We refer to these propagating 
objects as LeftTuple and RightTuple, other engines also use the terms 
tokens or partial matches. When a tuple propagation reaches a left or 
right input it's stored in that inputs memory and it attempts to join 
with all possible tuples on the opposite side. If there are no tuples on 
the opposite side then no join can happen and the tuple just waits in 
the node's memory until a propagation from the opposite side attempts to 
join with it. If a given. It would be better if the engine could avoid 
populating that node's memory until both sides have tuples. Left and 
right unlinking are solutions to this problem.


The paper proposes that a node can either be left unlinked or right 
unlinked, but not both, as then the rule would be completely 
disconnected from the network. Unlinking an input means that it will not 
receive any propagations and that the node's memory for that input is 
not populated, saving memory space. When the opposite side, which is 
still linked, receives a propagation the unlinked side is linked back in 
and receives all the none propagated tuples. As both sides cannot be 
unlinked, the paper describes a simple heuristic for choosing which side 
to unlink. Which ever side becomes empty first, then unlink the other. 
It says that on start up just arbitrarily chose to unlink one side as 
default. The initial hit from choosing the wrong side will be 
negligible, as the heuristic corrects this after the first set of 
propagations.


If the left input becomes empty the right input is unlink, thus clearing 
the right input's memory too. The moment the left input receives a 
propagation it re-attaches the right input fully populating it's memory. 
The node can then attempt joins as normal. Vice-versa if the right input 
becomes empty it unlinks the left input. The moment the right input 
receives a propagation it re-attaches the left input fully populating 
it's memory so that the node can attempt to join as normal.


Implementing Left and Right Unlinking for shared Knowledge Bases

The description of unlinking in the paper won't work for Drools or for 
other rule engines that share the knowledge base between multiple 
sessions. In Drools the session data is decoupled from the main 
knowledge base and multiple sessions can share the same knowledge base. 
The paper above describes systems where the session data is tightly 
coupled to the knowledge base and the knowledge base has only a single 
session. In shared systems a node input that is empty for one session 
might not be empty for another. Instead of physically unlinking the 
nodes, as described in the paper, an integer value can be used on the 
session's node memory that indicates if the node is unlinked for left, 
right or both inputs. When the propagating node attempts to propagate 
instead of just creating a left or right tuple and pushing it into the 
node. It'll first retrieve the node's memory and only create the tuple 
and propagate if it's linked.


This is great as it also avoids creating tuple objects that would just 
be discarded afterwards as there would be nothing to join with, making 
things lighter on the GC. However it means the engine looks up the node 
memory twice, once before propagating to the node and also inside of the 
node as it attempt to do 

Re: [rules-users] Migration from drools 5.0 to 5.1

2010-08-20 Thread Mark Proctor

 *KnowledgeAgentImpl
*that's an internal class you should be sticking to the interfaces and 
only that which is in drools-api.


Mark
On 20/08/2010 17:34, Swapnil Sawant wrote:
Hi Mark, Thanks for your reply. I tried migrating rules from 5.0 to 
5.1 at first. For this, I just replaced drools-core and drools-api jar 
from 5.0 to 5.1. After doing replacement, I found following error 
while building the app : *KnowledgeAgentImpl.workflowOrRuleChanged 
cannot be resolved* This was kind of flag for notifying that KB has to 
be rebuilt. Any idea how to achieve same thing in 5.1 APIs ? Also, is 
there is any documentation/article/s about migration from 5.0 to 5.1 ? 
Thanks, Swapnil Sawant


View this message in context: Re: Migration from drools 5.0 to 5.1 
http://drools-java-rules-engine.46999.n3.nabble.com/Migration-from-drools-5-0-to-5-1-tp1241398p1248668.html
Sent from the Drools - User mailing list archive 
http://drools-java-rules-engine.46999.n3.nabble.com/Drools-User-f47000.html 
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] PLEASE HELP: Possible concurrency issue in Drools

2010-08-17 Thread Mark Proctor

 On 18/08/2010 00:49, Norman C wrote:

Hi All,
I've posted on this topic twice and logged a JIRA ticket 
(https://jira.jboss.org/browse/JBRULES-2651) as well.  I've received 
no responses and the bug hasn't been updated since I logged it.

I just replied to the jira. I'm committing the fix now.

Mark
This is a serious issue as it causes my production system to freeze up 
and it has to be restarted.  It's consistently reproducible (usually 
takes a few days).
Can someone please take a quick look at the code?  Does the call to 
SingleThreadedObjectStore.addHandle in NamedEntryPoint.insert need to 
be preceded by acquiring the lock?

Thanks again for your help.
Norman


*From:* Norman C rent_my_t...@yahoo.com
*To:* rules-users@lists.jboss.org
*Sent:* Wed, August 4, 2010 11:23:55 PM
*Subject:* Re: Possible concurrency issue in Drools

I've run into this issue a few more times.  Should I log a JIRA ticket 
for this?  Any advice would be appreciated.

Thanks,
Norman


*From:* Norman C rent_my_t...@yahoo.com
*To:* rules-users@lists.jboss.org
*Sent:* Sat, July 31, 2010 9:56:26 PM
*Subject:* Re: Possible concurrency issue in Drools

All,
Just wanted to mention, I'm using version 5.0.1 of Drools.
Thanks,
Norman


*From:* Norman C rent_my_t...@yahoo.com
*To:* rules-users@lists.jboss.org
*Sent:* Sat, July 31, 2010 9:50:19 PM
*Subject:* Possible concurrency issue in Drools

Hi All,
I recently ran into an issue which I believe might point to a 
concurrency issue.  My server stopped processing new requests, so I 
did a thread dump.  In examining the dump, I found that all of the 
processing threads, save two, were blocking while trying to acquire 
the lock in NamedEntryPoint.insert.  Both of the other two threads 
appeared to be infinitely looping in the NamedEntryPoint.insert 
method.  Here are snippets of the stack traces:
ActiveMQ Session Task prio=10 tid=0x2aab0003b000 nid=0x7b98 
runnable [0x4c086000..0x4c087c90]
java.lang.Thread.State: RUNNABLEat 
org.drools.util.ObjectHashMap.remove(ObjectHashMap.java:121)at 
org.drools.common.SingleThreadedObjectStore.removeHandle(SingleThreadedObjectStore.java:150) 
 at 
org.drools.common.NamedEntryPoint.retract(NamedEntryPoint.java:296) 
at 
org.drools.common.NamedEntryPoint.retract(NamedEntryPoint.java:245) at 
org.drools.reteoo.ReteooWorkingMemory$WorkingMemoryReteExpireAction.execute(ReteooWorkingMemory.java:350) 
 at 
org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:1488) 
 at 
org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:158) 
 at 
org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:122)   
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:80) 
   at 
org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:28)at
ActiveMQ Session Task prio=10 tid=0x5a35cc00 nid=0xdf6 
runnable [0x4a268000..0x4a269a90]
java.lang.Thread.State: RUNNABLEat 
org.drools.util.AbstractHashTable.resize(AbstractHashTable.java:115) 
at org.drools.util.ObjectHashMap.put(ObjectHashMap.java:78)   at 
org.drools.common.SingleThreadedObjectStore.addHandle(SingleThreadedObjectStore.java:136) 
 at 
org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:113) 
 at 
org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:80)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:28) 
   at
So it seems like one while the first thread is holding the lock and is 
attempting to remove an object handle from the object store in 
NamedEntryPoint, the other thread is trying to resize that same object 
store in response to an addHandle call that puts it over the 
threshold.  I haven't worked out exactly how these concurrent accesses 
to the same object store by two different threads causes an infinite 
loop in both threads, but it seems like the call to 
SingleThreadedObjectStore.addHandle should be preceded by acquiring 
the lock.
Is this correct?  I can imagine that resizing a large hash map could 
potentially take a long time and thus synchronizing this call could 
impact performance, but somehow, the action of resizing the table must 
be protected in some way from adversely impacting other operations on 
the table.

Any help would be appreciated.
thanks,
Norman





___
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] Design of Rule Engine

2010-08-13 Thread Mark Proctor
  On 13/08/2010 17:44, Manav wrote:
 Hi,

 I am using the 5.x version of Drools and currently new. I am currently
 evaluating Drools for an internal

 project .

 The product's impressive and the support is absolutely superb.

 To design a new Rule Engine using Drools as the base are there any
 suggested design patters that i can take a look at ? If there are any best
 practices that should be followed and gotchas to be avoided  it would be
 great if i could read about them.


 For example if i am writing rules where two files contain a common set of 
 rules,
 is it possible to abstract out the common set of rules to a seperate DRL and
 have that DRL referenced in other DRL's ?
you can't have one drl reference another. But you can include multiple 
drls in a changset.

Mark

 These and other similar questions are what i am seeking answers to .

 Regards,
 Manav




 ___
 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] Don't forget RulesFest 2010

2010-08-13 Thread Mark Proctor
  Don't forget RuleFest 2010 this October. Edson, Kris and myself will 
be there. And the event includes a one day bootcamp for those wanting to 
discuss their projects with us or run over examples with us to hand.
http://rulesfest.org/html/home.html

Mark



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


Re: [rules-users] Drools Rule language resources Reg;

2010-08-10 Thread Mark Proctor


  
  
There is a wiki, but it's not that well maintained:
http://community.jboss.org/wiki/JBossRules

You can read any book on production rule systems and the examples
should translate pretty well. So I'd recommend the Jess book and
also the two Expert Systems books.

If you scroll down here you will see some books recommended:
http://jboss.org/drools/documentation.html
Jess in Action: Java Rule-based Systems
  Ernest Friedman-Hill
  ISBN: 1930110898
Expert Systems: Principles and Programming
  Joseph Giarratano, Gary D. Riley
  ISBN: 0534384471
Introduction to Expert Systems
  Peter Jackson
  ISBN: 0201876868
Smart Enough Systems
  James Taylour, Neil Raden
  Print ISBN-10: 0-13-234796-2
  Print ISBN-13: 978-0-13-234796-9


Mark
On 10/08/2010 12:26, Dieter D'haeyere wrote:
Resources I use:
  - the two Drools books from packt
  - The documentation that can be downloaded from the download site
  (surprise surprise ;) )
  - Some interesting sites / blogs like: 
  * http://lucazamador.wordpress.com/
  * http://blog.athico.com/
  * http://www.plugtree.com
  
  That is where I found most of the information.
  If you know about any other good resources, I am interested to
  hear about them.
  
  Btw, I didn't find a Drools wiki or forum but the community is
  quite active :)
  
  Dieter D'haeyere.
  
  
  
  2010/8/10 Murali Venugopal murali.venugo...@sifycorp.com

   
Hi,
  
  Thanks for your prompt reply. Actually, I'm not into
  middle of writing some rules. I'm working to implement
  Drools in a NMS product. Where Root-Cause Analysis is done
  to identify the exact problem in a network.
  
  I'm initially working on a POC trying to identify pros and
  cons.
  The approximate scenarios include
  
timing window
generating new co-related events
escalation, and so on
  
  
  I'm not looking for a solution here. At least, I've not
  grown to that extent in Drools. I'm expecting someone to
  guide me. Is the resources I have is sufficient or is
  there some other resources available elsewhere?
  
  To be more precise, I want to the following
  
possible keywords in a .drl file
sematics
syntax, and
usage
  
  
  Regards,
   Murali Venugopal
  

   


On 08/10/2010 03:04 PM, Dieter D'haeyere wrote:
Maybe you could post an example
  of a rule you would like to define ...
  In that way, we can spot your exact problem better
  (and maybe see what kind of documentation is still
  lacking)
  Regards,
  Dieter D'haeyere.
  
  
  
  2010/8/10 Murali Venugopal murali.venugo...@sifycorp.com

   
Hi,
  
  I'm a newbie to Drools and Rules. I see this
  Mailing list provides lot of valuable
  information regarding Drools.
  Actually I'm looking for some good resources
  which helps in writing Rules. I.e Rule Syntax
  and Semantics. It's since 3 months I have
  started showing interest in Drools. But still
  I can't proceed more than the examples given
  in the books, which is not sufficient to work
  on real time projects.
  
  I'm referring books like
  1. Drools JBoss Rules 5.0
  2. JBoss Drools Business Rules
  also,
  1. Drools documentation and Manuals.
  
  But still there's no definitive guides for
  writing rules. The Drools Documentation has
  listed all the possible keywords. But, their
  Syntax and Semantics are missing.
  I went through this entire Mailing List hoping
  someone would have asked this question before
  me. But in vain. 
  
  So, please refer/point 

Re: [rules-users] CPU Spike creating a StatefulKnowledgeSession using OSGi

2010-08-10 Thread Mark Proctor

 On 10/08/2010 17:22, David Conde wrote:

Hi Pavel,

I've changed it over to use a stateless session and I'm seeing the 
same behavior. I've done some debugging and it seems to be very slow 
loading up the SessionConfiguration due to all of the loading that 
happens in ChainedProperties.

it could well be that.

When looking for property we search the available classpaths. With OSGi 
you have to add a lot of classpaths to it, so it searches them all...


Other than telling it not to search the classpath for .properties files, 
not sure what else we can do here...


Mark


Thanks,
Dave

On 10 August 2010 13:53, Pavel Tavoda pavel.tav...@gmail.com 
mailto:pavel.tav...@gmail.com wrote:


Interesting. Normally it should be fast. Try to change your patter and
load binary compiled serialized package from disk. You can find it in
documentation.
Also consider using stateless session. Do you really need stateful
session?

Pavel

2010/8/9 David Conde dco...@calomtech.com
mailto:dco...@calomtech.com:
 Is it possible that this might be invoking the compiler when a
session is
 created? I have all of the init code in the service start call
and stored as
 members of the service for reuse but I must create a new
knowledge session
 for each run.
 Any ideas?
 Thanks,
 Dave

 -- Forwarded message --
 From: David Conde dco...@calomtech.com
mailto:dco...@calomtech.com
 Date: 9 August 2010 11:17
 Subject: Re: [rules-users] CPU Spike creating a
StatefulKnowledgeSession
 using OSGi
 To: Rules Users List rules-users@lists.jboss.org
mailto:rules-users@lists.jboss.org


 The line that it spikes on is StatefulKnowledgeSession ksession =
 kbase.newStatefulKnowledgeSession();.
 Cheers,
 Dave

 On 9 August 2010 11:09, Pavel Tavoda pavel.tav...@gmail.com
mailto:pavel.tav...@gmail.com wrote:

 Is it session creation or rule compilation?

 Pavel

 2010/8/9 David Conde dco...@calomtech.com
mailto:dco...@calomtech.com:
  Good Morning,
  I now have drools running on the Spring DM-Server but I am
seeing a CPU
  spike when creating a StatefulKnowledgeSession. I've tested
this outside
  of
  an OSGi environment and I don't see the spike. Does anyone
know any
  settings
  that I can change that might make this go away?
  Thanks,
  Dave
 
  --
  David Conde
  CTO Calom Technologies
 
 
  ___
  rules-users mailing list
  rules-users@lists.jboss.org mailto:rules-users@lists.jboss.org
  https://lists.jboss.org/mailman/listinfo/rules-users
 
 

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








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



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




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


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


Re: [rules-users] CPU Spike creating a StatefulKnowledgeSession using OSGi

2010-08-10 Thread Mark Proctor

 On 10/08/2010 19:53, David Conde wrote:
Just to let people know, I've worked around this by only creating one 
SessionConfig object and caching it i.e StatelessKnowledgeSession 
ksession = 
kbase.newStatelessKnowledgeSession((KnowledgeSessionConfiguration)getSessionConfig());. 



What seemed to be happening was ChainedProperties was trying 
Classloader lookups that were very slow when running in an OSGi 
environment.


Also with how the OSGi bundles are built the org.drools package is 
split and it makes it difficult to load up certain classes. I ended up 
having to use reflection to load up the SessionConfiguration class 
from a specific bundle. Maybe it's to do with how I'm importing the 
drools bundles into my project but it's one to watch out for if your 
using drools with OSGi.
in general you shouldn't be looking up concrete implementations, just 
using what the factory services provide in drools-api; so the split 
packages shouldn't impact. I made a few of the services avaiable as osgi 
factory services, see docs for more details.


Mark


Thanks,
Dave

On 10 August 2010 17:46, David Conde dco...@calomtech.com 
mailto:dco...@calomtech.com wrote:


ChainedProperties lives in org.drools.util.ChainedProperties and
is created in SessionConfiguration(). The call is called
during StatelessKnowledgeSession ksession =
kbase.newStatelessKnowledgeSession();.


On 10 August 2010 17:36, Pavel Tavoda pavel.tav...@gmail.com
mailto:pavel.tav...@gmail.com wrote:

Can't you avoid using ChainedProperties, what is it? Can you send
piece of code where you create session?

Pavel


2010/8/10 David Conde dco...@calomtech.com
mailto:dco...@calomtech.com:
 Hi Pavel,
 I've changed it over to use a stateless session and I'm
seeing the
 same behavior. I've done some debugging and it seems to be
very slow loading
 up the SessionConfiguration due to all of the loading that
happens in
 ChainedProperties.
 Thanks,
 Dave

 On 10 August 2010 13:53, Pavel Tavoda
pavel.tav...@gmail.com mailto:pavel.tav...@gmail.com wrote:

 Interesting. Normally it should be fast. Try to change your
patter and
 load binary compiled serialized package from disk. You can
find it in
 documentation.
 Also consider using stateless session. Do you really need
stateful
 session?

 Pavel

 2010/8/9 David Conde dco...@calomtech.com
mailto:dco...@calomtech.com:
  Is it possible that this might be invoking the compiler
when a session
  is
  created? I have all of the init code in the service start
call and
  stored as
  members of the service for reuse but I must create a new
knowledge
  session
  for each run.
  Any ideas?
  Thanks,
  Dave
 
  -- Forwarded message --
  From: David Conde dco...@calomtech.com
mailto:dco...@calomtech.com
  Date: 9 August 2010 11:17
  Subject: Re: [rules-users] CPU Spike creating a
StatefulKnowledgeSession
  using OSGi
  To: Rules Users List rules-users@lists.jboss.org
mailto:rules-users@lists.jboss.org
 
 
  The line that it spikes on is StatefulKnowledgeSession
ksession =
  kbase.newStatefulKnowledgeSession();.
  Cheers,
  Dave
 
  On 9 August 2010 11:09, Pavel Tavoda
pavel.tav...@gmail.com mailto:pavel.tav...@gmail.com wrote:
 
  Is it session creation or rule compilation?
 
  Pavel
 
  2010/8/9 David Conde dco...@calomtech.com
mailto:dco...@calomtech.com:
   Good Morning,
   I now have drools running on the Spring DM-Server but
I am seeing a
   CPU
   spike when creating a StatefulKnowledgeSession. I've
tested this
   outside
   of
   an OSGi environment and I don't see the spike. Does
anyone know any
   settings
   that I can change that might make this go away?
   Thanks,
   Dave
  
   --
   David Conde
   CTO Calom Technologies
  
  
   ___
   rules-users mailing list
   rules-users@lists.jboss.org
mailto:rules-users@lists.jboss.org
   https://lists.jboss.org/mailman/listinfo/rules-users
  
  
 
  ___
  rules-users mailing list
  rules-users@lists.jboss.org
mailto:rules-users@lists.jboss.org
  https://lists.jboss.org/mailman/listinfo/rules-users
 
 

Re: [rules-users] Missing Drools Pipeline

2010-08-09 Thread Mark Proctor
  On 09/08/2010 16:20, Thorsten wrote:
 Hello out there,

 I just installed the Drools 5.1 final and have read the updated
 documentation of Expert and Fusion. I wonder what happend to the
 Pipeline-classes? It seems like they are no longer inside the packages.
 Do you have more information?
pipeline was an experimentation for how to use drools within a service 
architecture. We've now deprecated that in favour of using spring and 
camel. However drools-pipeline.jar is still there for those that were 
using it. But I'd strongly recommend you invest your time in camel, it's 
far superior.

Mark

 Thanks and regards
 Thorsten

 ___
 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.1 overview

2010-08-05 Thread Mark Proctor

 On 05/08/2010 10:44, miguel machado wrote:

Hi all,

I just recently noticed that drools 5.1 is out and i'd like to 
congratulate the jboss team for this great milestone achievement. I've 
also noticed that there is separate documentation for this version on 
http://jboss.org/drools/documentation.html but i haven't been able to 
find the major updates on the project, since 5.0.0.


I presume the /changelog/ so far is huge, so what I was looking is 
some kind of blog post or release announcement so i can update a few 
reports i've been writing on drools features, modules, architecture, 
API, requirements, integration mechanisms, etc.


Any help is very much appreciated.
Thanks in advance,
_ miguel

http://downloads.jboss.com/drools/docs/5.1.0.34406.FINAL/drools-introduction/html/ch02.html#d4e33




--
To understand what is recursion you must first understand recursion


___
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] KnowledgeAgent and OSGI

2010-08-04 Thread Mark Proctor

 The set of OSGi bundles dependencies can be used here:
http://www.jboss.org/drools/downloads.html

We test against spring:
http://fisheye.jboss.org/browse/JBossRules/trunk/osgi-bundles/org.drools.osgi.test/src/test/java/org/drools/osgi/integrationtests/SimpleOsgiTest.java

This is our project that builds osgi-bundles and does some testing of 
Drools against OSGi:

http://fisheye.jboss.org/browse/JBossRules/trunk/osgi-bundles/

I have done some minimal OSGi docs. OSGI is stil la work in progress for 
us and we have only osgi-ified some aspects Drools, although we have 
done extensive work on the classloaders to make it fit better.

https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-integration/html/ch05.html

Please do test what we have, maybe help us OSGi-ify other aspects of drools.

Mark
On 04/08/2010 10:25, David Conde wrote:

Hi,

I'm trying to get drools-core and drools-compiler 5.1 running on 
spring dm-server. Does anyone have the minimal list of OSGi bundles as 
maven dependencies handy?


Thanks,
Dave

On 25 June 2010 13:59, mmarmol marcelo.mar...@gmail.com 
mailto:marcelo.mar...@gmail.com wrote:



Hi, I have managed to install Drools-core and Drools-compiler in
my Equinox
osgi environment, I can compile rules and execute them just fine,
I was just
wandering how to configure a KnowledgeAgent using
KnowledgeBuilderFactoryService and KnowledgeBaseFactoryService. I
managed to
configure one but i am not able to reload rules when they change
at runtime.
I have started ResourceChangeScannerService and
ResourceChangeNotifierService, changeset related to the rules file
gets read
but no change gets implemented. An idea?


Here is the code:

 
 ResourceFactory.getResourceChangeScannerService().start();
 
 ResourceFactory.getResourceChangeNotifierService().start();


   ServiceReference serviceRef = bc
 
 .getServiceReference(ServiceRegistry.class.getName());

   ServiceRegistry registry = (ServiceRegistry)
bc.getService(serviceRef);

   KnowledgeBuilderFactoryService
knowledgeBuilderFactoryService = registry
 
 .get(KnowledgeBuilderFactoryService.class);


   KnowledgeBaseFactoryService
knowledgeBaseFactoryService = registry
 
 .get(KnowledgeBaseFactoryService.class);

   ResourceFactoryService resourceFactoryService =
registry
   .get(ResourceFactoryService.class);

   KnowledgeBuilderConfiguration kbConf =
knowledgeBuilderFactoryService
 
 .newKnowledgeBuilderConfiguration(null, getClass()

   .getClassLoader());

   KnowledgeBuilder kbuilder =
knowledgeBuilderFactoryService
   .newKnowledgeBuilder(kbConf);
   ResourceFactoryService resource =
resourceFactoryService;
   kbuilder.add(resource.newFileSystemResource(filePath),
   ResourceType.CHANGE_SET);

   if (kbuilder.hasErrors()) {
   System.out.println(kbuilder.getErrors());
   throw new
RuntimeException(kbuilder.getErrors().toString());
   }

   KnowledgeBaseConfiguration kbaseConf =
knowledgeBaseFactoryService
 
 .newKnowledgeBaseConfiguration(null, getClass()

   .getClassLoader());

   KnowledgeBase kbase = knowledgeBaseFactoryService
   .newKnowledgeBase(kbaseConf);
 
 kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());


   KnowledgeAgentConfiguration aconf =
   KnowledgeAgentFactory.newKnowledgeAgentConfiguration();
   aconf.setProperty(drools.agent.scanDirectories,
true);
   aconf.setProperty(drools.agent.scanResources,
true);
   aconf.setProperty(drools.agent.newInstance, false);

   kagent = KnowledgeAgentFactory.newKnowledgeAgent(
CoreDroolsAgent,kbase,
aconf);
 
 kagent.applyChangeSet(resource.newFileSystemResource(filePath));


Thanks in advance!

Cheers
--
View this message in context:

http://drools-java-rules-engine.46999.n3.nabble.com/KnowledgeAgent-and-OSGI-tp921989p921989.html
Sent from the Drools - User mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org mailto:rules-users@lists.jboss.org

Re: [rules-users] KnowledgeAgent and OSGI

2010-08-04 Thread Mark Proctor

 On 04/08/2010 11:06, David Conde wrote:

Thanks Mark,

Cheers for the info.

I've seen the OSGi bundle zip (and the boot bundle list [1]) but it 
seemed to have quite a large amount of dependencies for just 
drools-core and drools-compiler. Do you know if all these bundles are 
required for this subset? If not would you happen to have the list of 
what is?


If you don't have this handy I'll send it on so that you have it once 
I have figured it out :)
The spring testing framework makes you list all the dependencies 
manually, which it resolves against that osgi-bundles.zip contents. This 
is the file:

http://fisheye.jboss.org/browse/JBossRules/trunk/osgi-bundles/org.drools.osgi.test/src/test/resources/boot-bundles.properties?r=HEAD

It does contain a lot more than normal, mostly I just kept adding stuff 
intil OSGi would resolve and the unit tests pass. It may be possible not 
to include things like jaxb (especially if you are on  jdk6) and some of 
the other peripheral jars. We have used the spring repository and 
sometimes the transitivie dependencies are not left optional which means 
they are dragged in, and even if we don't us them OSGi will not resolve 
without them there. Maybe check out trunk and help us work on this and 
improve it?


The problem with OSGi is so few dependencies are are published as OSGi 
bundles, which means we have to rely on things like the spring osgi 
repository. That automates the building of the bundles and doesn't 
always handle optional dependencies that well.


Mark


[1] 
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/osgi-bundles/org.drools.osgi.test/src/test/resources/boot-bundles.properties


- Dave

2010/8/4 Mark Proctor mproc...@codehaus.org 
mailto:mproc...@codehaus.org


The set of OSGi bundles dependencies can be used here:
http://www.jboss.org/drools/downloads.html

We test against spring:

http://fisheye.jboss.org/browse/JBossRules/trunk/osgi-bundles/org.drools.osgi.test/src/test/java/org/drools/osgi/integrationtests/SimpleOsgiTest.java

This is our project that builds osgi-bundles and does some testing
of Drools against OSGi:
http://fisheye.jboss.org/browse/JBossRules/trunk/osgi-bundles/

I have done some minimal OSGi docs. OSGI is stil la work in
progress for us and we have only osgi-ified some aspects Drools,
although we have done extensive work on the classloaders to make
it fit better.

https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-integration/html/ch05.html

Please do test what we have, maybe help us OSGi-ify other aspects
of drools.

Mark

On 04/08/2010 10:25, David Conde wrote:

Hi,

I'm trying to get drools-core and drools-compiler 5.1 running on
spring dm-server. Does anyone have the minimal list of OSGi
bundles as maven dependencies handy?

Thanks,
Dave

On 25 June 2010 13:59, mmarmol marcelo.mar...@gmail.com
mailto:marcelo.mar...@gmail.com wrote:


Hi, I have managed to install Drools-core and Drools-compiler
in my Equinox
osgi environment, I can compile rules and execute them just
fine, I was just
wandering how to configure a KnowledgeAgent using
KnowledgeBuilderFactoryService and
KnowledgeBaseFactoryService. I managed to
configure one but i am not able to reload rules when they
change at runtime.
I have started ResourceChangeScannerService and
ResourceChangeNotifierService, changeset related to the rules
file gets read
but no change gets implemented. An idea?


Here is the code:

 
 ResourceFactory.getResourceChangeScannerService().start();
 
 ResourceFactory.getResourceChangeNotifierService().start();


   ServiceReference serviceRef = bc
 
 .getServiceReference(ServiceRegistry.class.getName());

   ServiceRegistry registry = (ServiceRegistry)
bc.getService(serviceRef);

   KnowledgeBuilderFactoryService
knowledgeBuilderFactoryService = registry
 
 .get(KnowledgeBuilderFactoryService.class);


   KnowledgeBaseFactoryService
knowledgeBaseFactoryService = registry
 
 .get(KnowledgeBaseFactoryService.class);

   ResourceFactoryService resourceFactoryService
= registry
 
 .get(ResourceFactoryService.class);


   KnowledgeBuilderConfiguration kbConf =
knowledgeBuilderFactoryService
 
 .newKnowledgeBuilderConfiguration(null, getClass()
 
 .getClassLoader

[rules-users] 5.1.0

2010-07-31 Thread Mark Proctor
  We haven't put it up on the official download site yet, just working 
on that at the moment. But here are the 5.1.0 artifacts:
https://hudson.jboss.org/hudson/job/drools/4250/artifact/trunk/target/

Mark

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


Re: [rules-users] StackOverflowError when serializing KnowledgeBase

2010-07-28 Thread Mark Proctor
  On 27/07/2010 22:36, Andargor wrote:
 Second try, sorry for spamming. Does anyone have an idea why serialization of 
 a large knowledge base fails with a stack error?
It's to do with Java's poor ability to serialise linked lists:
https://jira.jboss.org/browse/JBRULES-2335
https://jira.jboss.org/browse/JBRULES-946

Mark
 A.

 --- On Thu, 7/22/10, Andargorandar...@yahoo.com  wrote:

 From: Andargorandar...@yahoo.com
 Subject: Re: [rules-users] StackOverflowError when serializing KnowledgeBase
 To: rules-users@lists.jboss.org
 Date: Thursday, July 22, 2010, 8:12 PM
 Sorry, forgot to mention, I have
 tried 5.1.0M1, and yesterday's snapshot.

 --- On Thu, 7/22/10, Andargorandar...@yahoo.com
 wrote:

 From: Andargorandar...@yahoo.com
 Subject: StackOverflowError when serializing
 KnowledgeBase
 To: rules-users@lists.jboss.org
 Date: Thursday, July 22, 2010, 8:10 PM
 Hello,

 After adding a few hundred rules, and with the same
 code,
 KnowledgeBase serialization has started to generate
 StackOverflowError. I have increased the VM stack size
 as a
 workaround, but I was hoping to implement something
 more
 robust.

 I specifically need to serialize the KnowledgeBase,
 and not
 the session.

 I'm using this code:

  private void dumpKnowledgeBase(String file,
 KnowledgeBase kbase) {
 try {
 
 FileOutputStream ostream = new
 FileOutputStream(file);
 
 DroolsObjectOutputStream p = new
 DroolsObjectOutputStream(ostream);
 
 p.writeObject(kbase);
 
 p.flush();
 
 ostream.close();
 }
 catch
 (Exception e) {
 
 System.err.println(e);
 
 e.printStackTrace();
 
 System.err.println(Could not write
 knowledge base +file);
 }
  }


 This is due to writeObject recursion? Any ideas?

 A.





   

 ___
 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] 5.1.0 CR1: Drools Spring Configuration Changed?

2010-07-28 Thread Mark Proctor
  use the kstore element. You already have the various jpa settings in 
spring as beans. So you can retrieve those and pass them as parameters 
to the kstore in java code; which follows exactly the same interface as 
JPAKnowledgeService.

Mark
On 28/07/2010 15:41, tolitius wrote:
 1. If there is no answer for this, I will resurrect
 JPAKnowledgeServiceBean, cause it is actually one place to deal with
 creating / reloading Sessions + it has a good simple APIs:

 createNew...()
 load...( id )

  hence makes sense.

 2. Under the covers it'll have to probably use KnowledgeStoreService and
 /or JPAKnowledgeService..

 3. Interesting thing is that I have to recreate Environment now every time
 before reloading the Session, otherwise the entityManager is closed, and it
 does not respond to a simple Spring AOP TM wrapping... But that is another
 issue..

 /Anatoly




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


Re: [rules-users] Drools Gunvor and Oryx integration

2010-07-28 Thread Mark Proctor

 On 29/07/2010 04:05, Han Ming Low wrote:

Hi,
Just for information.
In order for the Oryx integration to work, you need to install the 
oryx designer available from

http://anonsvn.jboss.org/repos/labs/labs/jbossrules/contrib/designer/
I would add that the .war is provided by the Antoine Toulme, who 
maintains a branch at github, with the aim of merging changes back into 
the main oryx tree, and you can get the latest version there:

http://github.com/atoulme
http://github.com/intalio/process-designer/


Install the designer.war into JBoss and make sure you can access it 
from localhost:8080/designer
Then, in the download drools-5.1.0.CR1-install.zip, you should see a 
Evaluation.bpmn
Copy this file into your Guvnor repository through WebDAV into the 
defaultPackage (note : not any other package)
Once you have done this, you should see the process under the 
defaultPackage Processes in Guvnor.
And when you double click on it, you should have the bpm loaded in the 
designer.
A side note is that the designer will only load bpmn file, for obvious 
reason that the rf format is not supported by oryx.
So, you cannot create a process from Guvnor and load it in the 
designer because the default type is rf.

Hope this helps.
Han Ming
2010/7/28 Patricia Bogoevici patriciabogoev...@yahoo.com 
mailto:patriciabogoev...@yahoo.com


Hi all,

I found a preview of the Guvnor /Oryx integration here

(http://blog.athico.com/2010/06/browser-based-bpmn2-authoring-in-drools.html).

I tried Drools Guvnor 5.1.0.CR1, but there is nothing about this
integration, one can only view the flow diagram.

Can any of you tell when the integration with Oryx will be
available for testing? Someone commented to the blog entry, that
it'll be for 5.1 version, but as I said, it is not on 5.1.0.CR1.

Thanks,
Patricia



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



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


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


Re: [rules-users] 5.1.0 CR1: Drools Spring Configuration Changed?

2010-07-26 Thread Mark Proctor
  That bean isn't used any more. Spring has undergone a lot of 
improvements. All interaction with drools should be done via the custom 
namespace elements, see the release notes for more details
https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-introduction/html/ch02.html#d4e27

And here are sample xml from unit tests:
http://fisheye.jboss.org/browse/JBossRules/trunk/drools-container/drools-spring/src/test/resources/org/drools/container/spring/beans.xml?r=HEAD
 

http://fisheye.jboss.org/browse/JBossRules/trunk/drools-container/drools-spring/src/test/resources/org/drools/container/spring/no-node-beans.xml?r=HEAD
 

http://fisheye.jboss.org/browse/JBossRules/trunk/drools-container/drools-spring/src/test/resources/org/drools/container/spring/kagents-beans.xml?r=HEAD
 

http://fisheye.jboss.org/browse/JBossRules/trunk/drools-container/drools-spring/src/test/resources/org/drools/container/spring/beans/persistence/beansVarPersistence.xml?r=HEAD
 

http://fisheye.jboss.org/browse/JBossRules/trunk/drools-container/drools-spring/src/test/resources/org/drools/container/spring/beans/persistence/VariablePersistenceStrategyProcess.rf?r=HEAD
 

http://fisheye.jboss.org/browse/JBossRules/trunk/drools-container/drools-spring/src/test/resources/org/drools/container/spring/beans/persistence/beans.xml?r=HEAD

Mark

On 26/07/2010 21:29, tolitius wrote:
 No. This is a different one:

   bean id=knowledgeProvider
   
 class=org.drools.container.spring.beans.persistence.JPAKnowledgeServiceBean

   property name=entityManagerFactory 
 ref=entityManagerFactory /
   property name=transactionManager ref=txManager /
   property name=variablePersisters
   util:map
   ... ...
   /util:map
   /property
   property name=kbase
   drools:kbase id=kbase node=node1
   drools:resource type=DRF
   
 source=classpath:./META-INF/process/ultra-simple-process.rf /
   drools:resource type=DRL
  
 source=classpath:./META-INF/rule/simple-rule.drl /
 /
   /drools:kbase
   /property
   /bean

 This works in 5.1.0 M2, it does not in 5.1.0 CR1 +

 /Anatoly


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


Re: [rules-users] 5.1.0 CR1: Drools Spring Configuration Changed?

2010-07-26 Thread Mark Proctor
  On 26/07/2010 22:23, tolitius wrote:
 that is interesting:

  drools:work-item-handlers
drools:work-item-handler name=handlername ref=handlerid /
  /drools:work-item-handlers

 I already implemented it via simpleutil:map, and have a team of ~ 50
 developers already using it for the last three months ( did not know it was
 coming with namespace support ). Although as I think about it, since we have
 processes and sub-processes, I would rather keep workitem handlers process
 oriented rather than session oriented. Two reasons:

  1. Workitem is a process oriented entity
Work Items are a generic concept and not process oriented, we have plans 
to make them easily usable from the guided editor too.
  2. Sub-Process configuration can be de-coupled, and hence painlessly
 modified / reused
not sure what you mean. Please provide an xml sample of what you would 
like added.
 But all the namespace additions are truly a great addition to the Drools
 portfolio.
I did a lot of work streamlining the xml for compact declarativeness.
 I have a question about this new approach though:

  Using JPAKnowledgeServiceBean, anytime I needed to create a new
 Session, I could:

   StatefulKnowledgeSession knowledgeSession =
   knowledgeProvider.newStatefulKnowledgeSession();

  Using JPAKnowledgeServiceBean, anytime I needed to reload a
 Session, I could:

 knowledgeSession =
 knowledgeProvider.loadStatefulKnowledgeSession( sessionId );
Spring can create the session for you, as in the example. Or you can get 
spring to create a kstore reference and use that to instantiate the 
ksession.
drools:kstore id=kstore1 /

Which returns a KnowledgeStoreService implementation:
 StatefulKnowledgeSession newStatefulKnowledgeSession(KnowledgeBase 
kbase,
  
KnowledgeSessionConfiguration configuration,
  Environment 
environment);

 StatefulKnowledgeSession loadStatefulKnowledgeSession(int id,
   KnowledgeBase 
kbase,
   
KnowledgeSessionConfiguration configuration,
   Environment 
environment);


 I always have one Session to one Business Process mapping ( there are
 multiple reasons for that outside of the scope of this question ).

 What is the new way you have in mind? [ I have ideas, I just want to make
 sure I don't double work you again ]

 Thank you Mark,
 /Anatoly

 P.S. All Sessions / Processes + RuleGroupsFlowsAgendas... are persistent [
 JPA ]


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


Re: [rules-users] Uploading models to Guvnor

2010-07-24 Thread Mark Proctor
 normally this means someone uploaded a .jar of .java files, not 
.class. You need to compile the .java files in the .jar.


Mark
On 24/07/2010 22:56, Esteban Aliverti wrote:


Could you please post your jar here?

El jul 24, 2010 4:24 p.m., james corrigan jamescor...@gmail.com 
mailto:jamescor...@gmail.com escribió:


Hi All,
I am having severe amount of trouble trying to get started in Guvnor, 
i cannot load any jar files at all - i can upload them but not use 
them when i try write a guided rule it tells me that no models are 
loaded even though Guvnor is telling me its there.
I create a new package, then upload my jar file, then i add a 
category and try to save but get the following

error:
Unable to validate package configuration (eg, DSLs, models) for 
[Drols]. Suggestion completions may not operate correctly for 
graphical editors for this package.
I am running out of time plus patience trying to get this to work, i 
have been following the book: JBoss Drools Business Rules, and the 
online documentation but to no avail.

Any help is much appreciated.
Kind regards,
James.

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



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


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


Re: [rules-users] Decision Tree input?

2010-07-23 Thread Mark Proctor
  On 23/07/2010 20:23, ramesh76 wrote:
 Hi,

 I am looking to implement Decision tree using Drools. I am looking for some
 information regarding the Drools Decision tree setup and implementation with
 some examples, any help with this is really appreciated

Drools does not have out of the box DecisionTree support.

Mark
 Thanks,
 Ramesh


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


Re: [rules-users] Drools with spring

2010-07-22 Thread Mark Proctor
  On 23/07/2010 02:50, sonyt...@gmail.com wrote:
 Hi thanks for reply
 Do I need drools server
 I am mainly using drools flow
drools-server uses drools-spring and drools-camel.

drools-spring can be used alone. Drools-server can just be used as an 
example project to get an idea of how it works, likewise look at the 
drools-spring unit tests to get more of an idea.

Mark
 Regards
 Sonu

 Sent from my iPod

 On 23-Jul-2010, at 9:26 AM, Mark Proctormproc...@codehaus.org  wrote:

   On 23/07/2010 01:54, sonyt...@gmail.com wrote:
 Hi all
 I would like to integrate drools with spring
 If any body have example project share with me I will use spring 3
 with drools 5.1
 http://lucazamador.wordpress.com/2010/07/20/drools-server-configuration-updated/
 http://blog.athico.com/2010/07/declarative-rest-services-for-drools.html

 Mark

 Thanks in advance
 Sonu
 Sent from my iPod
 ___
 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




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


Re: [rules-users] Drools and mvel

2010-07-21 Thread Mark Proctor
  On 22/07/2010 00:49, Paul Edwards wrote:
 Hi Mark,

 I assume you are referring to: drools.dialect.mvel.strict =true|false  as I 
 cannot see any other config items. I have already tried setting that to false 
 (I should have put that in the first email) but it didn't work.

 I'm guessing that leaves me needing to raise a Jira issue???
MVELDialectConfiguration
 public void setLangLevel(int langLevel) {


 --
 Paul Edwards
 Solutions Engineer
 Identity Solutions Practice
 -
 hyro

 P Oz +61 2 9215 4347
 M NZ +64 21 2588695
 M Oz +61 4 2091 3987
 W www.hyro.com
 E paul.edwa...@hyro.com
 
 From: rules-users-boun...@lists.jboss.org 
 [rules-users-boun...@lists.jboss.org] On Behalf Of Mark Proctor 
 [mproc...@codehaus.org]
 Sent: Thursday, 22 July 2010 1:01 a.m.
 To: Rules Users List
 Subject: Re: [rules-users] Drools and mvel

 It is possible to turn off the language constraint for MVEL in drools, see 
 KnowledgeBuilderConfiguration, which should cause the static field not to be 
 set.

 Mark
 On 21/07/2010 15:02, Edson Tirelli wrote:

  Hi Paul,

  Your analysis is correct. The problem is that these configurations in 
 MVEL are made using static properties and so they affect all uses of MVEL in 
 a single classloading hierarchy. Unfortunately, I don't think there is 
 anything you can do right now, other than open a JIRA in MVEL to help 
 convince Mike to make all configurations non-static in MVEL:

 http://jira.codehaus.org/browse/MVEL

  Edson

 2010/7/21 Paul Edwardspaul.edwa...@hyro.commailto:paul.edwa...@hyro.com
 Hi guys,

 I have an issue which involves smooks, drools and mvel.

 Quick explanation, the unit test is just a smooks run. Nothing complicated. 
 The test passes happily. It contains an expression that involves an MVEL IF 
 statement.

 Now if I add a drools startup (I'm not using drools in the test, I'm just 
 initialising it), the unit test now fails on the IF statement. The 
 exception received is:

 org.milyn.cdr.SmooksConfigurationException: Error invoking @Initialize method 
 'initialize' on class 'org.milyn.javabean.BeanInstancePopulator'.
 at org.milyn.cdr.annotation.Configurator.invoke(Configurator.java:457)
 at 
 org.milyn.cdr.annotation.Configurator.initialise(Configurator.java:439)
 at 
 org.milyn.cdr.annotation.Configurator.configure(Configurator.java:91)
 at 
 org.milyn.cdr.annotation.Configurator.configure(Configurator.java:66)
 at 
 org.milyn.delivery.JavaContentHandlerFactory.create(JavaContentHandlerFactory.java:63)
 at 
 org.milyn.delivery.ContentDeliveryConfigBuilder$ContentHandlerExtractionStrategy.addCDU(ContentDeliveryConfigBuilder.java:623)
 at 
 org.milyn.delivery.ContentDeliveryConfigBuilder$ContentHandlerExtractionStrategy.applyCDUStrategy(ContentDeliveryConfigBuilder.java:548)
 at 
 org.milyn.delivery.ContentDeliveryConfigBuilder$ContentHandlerExtractionStrategy.applyStrategy(ContentDeliveryConfigBuilder.java:536)
 at 
 org.milyn.delivery.ContentDeliveryConfigBuilder$SmooksResourceConfigurationTableIterator.iterate(ContentDeliveryConfigBuilder.java:711)
 at 
 org.milyn.delivery.ContentDeliveryConfigBuilder$SmooksResourceConfigurationTableIterator.access$300(ContentDeliveryConfigBuilder.java:690)
 at 
 org.milyn.delivery.ContentDeliveryConfigBuilder.extractContentHandlers(ContentDeliveryConfigBuilder.java:484)
 at 
 org.milyn.delivery.ContentDeliveryConfigBuilder.load(ContentDeliveryConfigBuilder.java:349)
 at 
 org.milyn.delivery.ContentDeliveryConfigBuilder.getConfig(ContentDeliveryConfigBuilder.java:146)
 at 
 org.milyn.container.standalone.StandaloneExecutionContext.init(StandaloneExecutionContext.java:91)
 at 
 org.milyn.container.standalone.StandaloneExecutionContext.init(StandaloneExecutionContext.java:65)
 at org.milyn.Smooks.createExecutionContext(Smooks.java:383)
 at org.milyn.Smooks.createExecutionContext(Smooks.java:346)
 at 
 com.hyro.telstrapoc.smooks.SmooksTransformTest.runSmooksTransform(SmooksTransformTest.java:215)
 at 
 com.hyro.telstrapoc.smooks.SmooksTransformTest.testSmooks(SmooksTransformTest.java:139)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at 
 org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
 at 
 org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
 at 
 org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
 at 
 org.junit.internal.runners.statements.InvokeMethod.evaluate

Re: [rules-users] Drools Planner or Drools Solver

2010-07-19 Thread Mark Proctor

 On 20/07/2010 01:05, Nick Heudecker wrote:
I'm confused as to the naming of Drools Solver.  The docs all say 
Solver, but when I look for a current snapshot [1] and available 
downloads, I'm only seeing Planner.  Which is it?  Thanks for the 
clarification.


[1] https://repository.jboss.org/nexus/content/repositories/snapshots

It was renamed from solver to planner.

Mark



___
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] Improving Drools Memory Performance

2010-07-16 Thread Mark Proctor
/Improving_Drools_Memory_Performance

On Sat, Jul 10, 2010 at 12:28 AM, Wolfgang Laun
wolfgang.l...@gmail.com mailto:wolfgang.l...@gmail.com wrote:
 On 9 July 2010 14:14, Mark Proctor mproc...@codehaus.org
mailto:mproc...@codehaus.org wrote:
  You have many objects there that are not constrained;

 I have an inkling that the functions.*() are hiding just these
contraints,
 It's certainly the wrong way, starting with oodles of node
pairs, just to
 pick out connected ones by fishing for the connecting edge. And this
 is worsened by trying to find two such pairs which meet at some
 DomainSource

 Guesswork, hopefully educated ;-)

 -W


 if there are
 multiple versions of those objects you are going to get massive
amounts
 of cross products. Think in terms of SQL, each pattern you add
is like
 an SQL join.

 Mark
 On 09/07/2010 09:20, Jevon Wright wrote:
 Hi everyone,

 I am working on what appears to be a fairly complex rule base
based on
 EMF. The rules aren't operating over a huge number of facts
(less than
 10,000 EObjects) and there aren't too many rules (less than
300), but
 I am having a problem with running out of Java heap space (set
at ~400
 MB).

 Through investigation, I came to the conclusion that this is
due to
 the design of the rules, rather than the number of facts. The
engine
 uses less memory inserting many facts that use simple rules,
compared
 with inserting few facts that use many rules.

 Can anybody suggest some tips for reducing heap memory usage in
 Drools? I don't have a time constraint, only a heap/memory
constraint.
 A sample rule in my project looks like this:

rule Create QueryParameter for target container of DetailWire
  when
container : Frame( )
schema : DomainSchema ( )
domainSource : DomainSource ( )
instance : DomainIterator( )
selectEdge : SelectEdge ( eval (
 functions.connectsSelect(selectEdge, instance, domainSource )) )
schemaEdge : SchemaEdge ( eval (
 functions.connectsSchema(schemaEdge, domainSource, schema )) )
source : VisibleThing ( eContainer == container )
target : Frame ( )
instanceSet : SetWire (
eval(functions.connectsSet(instanceSet,
 instance, source )) )
detail : DetailWire ( )
eval ( functions.connectsDetail(detail, source, target ))
pk : DomainAttribute ( eContainer == schema, primaryKey
== true )
not ( queryPk : QueryParameter ( eContainer == target,
name == pk.name http://pk.name ) )
eval ( handler.veto( detail ))

  then
QueryParameter qp =
handler.generatedQueryParameter(detail, target);
handler.setName(qp, pk.getName());
queue.add(qp, drools); // wraps insert(...)

end

 I try to order the select statements in an order that will
reduce the
 size of the cross-product (in theory), but I also try and keep the
 rules fairly human readable. I try to avoid comparison
operators like
   and. Analysing a heap dump shows that most of the memory
is being
 used in StatefulSession.nodeMemories  PrimitiveLongMap.

 I am using a StatefulSession; if I understand correctly, I
can't use a
 StatelessSession with sequential mode since I am inserting
facts as
 part of the rules. If I also understand correctly, I'd like
the Rete
 graph to be tall, rather than wide.

 Some ideas I have thought of include the following:
 1. Creating a separate intermediary meta-model to split up the
sizes
 of the rules. e.g. instead of (if A and B and C then insert
D), using
 (if A and B then insert E; if E and C then insert D).
 2. Moving eval() statements directly into the Type(...) selectors.
 3. Removing eval() statements. Would this allow for better
indexing by
 the Rete algorithm?
 4. Reducing the height, or the width, of the class hierarchy
of the
 facts. e.g. Removing interfaces or abstract classes to reduce the
 possible matches. Would this make a difference?
 5. Conversely, increasing the height, or the width, of the class
 hierarchy. e.g. Adding interfaces or abstract classes to
reduce field
 accessors.
 6. Instead of using EObject.eContainer, creating an explicit
 containment property in all of my EObjects.
 7. Creating a DSL that is human-readable, but allows for the
 automation of some of these approaches.
 8. Moving all rules into one rule file, or splitting up rules into
 smaller files.

 Is there kind of profiler for Drools that will let me see the
size (or
 the memory usage) of particular rules, or of the memory used

Re: [rules-users] lock-on-active, why keeps evaluating?

2010-07-16 Thread Mark Proctor
  The optimisation to disconnect the parts of the rete network that are 
currentnly not able to fire, due to ruleflow-group, has not been done. 
So it'll only stop the firing, not stop the evaluation.

Any takers?

Mark
On 16/07/2010 20:39, mmarmol wrote:
 He guys, I am using the meta-data lock-on-active on some rules and is working
 great, but i have seen rules with lock-on-active = true are been eveluated
 everytime the facts are modified even after they have been fired. Why is
 that? I dont see the point of evaluating a rule with lock-on-active true
 when it has already fired, it wont fire again. There is a way to resolve
 this? or to implement something to avoid reevaluation? I am using drools
 5.1.0M2 with a StatefulKnowledgeSession.



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


Re: [rules-users] lock-on-active, why keeps evaluating?

2010-07-16 Thread Mark Proctor
  On 16/07/2010 22:07, mmarmol wrote:
 The enabled meta-data works in the same way, rules get evaluated they just
 wont get executed.
you can physically remove the rule if it's no longer needed and you 
think it's taking up evaluation space.

Mark

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


Re: [rules-users] Improving Drools Memory Performance

2010-07-15 Thread Mark Proctor

 On 16/07/2010 04:16, Jevon Wright wrote:

Hi again,

By removing all of the simple eval()s from my rules, I have cut heap 
usage by at least an order of magnitude. However this still isn't enough.


Since I am trying to reduce the cross-product size (as in SQL), I 
recall that most SQL implementations have a DESCRIBE SELECT query 
which provides real-time information about the complexity of a given 
SQL query - i.e. the size of the tables, indexes used, and so on. Is 
there any such tool available for Drools? Are there any tools which 
can provide clues as to which rules are using the most memory?

no, but sounds like a nice side project :)


Alternatively, I am wondering what kind of benefit I could expect from 
using materialized views to create summary tables; that is, deriving 
and inserting additional facts. This would allow Drools to rewrite 
queries that currently use eval(), but would increase the size of 
working memory, so would this actually save heap size?


To what extent does Drools rewrite queries? Is there any documentation 
describing the approaches used?
The only rewriting we do is on literal constraints, moving == ones to 
the front, that's it. Also make sure you are using trunk, which is more 
memory efficient for modifies:

https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/

Mark


Any other ideas on how to reduce heap memory usage? I'd appreciate any 
ideas :)


Thanks
Jevon


On Mon, Jul 12, 2010 at 5:56 PM, Jevon Wright je...@jevon.org 
mailto:je...@jevon.org wrote:


Hi Wolfgang and Mark,

Thank you for your replies! You were correct: my eval() functions
could generally be rewritten into Drools directly.

I had one function connectsDetail that was constraining
unidirectional edges, and could be rewritten from:
 detail : DetailWire ( )
 eval ( functions.connectsDetail(detail, source, target) )

to:
 detail : DetailWire ( from == source, to == target )

Another function, connects, was constraining bidirectional edges,
and could be rewritten from:
 sync : SyncWire( )
 eval ( functions.connects(sync, source, target) )

to:
 sync : SyncWire( (from == source  to == target) || (from == target
 to == source) )

Finally, the veto function could be rewritten from:
 detail : DetailWire ( )
 eval ( handler.veto(detail) )

to:
 detail : DetailWire ( overridden == false )

I took each of these three changes, and evaluated them separately [1].
I found that:

1. Inlining 'connectsDetail' made a huge difference - 10-30% faster
execution and 50-60% less allocated heap.
2. Inlining 'connects' made very little difference - 10-30% faster
execution, but 0-20% more allocated heap.
3. Inlining 'veto' made no difference - no significant change in
execution speed or allocated heap.

I think I understand why inlining 'connects' would improve heap usage
- because the rules essentially have more conditionals?

I also understand why 'veto' made no difference - for most of my test
models, overridden was never true, so adding this conditional was
not making the cross product set any smaller.

Finally, I also tested simply joining all of the rules together into
one file. This happily made no difference at all (although made it
more difficult to edit).

So I think I can safely conclude that eval() should be used as little
as possible - however, this means that the final rules are made more
complicated and less human-readable, so a DSL may be best for my
common rule patterns in the future.

Thanks again!
Jevon

[1]: http://www.jevon.org/wiki/Improving_Drools_Memory_Performance

On Sat, Jul 10, 2010 at 12:28 AM, Wolfgang Laun
wolfgang.l...@gmail.com mailto:wolfgang.l...@gmail.com wrote:
 On 9 July 2010 14:14, Mark Proctor mproc...@codehaus.org
mailto:mproc...@codehaus.org wrote:
  You have many objects there that are not constrained;

 I have an inkling that the functions.*() are hiding just these
contraints,
 It's certainly the wrong way, starting with oodles of node
pairs, just to
 pick out connected ones by fishing for the connecting edge. And this
 is worsened by trying to find two such pairs which meet at some
 DomainSource

 Guesswork, hopefully educated ;-)

 -W


 if there are
 multiple versions of those objects you are going to get massive
amounts
 of cross products. Think in terms of SQL, each pattern you add
is like
 an SQL join.

 Mark
 On 09/07/2010 09:20, Jevon Wright wrote:
 Hi everyone,

 I am working on what appears to be a fairly complex rule base
based on
 EMF. The rules aren't operating over a huge number of facts
(less than
 10,000 EObjects) and there aren't too many rules (less than
300), but
 I am having a problem with running out of Java

Re: [rules-users] Help: Web based console for editing BPMN2 in 5.1M2 or SNAPSHOT

2010-07-11 Thread Mark Proctor

 On 12/07/2010 03:06, Low Han Ming NCS wrote:


Hi,

Sorry, I would just like to check if there is any update on where can 
I get the WAR for the oryx.


I would really like to evaluate Drools for a project.


http://anonsvn.jboss.org/repos/labs/labs/jbossrules/contrib/designer/


Thanks.

Han Ming



*From:* rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] *On Behalf Of *Mark Proctor

*Sent:* Monday, July 05, 2010 9:00 PM
*To:* rules-users@lists.jboss.org
*Subject:* Re: [rules-users] Help: Web based console for editing BPMN2 
in 5.1M2 or SNAPSHOT


There is an additional WAR for oryx that must be installed first, kris 
should be able to provide more details on that.


Mark
On 05/07/2010 07:17, Low Han Ming NCS wrote:

Hi,

I saw on the blog post that there will be a browser base tool to edit 
BPMN2 processes in Guvnor 5.1.


http://blog.athico.com/2010/06/browser-based-bpmn2-authoring-in-drools.html

I have downloaded the 5.1M2 and also the last successful build from

http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/

After I've added a sample.bpmn file to the repository through Eclipse, 
it shows an error that the requested resource /designer/editor is 
not available when I try to open it in guvnor.


I suppose this means that the BPMN editor which is suppose to be an 
Oryx based editor is a webapp with a context /designer?


Can anyone advise how do I go about getting the designer webapp or 
build from the source?


I have tried to download the src from drools-5.1.0.SNAPSHOT-src.zip 
and build the drools-guvnor module, but it didn't seems to have the 
editor loaded either.


Attached is a screenshot of my gunvor.

Thanks for any advise.

Han Ming

  

  
___

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


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


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


Re: [rules-users] Modify objects which are not part of the LHS

2010-07-10 Thread Mark Proctor
  On 10/07/2010 23:17, davids wrote:
 I am new to the tool and using guvnor to post and test my rules.
 I have about 10 rules which are executed based on adding more facts to the
 WM.
 in order to trigger the relevant rules ,I am using a temp object which is
 updated by a Modify statement.

 Is there any way on the RHS to modify objects which are not part of the LHS?

Something somewhere needs to have a reference to it, either a lookup via 
some gobal, or a variable from the LHS has a reference to it.

M




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


Re: [rules-users] Improving Drools Memory Performance

2010-07-09 Thread Mark Proctor
  You have many objects there that are not constrained; if there are 
multiple versions of those objects you are going to get massive amounts 
of cross products. Think in terms of SQL, each pattern you add is like 
an SQL join.

Mark
On 09/07/2010 09:20, Jevon Wright wrote:
 Hi everyone,

 I am working on what appears to be a fairly complex rule base based on
 EMF. The rules aren't operating over a huge number of facts (less than
 10,000 EObjects) and there aren't too many rules (less than 300), but
 I am having a problem with running out of Java heap space (set at ~400
 MB).

 Through investigation, I came to the conclusion that this is due to
 the design of the rules, rather than the number of facts. The engine
 uses less memory inserting many facts that use simple rules, compared
 with inserting few facts that use many rules.

 Can anybody suggest some tips for reducing heap memory usage in
 Drools? I don't have a time constraint, only a heap/memory constraint.
 A sample rule in my project looks like this:

rule Create QueryParameter for target container of DetailWire
  when
container : Frame( )
schema : DomainSchema ( )
domainSource : DomainSource ( )
instance : DomainIterator( )
selectEdge : SelectEdge ( eval (
 functions.connectsSelect(selectEdge, instance, domainSource )) )
schemaEdge : SchemaEdge ( eval (
 functions.connectsSchema(schemaEdge, domainSource, schema )) )
source : VisibleThing ( eContainer == container )
target : Frame ( )
instanceSet : SetWire ( eval(functions.connectsSet(instanceSet,
 instance, source )) )
detail : DetailWire ( )
eval ( functions.connectsDetail(detail, source, target ))
pk : DomainAttribute ( eContainer == schema, primaryKey == true )
not ( queryPk : QueryParameter ( eContainer == target, name == pk.name 
 ) )
eval ( handler.veto( detail ))

  then
QueryParameter qp = handler.generatedQueryParameter(detail, target);
handler.setName(qp, pk.getName());
queue.add(qp, drools); // wraps insert(...)

end

 I try to order the select statements in an order that will reduce the
 size of the cross-product (in theory), but I also try and keep the
 rules fairly human readable. I try to avoid comparison operators like
   and. Analysing a heap dump shows that most of the memory is being
 used in StatefulSession.nodeMemories  PrimitiveLongMap.

 I am using a StatefulSession; if I understand correctly, I can't use a
 StatelessSession with sequential mode since I am inserting facts as
 part of the rules. If I also understand correctly, I'd like the Rete
 graph to be tall, rather than wide.

 Some ideas I have thought of include the following:
 1. Creating a separate intermediary meta-model to split up the sizes
 of the rules. e.g. instead of (if A and B and C then insert D), using
 (if A and B then insert E; if E and C then insert D).
 2. Moving eval() statements directly into the Type(...) selectors.
 3. Removing eval() statements. Would this allow for better indexing by
 the Rete algorithm?
 4. Reducing the height, or the width, of the class hierarchy of the
 facts. e.g. Removing interfaces or abstract classes to reduce the
 possible matches. Would this make a difference?
 5. Conversely, increasing the height, or the width, of the class
 hierarchy. e.g. Adding interfaces or abstract classes to reduce field
 accessors.
 6. Instead of using EObject.eContainer, creating an explicit
 containment property in all of my EObjects.
 7. Creating a DSL that is human-readable, but allows for the
 automation of some of these approaches.
 8. Moving all rules into one rule file, or splitting up rules into
 smaller files.

 Is there kind of profiler for Drools that will let me see the size (or
 the memory usage) of particular rules, or of the memory used after
 inference? Ideally I'd use this to profile any changes.

 Thanks for any thoughts or tips! :-)

 Jevon
 ___
 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] Help: Web based console for editing BPMN2 in 5.1M2 or SNAPSHOT

2010-07-05 Thread Mark Proctor
 There is an additional WAR for oryx that must be installed first, kris 
should be able to provide more details on that.


Mark
On 05/07/2010 07:17, Low Han Ming NCS wrote:


Hi,

I saw on the blog post that there will be a browser base tool to edit 
BPMN2 processes in Guvnor 5.1.


_http://blog.athico.com/2010/06/browser-based-bpmn2-authoring-in-drools.html_

I have downloaded the 5.1M2 and also the last successful build from

_http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/_ 
http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/


After I've added a sample.bpmn file to the repository through Eclipse, 
it shows an error that the requested resource /designer/editor is 
not available when I try to open it in guvnor.


I suppose this means that the BPMN editor which is suppose to be an 
Oryx based editor is a webapp with a context /designer?


Can anyone advise how do I go about getting the designer webapp or 
build from the source?


I have tried to download the src from drools-5.1.0.SNAPSHOT-src.zip 
and build the drools-guvnor module, but it didn't seems to have the 
editor loaded either.


Attached is a screenshot of my gunvor.

Thanks for any advise.

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


Re: [rules-users] Arden Syntax support in Drools / Guvnor?

2010-07-02 Thread Mark Proctor
  On 02/07/2010 07:37, HarrySimons wrote:
 Hi,

 Wanted to know whether or not the Drools/Guvnor combo supports the Arden
 Syntax for knowledge coding... used in Medical Logic Modules (or, MLMs) and
 clinical decision support systems such as EGADSS.

 If no, then are there any external tools / utilities that would allow
 importing of Arden Syntax into Drools / Guvnor?
There is nothing for this at the moment, sounds like a good sub project 
if you have time? :)

Mark
 Many thanks in advance,
 /HS



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


Re: [rules-users] Getting fix for JBRULES-2375

2010-07-01 Thread Mark Proctor

 On 02/07/2010 02:51, Norman C wrote:

Hi All,
I'm working with Drools Fusion and have run into the deadlock issue in 
https://jira.jboss.org/browse/JBRULES-2375 (Drools hangs when events 
are retracted).  This bug indicates it is fixed in 5.1.0.CR1.  How can 
I get this fix, or alternatively, where in the SVN repository can I 
look at the code fix so I can create a custom version of 5.0.1 with 
this fix?

Thanks in advance for your help.
On the jira click the source tab and you'll see the changes assocated 
for that fix.


Mark

Norman


___
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] jBPM and Drools Flow

2010-06-18 Thread Mark Proctor

Drools Flow will be incorporated into jBPM5.

Mark
On 18/06/2010 18:47, Jinsong wrote:

I am interested in the question as well.
Anybody can give us a answer?

Best,
Jinsong


On Wed, Jun 16, 2010 at 3:01 AM, Hitoshi Ozawa htshoz...@gmail.com 
mailto:htshoz...@gmail.com wrote:


Hi,

With changes in jBPM team and a new announcement on jBPM 5 being more
compatible with Drools Flow,
would appreciate if someone can tell me the current stance on Drools
Flow. Will the two join or remain
separate.

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



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


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


Re: [rules-users] jBPM and Drools Flow

2010-06-18 Thread Mark Proctor
On 18/06/2010 22:38, Hitoshi Ozawa wrote:
 Will Drool Flow's API change? Should I wait until jBPM5 comes out to
 actually begin using it? I heard that jBPM5 will be a little bit of a
 wait.

The namespace will change. The API may go under some minimal changes, 
but it'll be very close to what we have now. We will continue to push 
the unified knowledge api concept.

Mark
 H.Ozawa

 2010/6/19 Mark Proctormproc...@codehaus.org:

 Drools Flow will be incorporated into jBPM5.

 Mark
 On 18/06/2010 18:47, Jinsong wrote:

 I am interested in the question as well.
 Anybody can give us a answer?
 Best,
 Jinsong

 On Wed, Jun 16, 2010 at 3:01 AM, Hitoshi Ozawahtshoz...@gmail.com  wrote:
  
 Hi,

 With changes in jBPM team and a new announcement on jBPM 5 being more
 compatible with Drools Flow,
 would appreciate if someone can tell me the current stance on Drools
 Flow. Will the two join or remain
 separate.

 H.Ozawa
 ___
 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


  
 ___
 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] Fwd: [drools-user] Write Drools Books - Packt Publishing.

2010-06-11 Thread Mark Proctor

 Original Message Kshipra Singh kship...@packtpub.com

Hello Everybody,
I represent Packt Publishing, the publishers of computer related books.
We are planning to expand our range of Drools books and are currently 
inviting Drools experts interested in writing books for Packt.
We do not expect our authors to have any past writing experience. All 
that you need to write for Packt is an expert knowledge of your subject, 
a passion to share it with others and an ability to communicate clearly 
in English.
So, if you love Drools and fancy writing a book, here's an opportunity 
for you! Send us your book ideas at aut...@packtpub.com. Even if you 
don't have a book idea and are simply interested in writing a book, we 
are keen to hear from you!
More details about this opportunity are available at : 
http://authors.packtpub.com/content/packt-invites-drools-book-ideas-authors

Thanks
Kshipra Singh
Author Relationship Manager
Packt Publishing
www.PacktPub.com http://www.PacktPub.com

Skype: kshiprasingh15
Twitter: http://twitter.com/packtauthors

Interested in becoming an author? Visit http://authors.packtpub.com for 
all the information you need about writing for Packt.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Boolean logic fail?

2010-06-05 Thread Mark Proctor
'or' is a conditional element to be used between patterns. '||' is an 
infix operator to be used in field constraints inside of patterns.

Mark
On 05/06/2010 00:23, Matthew Runo wrote:
 Hello folks -

 We noticed something weird today, and was hopeing that someone here might be 
 able to explain it for us a bit.. Here's the rule we had:

 eval( -1  0 or
 8  1 or
 182  0 or
 0 == 0);

 This was failing, but doesn't it seem like it should work? To get it to work, 
 we tried this:

 eval( (-1  0) or
 (8  1) or
 (182  0) or
 (0 == 0));

 ... but that didn't compile. We then tried this (and it worked!):

 eval( (-1  0) ||
 (8  1) ||
 (182  0) ||
 (0 == 0));

 So, my question is simply - why? What's the difference between or and || - 
 and when should we use them?

 Thanks for your time!

 Matthew Runo
 Software Engineer, Zappos.com
 mr...@zappos.com - 702-943-7833


 ___
 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] Using pipelines

2010-06-03 Thread Mark Proctor

On 03/06/2010 11:05, Swindells, Thomas wrote:


I tried looking for one but couldn't see one in the PipelineFactory 
that can be used when I've received an object from the jms queue.  I'm 
hoping that I'm just being blind or something...


I'd not use that, stick with the CommandFactory and send a batch of 
commands, and just use the CommandExecutor stage in the pipeline for this.


All of the pipeline stuff will go, with a Camel pushed as the default 
way to execute commands.


Mark


*From:* rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] *On Behalf Of *Mark Proctor

*Sent:* 03 June 2010 07:28
*To:* rules-users@lists.jboss.org
*Subject:* Re: [rules-users] Using pipelines

On 02/06/2010 11:15, Swindells, Thomas wrote:

I'm not trying to fire a particular rule, I'm trying to get the 
pattern matching inside the knowledge session to actually run, eg the 
equivalent of calling ksession.fireAllRules() but having the pipeline 
doing it at the correct time.


Did you add the FireAllRulesCommand?

Mark

Thomas

*From:* rules-users-boun...@lists.jboss.org 
mailto:rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] *On Behalf Of *rudolf michael

*Sent:* 02 June 2010 10:39
*To:* Rules Users List
*Subject:* Re: [rules-users] Using pipelines

you can't explicitly fire a rule...it is not like calling a method. 
rules are fired when there is a pattern matches inside your 
KnowledgeSession.


2010/6/2 Swindells, Thomas tswinde...@nds.com 
mailto:tswinde...@nds.com


I've still not managed to work this out,

How do I actually get my rules to fire when using a pipeline?

Thanks,

Thomas

*From:* rules-users-boun...@lists.jboss.org 
mailto:rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org 
mailto:rules-users-boun...@lists.jboss.org] *On Behalf Of 
*Swindells, Thomas

*Sent:* 30 May 2010 18:47
*To:* Rules Users List
*Subject:* [rules-users] Using pipelines

I've been trying to learn how to use pipelines to execute some rules.

I've had a look at the JaxbSimpleJmsMessengerTest as that seemed a 
good place to start and copy the code from (using drools 5.0.1).


However running the test doesn't seem to actually run any of the rules 
-- I've tried adding println's but they don't appear, nor do the 
globals appear to get populated.



What am I missing?


Thomas




**
This message is confidential and intended only for the addressee. If 
you have received this message in error, please immediately notify the 
postmas...@nds.com mailto:postmas...@nds.com and delete it from your 
system as well as any copies. The content of e-mails as well as 
traffic data may be monitored by NDS for employment and security 
purposes. To protect the environment please do not print this e-mail 
unless necessary.


NDS Limited. Registered Office: One London Road, Staines, Middlesex, 
TW18 4EX, United Kingdom. A company registered in England and Wales. 
Registered no. 3080780. VAT no. GB 603 8808 40-00

**




**
This message is confidential and intended only for the addressee. If 
you have received this message in error, please immediately notify the 
postmas...@nds.com mailto:postmas...@nds.com and delete it from your 
system as well as any copies. The content of e-mails as well as 
traffic data may be monitored by NDS for employment and security 
purposes. To protect the environment please do not print this e-mail 
unless necessary.


NDS Limited. Registered Office: One London Road, Staines, Middlesex, 
TW18 4EX, United Kingdom. A company registered in England and Wales. 
Registered no. 3080780. VAT no. GB 603 8808 40-00

**


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




**
This message is confidential and intended only for the addressee. If 
you have received this message in error, please immediately notify the 
postmas...@nds.com mailto:postmas...@nds.com and delete it from your 
system as well as any copies. The content of e-mails as well as 
traffic data may be monitored by NDS for employment and security 
purposes. To protect the environment please do not print this e-mail 
unless necessary.


NDS Limited. Registered Office: One London Road, Staines, Middlesex, 
TW18 4EX, United

Re: [rules-users] How can I use retract in action or exception handler?

2010-06-02 Thread Mark Proctor
On 02/06/2010 23:08, EugeneP wrote:
 Good afternoon

 How can I use retract in action or exception handler?
 For example,
 0. I have a flow diagram;
 1. in some node the fact Person( age == 10) is added to the working memory
 by 'insert';
 2. after some steps, the split node pass the control to the action-node
 3. and in this action I need to retract this fact. How?!
 The action MVEL code like:

 $t : Person( age==10)
 retract($t)

That would not be any valid MVEL or Java; you have mixed a rule LHS nd a 
rule RHS - neither of which are valid for an action. Firstly you'll need 
access to the facthandle, so you'll need to store that as a variable 
some how. Then you can do
kcontext.knowledgeRuntime.retract( factHandle );
 - does not work b/c of knowledge base errors:
 Could not parse knowledge...
 Unable to build expression for action...
 java.lang.Class cannot be cast to org.mvel2.util.MethodStub :
 org.drools.lang.descr.processde...@fa54fe

 Thanks,
  Eugene P



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


Re: [rules-users] Introspect Rules When condition

2010-05-28 Thread Mark Proctor

On 29/05/2010 01:13, Kinjal Khandhar wrote:

Hello All,

I am working on Drools Rules and need help on the below problem:

In my .drl file say:
*rule*
*when*
*Object1(..)*
*Object2(..)*
*then*
* *
*end;*


Is there a way(Drools API or any method) in which I can scan through 
my rules files and get the objects...say Object1 and Object2.


In a way I want to introspect the *when condition* objects.

If anyone has any idea,please let me know.
You can, but you'll need to use the internal api. Just get a reference 
to the rule LHS and iterate down the tree structure, you'll need to get 
a reference the internal Rule object, just mess around int the eclipse 
variable viewer and you should start to get a hang of things.


Mark


Thanks,
Kinjal


___
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 Roadmap - Planned Release 5.1 release date

2010-05-27 Thread Mark Proctor
On 04/03/2010 09:21, Swindells, Thomas wrote:
  From what Mark Proctor posted in another thread:

 Edson has just merged the Rete algorithm updates into trunk, we have one 
 remaining issue with planner and after that we 5.1M2. If thins go well we 
 should 5.1 final this month.

M2 is on the download page, just working on the release notes.

Mark

 -Original Message-
 From: rules-users-boun...@lists.jboss.org [mailto:rules-users-
 boun...@lists.jboss.org] On Behalf Of Rohit Rai
 Sent: 04 March 2010 05:39
 To: rules-users@lists.jboss.org
 Subject: Re: [rules-users] Drools Roadmap - Planned Release 5.1 release date


 Bump! Bump!

 Any updates on 5.1M2?
 --
 View this message in context: http://n3.nabble.com/Drools-Roadmap-Planned-
 Release-5-1-release-date-tp60252p427859.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 message is confidential and intended only for the addressee. If you have 
 received this message in error, please immediately notify the 
 postmas...@nds.com and delete it from your system as well as any copies. The 
 content of e-mails as well as traffic data may be monitored by NDS for 
 employment and security purposes. To protect the environment please do not 
 print this e-mail unless necessary.

 NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 
 4EX, United Kingdom. A company registered in England and Wales. Registered 
 no. 3080780. VAT no. GB 603 8808 40-00
 **

 This message is confidential and intended only for the addressee. If you have 
 received this message in error, please immediately notify the 
 postmas...@nds.com and delete it from your system as well as any copies. The 
 content of e-mails as well as traffic data may be monitored by NDS for 
 employment and security purposes.
 To protect the environment please do not print this e-mail unless necessary.

 An NDS Group Limited company. www.nds.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 memory usage issue

2010-05-27 Thread Mark Proctor
On 02/03/2010 14:50, Shah, Malay wrote:
 Pavel,

 I don't want to profile my application, as I am sure that there is no memory 
 leak happening either on the drools side or in my code, and I know that 
 memory for the app is not enough. I am running my app on 10G memory with 
 75000 objects/facts (taking about 600 MB heap), and running about 75 complex 
 rules across these facts. One solution is to increase the heap, but is there 
 anything else that I can do (other than adding drools properties as mentioned 
 in my earlier email). Also, is it possible to know how much time each rule 
 took to execute on a set of facts, when we apply a bunch of rules together in 
 a stateless session? This would help me debug such issues easily when new 
 rules are added to my application.

Have you had any progress here? There is no out of the box way to get 
the information you need.

mark
 Thanks

 Malay Shah

 -Original Message-
 From: rules-users-boun...@lists.jboss.org 
 [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Pavel Tavoda
 Sent: Tuesday, March 02, 2010 3:26 AM
 To: Rules Users List
 Subject: Re: [rules-users] Drools memory usage issue

 At first start with tuning JVM. Xms, Xmx parameters. How much physical memory 
 you have? If above 3.xx GB you need 64 bit JVM. If this is not enough just 
 kick Profiler.

 Pavel

 2010/3/2 Shah, Malaymalay.s...@morganstanley.com:

 Hi,

 We have an drools 5.0.1 application that uses StatelessSession and
 high volume of objects (facts) that we need to apply static rules on,
 and having out of memory issues doing so. We added the following three
 properties as given in the drools documentation for decreasing the memory 
 usage:

 drools.shadowproxy=false
 drools.maintainTms=false
 drools.sequential=true

 As per the following blog, there is an algorithm to minimize the
 engine work, and memory usage.
 http://blog.athico.com/2007/07/sequential-rete.html
 Are the properties above sufficient to trigger this algorithm, or do
 we need to do write extra code for this?

 Also, does the drools.sequential property make sure that rules are
 applied sequentially on facts? If so, is there a hook into the drools
 engine to figure out which particular rule is consuming more memory or
 having more execution time?

 Thanks in advance.

 Malay Shah

 

 NOTICE: If received in error, please destroy, and notify sender.
 Sender does not intend to waive confidentiality or privilege. Use of
 this email is prohibited when received in error. We may monitor and
 store emails to the extent permitted by applicable law.

 ___
 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

 --
 NOTICE: If received in error, please destroy, and notify sender. Sender does 
 not intend to waive confidentiality or privilege. Use of this email is 
 prohibited when received in error. We may monitor and store emails to the 
 extent permitted by applicable law.

 ___
 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] Moving from Jrules to Drools a couple of Issues

2010-05-27 Thread Mark Proctor
On 26/05/2010 09:56, paulnnosh wrote:
 Hi Chaps,

 We currently use Jrules 5 and are looking at our options going forward. We
 are going to evaluate Drools alongside some other products. So far I like
 the look of Drools but there are a couple of things that are puzzling me...

 - In our Jrules implementation our BOM/XOM exposes some of our application
 logic so that our rules can access application code and services to make
 decisions and updates where necessary. I can't see how this is possible in
 Drools.

Pojos just work out of the box, it's much simpler :) So any inserted 
object is a pojo and is a direct reference to the object the user 
inserted. Use globals (also simple pojos) for registering and accessing 
services.
 - Our ruleflows use decision tables to define which rules will run dependant
 upon the transaction type received. This makes assigning a rule to a single
 ruleflow group inappropriate as one rule could be used by many different
 transactions. Is it possible to create an ArrayList of rules and execute
 them one at a time via ruleflow action node?

JRules ruleflow and Drools ruleflow are very different. In JRules each 
ruleflow group is a separate knowledge base and executes statelessly. 
Where as RuleFlow in drools is for a single knowledge base and stateful 
sessions.

You can simulate the more traditional ilog way by using Drools Flow, and 
create a work item to execute some input vars against a stateless 
session. This way each branch can have it's own knowledge base and copy 
of relevant rules.

Mark
 Many Thanks






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


Re: [rules-users] Guvnor meant for business users?

2010-05-27 Thread Mark Proctor
I'd start with Decision Tables, these are the most natural metaphore for 
business users. You can use excel for Decision Tables, there is also the 
web based one but it is more limited.

Mark
On 20/05/2010 20:12, nxg912 wrote:
 Thanks for your message.

 Regarding the scenario, we were able to build the POJO model and other
 required dependencies but are not able to figure out that while working with
 Guided Editor, how to get access to internal properties of these objects,
 i.e. how to include those in the WHEN and THEN sections.

 Also, around Guvnor, our intention is to make this usable for business
 analyst and subject matter experts, i.e. they should be able to configure
 the rules and test them as well. Our understanding is that Guvnor and DSL
 are the options. At this point, to us, DSL seems like a better option than
 Guvnor from business analyst perspective. We are currently unable to build
 even slightly complex scenario and their corresponding test scenarios in
 Guvnor. So we were wondering if others in this forum are also reverting to
 DSL in case they want to get BA involved. Our impression on DRL has been
 very good as that allows you to build complex rules relatively quickly.



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


Re: [rules-users] org.drools.reteoo.AlphaNode$AlphaMemory cannot be cast to org.drools.reteoo.BetaMemory

2010-05-27 Thread Mark Proctor

On 20/05/2010 17:09, Axelrod, Nelson wrote:


Can anyone explain what this ConsequenceException means?

Exception in thread main 
_org.drools.runtime.rule.ConsequenceException_: 
_java.lang.ClassCastException_: 
org.drools.reteoo.AlphaNode$AlphaMemory cannot be cast to 
org.drools.reteoo.BetaMemory


  at 
org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(_DefaultConsequenceExceptionHandler.java:23_)


  at 
org.drools.common.DefaultAgenda.fireActivation(_DefaultAgenda.java:943_)


  at 
org.drools.common.DefaultAgenda.fireNextItem(_DefaultAgenda.java:885_)


  at 
org.drools.common.DefaultAgenda.fireAllRules(_DefaultAgenda.java:1086_)


  at 
org.drools.common.AbstractWorkingMemory.fireAllRules(_AbstractWorkingMemory.java:660_)


  at 
org.drools.common.AbstractWorkingMemory.fireAllRules(_AbstractWorkingMemory.java:627_)


  at 
org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(_StatefulKnowledgeSessionImpl.java:183_)


  at 
org.jcvi.annotation.rulesengine.RulesEngine.fireAllRules(_RulesEngine.java:210_)


  at org.jcvi.annotation.Aruba.run(_Aruba.java:311_)

  at org.jcvi.annotation.RunTest.main(_RunTest.java:55_)

Nelson


Should be fixed in 5.1 M2:
http://www.jboss.org/drools/downloads.html

Mark



___
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] 5.1M2 Issue: LeftTupleSinkUpdateAdapter onlys supports assertLeftTuple

2010-05-27 Thread Mark Proctor
On 13/05/2010 19:53, malkhafaji wrote:
 I will do that. I am just swamped right now with our production deployment
 and fixing all the issues I am having.

Still b0rked? did you try M2 yet?
http://www.jboss.org/drools/downloads.html

Mark

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


Re: [rules-users] Drools Roadmap - Planned Release 5.1 release date

2010-05-27 Thread Mark Proctor
On 27/05/2010 10:29, PAYET, Manuel wrote:
 That's great great news!
 Do you know when the maven repository will have the 5.1.0.M2 version 
 available?

 Thanks a lot drools developers guy, you make awesome work.

Toni said it was uploading when he went to bed, so I assume it's there 
already.

Mark
 -Message d'origine-
 De : rules-users-boun...@lists.jboss.org 
 [mailto:rules-users-boun...@lists.jboss.org] De la part de Mark Proctor
 Envoyé : jeudi 27 mai 2010 11:22
 À : rules-users@lists.jboss.org
 Objet : Re: [rules-users] Drools Roadmap - Planned Release 5.1 release date

 On 04/03/2010 09:21, Swindells, Thomas wrote:

  From what Mark Proctor posted in another thread:

 Edson has just merged the Rete algorithm updates into trunk, we have one 
 remaining issue with planner and after that we 5.1M2. If thins go well we 
 should 5.1 final this month.

  
 M2 is on the download page, just working on the release notes.

 Mark


  
 -Original Message-
 From: rules-users-boun...@lists.jboss.org [mailto:rules-users-
 boun...@lists.jboss.org] On Behalf Of Rohit Rai
 Sent: 04 March 2010 05:39
 To: rules-users@lists.jboss.org
 Subject: Re: [rules-users] Drools Roadmap - Planned Release 5.1
 release date


 Bump! Bump!

 Any updates on 5.1M2?
 --
 View this message in context:
 http://n3.nabble.com/Drools-Roadmap-Planned-
 Release-5-1-release-date-tp60252p427859.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 message is confidential and intended only for
 the addressee. If you have received this message in error, please 
 immediately notify the postmas...@nds.com and delete it from your system as 
 well as any copies. The content of e-mails as well as traffic data may be 
 monitored by NDS for employment and security purposes. To protect the 
 environment please do not print this e-mail unless necessary.

 NDS Limited. Registered Office: One London Road, Staines, Middlesex,
 TW18 4EX, United Kingdom. A company registered in England and Wales.
 Registered no. 3080780. VAT no. GB 603 8808 40-00
 **
 

 This message is confidential and intended only for the addressee. If you 
 have received this message in error, please immediately notify the 
 postmas...@nds.com and delete it from your system as well as any copies. The 
 content of e-mails as well as traffic data may be monitored by NDS for 
 employment and security purposes.
 To protect the environment please do not print this e-mail unless necessary.

 An NDS Group Limited company. www.nds.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






 This message contains information that may be privileged or confidential and 
 is the property of the Capgemini Group. It is
 intended only for the person to whom it is addressed. If you are not the 
 intended recipient, you are not authorized to
 read, print, retain, copy, disseminate, distribute, or use this message or 
 any part thereof. If you receive this message
 in error, please notify the sender immediately and delete all copies of this 
 message.


 ___
 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


<    4   5   6   7   8   9   10   11   12   13   >