Guvnor "inheritance"
by Joe Ammann
Hi
my users asked me to provide something like "package inheritance" in
Guvnor. They would like to be able to define some artefact types (most
notably DLSs, Working Sets, function definitions and extensible rules)
in a "parent package", and then create "sub packages" where only the
pure rule definitions live, but can use the artefacts from the "parent
package".
Now I realise that Guvnor/Drools packages are not really hierarchical.
They may happen to have dots in their name and be displayed in a tree,
but that's all.
I can implement this by doing "inheritance by copying", since I provide
the access to the Guvnor tree with my own Eclipse RCP application and
only use the asset editors from Guvnor. But I was wondering if I'm
missing some fundamental concept in Guvnor that would make this easy?
I could also imagine this to be realized by extending the concept of
working sets from fact types and fields to also include DSL, functions
and rules. That would even be more flexible :-)
--
CU, Joe
13 years
removing reference to Global Data Model from Drools Package in Guvnor
by Welsh, Armand
Hello community,
I have noticed in interesting paradox in Guvnor.
If I promote my data model to the Global package, I can then import the model from global into my individual packages, so that I can update the model once, and all packages that use the model automatically have the new model.
However, I have a need to remove the imported model from one of my packages.
If I select the Model view, I have three buttons, Refresh List, Open Selected, and Open Selected to Single Tab.
If I open the model, and select the Attributes tab, it show the model comes from Global. If I archive the model, the global model is archived, and removed from all packages. If I restore the model, it is restored to all the packages that referenced it prior to archiving the model.
So my question: how to I remove a model, that was imported into a package from the Global Area, from my package, without remove the global model from the global area?
Regards,
Armand Welsh
13 years
Re: [rules-users] Guvnor hates me
by Ronald Albury
Thanks Michael ... you've been very helpful.
Yes, I am considering helping out on the documentation (my undergrad is in
Instructional Technology) ... if I can ever figure out how all of this
works. I have also read thru some of the 3rd party books on the subject,
and I find them quite lacking also. I am not a dumb person, and I am not
inexperienced (been programming since 1980) ... so either I am just having
issues with the writing style of the manuals/books, or other people are
having trouble with them as well.
While we're waiting for an eclipse person to speak up, I have another
eclipse question. If I do a Project->Build All, I can see the errors in my
rule files. How can I configure eclipse to see the drl errors when I save
the files (as happens with my Java files).
Thanks.
13 years
Re: [rules-users] Regular expression problem in .dsl
by FrankVhh
Hi,
The placeholder will just be replaced by whatever the user input is, there
is no need to do those String operations.
In your dsl, copy your DRL and replace everything that is user input by
{keyword}. Nothing else has to be done.
Regards,
Frank
fiitkar wrote
>
> Hello,
>
> I have a problem how to define the proper regular expression in .dsl file,
> LHS part, when searching a string with a defined input character.
>
> Before I used .drl file, the rule looks like:
> plan : Plan( item matches "S.*|.*[^#]S.*" ) - that's OK. So it matches an
> input with S, but not #S - that is not the point...
>
> But how to define it in .dsl file?
> Keep in mind that character "S" comes from the user, so it have to be
> merged with my regular expression.
>
> I tried it that way:
> [condition][]There is a Plan with item1 {inputCharacter}=$Plan : Plan(item
> matches {inputCharacter} + ".*|.*[^#]" + {inputCharacter} + ".*" )
>
> But I got compilation error: mismatched token ....
> So I want to create a regular expression using the input character.
> I use Drools 4.0.7
>
> Regards,
> Peter
>
--
View this message in context: http://drools.46999.n3.nabble.com/Regular-expression-problem-in-dsl-tp355...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years
CDI Integration
by Robert Morse
I was asking the Seam 3 guys about Drools support, and Shane Bryzak replied:
"We need to update that page - Seam will not be providing a Drools module, rather the Drools team will be providing native CDI integration instead."
Any idea when there will be CDI support?
The human mind is an iterative processor, it never does anything right the first time. What it does well is to make improvements on every iteration (deMarco)
13 years
Memory leak in Drools InputMarshaller - JBRULES-3303
by Swindells, Thomas
We've identified a memory leak in Drools when using JPAKnowledgeService.loadStatefulKnowledgeSession.
We've raised the issue here https://issues.jboss.org/browse/JBRULES-3303?focusedCommentId=12647082#co...
The problem is that the InputMarshaller ends up registering a listener on the knowledge base twice, but only cleans up one of them when the session is disposed. This results in the KnowledgeBase keeping a reference to the session and leaking memory.
I've done an analysis of it and the fix appears to be changing InputMarshaller line 204 from
session.setKnowledgeRuntime(new StatefulKnowledgeSessionImpl(session));
to
new StatefulKnowledgeSessionImpl(session);
The sessionImpl calls session.setKnowledgeRuntime() during the constructor.
I've attached a fuller explanation to the issue and there is sample code there as well.
It would be great if this could be applied to the 5.3 branch as we need this fix in order to be able to deploy our application.
Thanks,
Thomas
________________________________
**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster(a)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
**************************************************************************************
13 years
Assignment problem
by Patrik Dufresne
Hi,
I am a Java developer and I am currently working on a work force management
software for food compagnies. So far, I've decided to use constraint
programming (CP) to find a solution to the problem. The current version is
using JaCoP as a solver, but I find it hard to make it support
soft-constraint and it only use Depth First search. So I'm looking around for
a different solver engine and Drools Planner seams to fit my need. I'm
just concern about it's speed since I don't see any way to add global
constraint (like all-different, Count, Among, etc.)
I've look closely to the nurse rostering example. My problem is very
similar. Let say, I have 150 nurses, ~42 different skills, 9 shifts, ~300
events to be assigned. Whats make it easier compare to the example, I only
need to plan one week. My question is simple, does Drools will be able to
handle it ?
To give a better understanding of the problem I'm trying to solve, I've
attach a PDF document with more explanations. (
https://docs.google.com/open?id=0BykkHu_UReIvYzg3NmM2YmUtYjVhNy00NjgwLTli...
)
Thanks to post your opinion.
Any tips are welcome.
--
Patrik Dufresne
13 years