Re: [rules-dev] [rules-users] Setting strictTyping/strongTyping modes
by Wolfgang Laun
Ha! I just won the bet against myself that this would be your next thread
,-)
There is a hint in the hodge-podge document describing all that is and was
new in release x.y.z, but this one is kinda lost on users who don't know
where and how these properties should be fed to the system in the first
place.
There ought to be an API way of saying strict or not strict, and it should
be documentented somewhere.
Cheers
Wolfgang
On 21 March 2012 19:45, barnesjd <barnesjd+nabble(a)gmail.com> wrote:
> I'm trying to disable strictTyping for my MVEL rules, but I cannot figure
> out
> how. http://mvel.codehaus.org/MVEL+2.0+Typing The only example I've
> found
> shows the use of the class ParserContext. I'm using KnowledgeBuilder,
> KnowledgeBase, StatefulKnowledgeSession, etc. to run my rules. I don't see
> any methods where I can disable strictTyping or get the ParserContext, so
> I'm out of ideas.
>
> Can anyone point me in the right direction?
>
> Thanks!
> Joe
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Setting-strictTyping-strongTyping-modes...
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
12 years, 9 months
GIT: lesson learned when working on a big task
by Edson Tirelli
All, just to share something I recently realized (although in hindsight
might be obvious).
As everybody knows, everyone working in a project with GIT, should be
using a cloned repository, and only push to the blessed repository when it
is safe. Even more than that, working on a branch created specifically for
your feature makes things a lot easier, specially to send pull requests.
The problem is that when you are working on a large feature with many
commits, for several weeks in a row, you have to keep rebasing your work on
top of master so that you can be sure your code includes the work of
everybody else. But when you are rebasing like 30+ commits (my case with
the serialization work), each commit representing one step on your changes,
it is possible that each rebase will cause many conflicts.... even worse,
the same file will probably cause several conflicts during a single rebase.
The solution to the problem is actually very simple... when you
accumulate several commits and you start having problems with rebase, just
squash all your commits into a single commit. This way your new single
commit will contain the whole change, and not a sequence of small changes.
More than that, the change will be consistent with the HEAD of the
branch/master at the time you do it and once you resolve any eventual
conflicts, you will not need to resolve them anymore in future rebases.
The ProGIT book shows you how to do this [1], but please remember the
golden rule:
"NEVER EVER REBASE COMMITS THAT YOU PUSHED TO THE BLESSED REPOSITORY"
Just thought it was worth sharing.
[1] http://progit.org/book/ch6-4.html
Edson
--
Edson Tirelli
JBoss Drools Core Development
JBoss by Red Hat @ www.jboss.com
12 years, 9 months
IMPORTANT: big commit incoming
by Edson Tirelli
All, I am about to do a big commit into the master branch (as in roughly 98
changed files with 35,731 additions and 1,795 deletions. ). This is the
implementation for the new serialization protocol. I will do that in 1 hour
from now... if anyone needs me to wait, please speak now or never... :)
Thanks,
Edson
--
Edson Tirelli
JBoss Drools Core Development
JBoss by Red Hat @ www.jboss.com
12 years, 9 months
NPE with nested patterns
by Esteban Aliverti
Hi Guys,
I'm having a NPE in one of the rules I'm using and I can't find the cause.
I'm attaching a test project that shows the problem.
Basically, I have 1 rule that contains some nested 'ands' and 'ors'
patterns. The rule is being auto-generated from some data, that is why it
has this strange structure.
We tried to refactor the rule by separating it in different
rules, extract some common factors, etc. and in some cases it works.
So I'm not sure whether the original rule is wrong or if I'm hitting a bug
in Drools.
Inside the test project you can find the original rule
(SimpleHighRiskSepsis.drl) and all the other refactors we did.
Best Regards,
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Esteban Aliverti
- Developer @ http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com
12 years, 9 months
ExecutorProvider as a Service
by Mario Fusco
Hi all,
following the suggestions of Mark on how to create a new Service I just
pushed a new one named ExecutorProvider. The idea here is that we should
never manually create and start Threads in the Drools code because this is
inefficient and event worse is not portable in many enterprise
environments. In this way it will be possible to provide different
implementations of this Service that could work with J2EE, Spring or other
similar managed environments.
The ExecutorProvider is defined as it follows:
public interface ExecutorProvider extends Service {
Executor getExecutor();
<T> CompletionService<T> getCompletionService();
}
I am already using it to make the jitting compilation of my MvelConstraint
an asynchronous process and also to replace the Threads used in the
KnowledgeAgentImpl and ResourceChangeScannerImpl. For instance in the
KnowledgeAgentImpl I replaced this code:
this.thread = new Thread( this.changeSetNotificationDetector );
this.thread.start();
with this one:
this.notificationDetectorExecutor =
ExecutorProviderFactory.getExecutorProvider().<Boolean>getCompletionService()
.submit(this.changeSetNotificationDetector,
true);
where the notificationDetectorExecutor is a Future so I can stop its
execution with:
this.notificationDetectorExecutor.cancel(true);
instead of doing:
this.thread.interrupt();
Also note that, at the moment, the ExecutorService internally used in the
ExecutorProviderImpl (the only ExecutorProvider implementation currently
available) always uses daemon Threads, so the JVM won't be prevented to
terminate if there are some of them still running.
Mario
12 years, 9 months
Guided Editor in BRMS / Guvnor Version 5 (Snapshot of 26 June)
by Paul Browne
Folks,
For various reasons I'm trying out the Guided Editor for Business Rules in
the Guvnor Version 5 (Snapshot of 26 June from Hudson, deployed on JBoss App
Server 4.2.2GA).
I've created the Package / Category and uploaded a simple fact model (as
works in BRMS version 4). I create a new business rule using the guided
editor and the screen shows successfully with both 'When' and 'Then'
parts.Assume the next question is due to me missing something, but wanted to
double check:
When I press the green '+' to the right of the screen I am shown the message
/ dialog layer saying '
*Add a condition to the rule... *or* Add an action to the rule.
*Problem is that there doesn't appear to be a way of adding a condition or
action. The only thing I'm seeing in the logs is
* (Contexts.java:flushAndDestroyContexts:335) could not discover
transaction status
*Am I missing something or should I come back to Guvnor later in the
development Cycle?
Thanks
Paul
12 years, 9 months
Re: [rules-dev] [jbpm-dev] [JBPM 5.x] service task repository
by Michael Anstis
Lol, yes you sort of hijacked the thread ;)
We're going to be re-architecting guvnor over the coming months/years...
get your requirements in now - email drools-dev (I've cc'ed) and we can try
to accommodate... short-term community pull requests will be considered -
you are still community for the time being ;)
sent on the move
On 13 Mar 2012 23:05, "Mauricio Salatino" <salaboy(a)gmail.com> wrote:
> Yes.. I was thinking as a light way component, POJO based decoupled from
> the rest of the WEB application that can be started without the need of a
> servlet container.. But I think that we went off the topic completely :)
> Cheers
>
> On Tue, Mar 13, 2012 at 10:56 PM, Michael Anstis <michael.anstis(a)gmail.com
> > wrote:
>
>> Well, there is guvnor-repository that provides low level operations to
>> (in theory) a Guvnor repository. However all our classes, integrity logic
>> and means to expose it as an external service (ie REST, WebDav) are AFAIK
>> in guvnor-webapp-core which you can't deploy outside of a container.... but
>> this, in theory, could be split into different modules to provide better
>> access. I am sure you appreciate exposing REST needs a container however
>> WebDav might not. IDK.
>>
>> sent on the move
>>
>> On 13 Mar 2012 22:24, "Mauricio Salatino" <salaboy(a)gmail.com> wrote:
>>
>>> Michael, do you know if you can bootstrap the JCR container without a
>>> container? I think that it should be possible.. to have like a repository
>>> guvnor without all the UI. We should think about that option too right?
>>> Cheers
>>>
>>> On Tue, Mar 13, 2012 at 10:20 PM, Michael Anstis <
>>> michael.anstis(a)gmail.com> wrote:
>>>
>>>> Yes, I agree largely with what you say, but to add a little balance I
>>>> thought I'd respond too ;)
>>>>
>>>> 1) Technically, Guvnor doesn't need a J2EE server, just a Servlet
>>>> container so Tomcat does the job just fine.
>>>>
>>>> 2) AFAIK, you can download individual assets source from Guvnor with
>>>> the REST API. If you pushed a package file to Akamai* you have the same
>>>> issue.
>>>>
>>>> 3) Fair point. If you don't have a single folder on Akamai* but scatter
>>>> your assets across a file system you have the same issue.
>>>>
>>>> 4) OK, move the point of failure from your control to a cloud solution.
>>>> Simpler, probably cheaper, but fair point.
>>>>
>>>> I don't mean to start a tit-for-tat exchange, just adding some balance.
>>>>
>>>> Cheerio,
>>>>
>>>> Mike
>>>>
>>>> *Other cloud providers are available.
>>>>
>>>>
>>>> On 13 March 2012 17:43, Tihomir Surdilovic <tsurdilo(a)redhat.com> wrote:
>>>>
>>>>> I think you have very valid points. IMO just:
>>>>> 1) There should not be a limitation exposed on users to have to have
>>>>> Guvnor (and thus a J2EE server) running in order to host static files
>>>>> (service repo).
>>>>> 2) Guvnor assets are divided into packages, if you lets say have a
>>>>> "serviceRepo" package and from what I can tell you say build it and expose
>>>>> a pkg or zip or whatever, someone on the other end has to understand what a
>>>>> pkg file is/isnot or have to know how to unzip etc.
>>>>> 3) If you do not have a dedicated guvnor package for your service
>>>>> repo, then you need advanced logic to piece together all assets that belong
>>>>> to your repo..in the same environment that your users are
>>>>> developing/modelling in..not very intuitive imo.
>>>>> 4) Let's say you want to use guvnor and this is some sort of
>>>>> mission-critical service repo for you, to do this now you need a clustering
>>>>> environement of J2EE server(s) and Guvnor running in a cluster all
>>>>> connected to a clustered JCR repo..etc etc..instead of just pushing your
>>>>> static files to akamai and call it a day :)
>>>>>
>>>>> Thanks.
>>>>>
>>>>>
>>>>> On 3/13/12 1:32 PM, Mauricio Salatino wrote:
>>>>>
>>>>> Tiho, a question for you.. why guvnor cannot host a file? I mean.. I'm
>>>>> not sure how Porcelli is creating the war files for the services, but we
>>>>> can generate something similar right? some meta information, some images,
>>>>> some configuration files, etc, when the user or a client like eclipse want
>>>>> to get the workitemhandler installed it just create a zip file with all the
>>>>> required dependencies and it send that back to the client. In that way we
>>>>> will gain versioning, categorization and tagging for free..right? Plus the
>>>>> possibility in the future to manage that with a workflow for approvals if
>>>>> we add that for all the other resources.
>>>>> Probably I'm missing something but I don't understand what is the
>>>>> Guvnor limitation to host files or descriptors, we are already doing that
>>>>> for spring beans configs.
>>>>>
>>>>> Cheers
>>>>>
>>>>>
>>>>> On Tue, Mar 13, 2012 at 5:25 PM, Tihomir Surdilovic <
>>>>> tsurdilo(a)redhat.com> wrote:
>>>>>
>>>>>> I'm not sure if Guvnor is the best place for it - because assets
>>>>>> that are stored in Guvnor are not very portable as a "unit" outside of
>>>>>> Guvnor. I would rather make it in a way work like maven -> users can
>>>>>> specify the "parent" repository which can be one that we provide for the
>>>>>> community with all out-of-the-box services nodes and run mvn clean install
>>>>>> which will build their local repo that they can expose on any public domain
>>>>>> or server they wish, any way they wish..just my 2c.
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 3/13/12 12:11 PM, Mauricio Salatino wrote:
>>>>>>
>>>>>> At some point those definitions should be stored in guvnor right?
>>>>>> Until now I think it's just a folder with some meta-data files to define
>>>>>> what is in there, but I think that it really make sense to put that
>>>>>> functionality inside guvnor that is a fully fledged repository right?
>>>>>> Guvnor already provide the APIs to push resources, and we definitely
>>>>>> need to add a kind of workflow for resources.. but it's not there yet.
>>>>>>
>>>>>> Cheers
>>>>>>
>>>>>> On Tue, Mar 13, 2012 at 4:08 PM, Giovanni Marigi <gmarigi(a)redhat.com>wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>> I would like to know the status of service task repository;
>>>>>>> I really appreciate the idea behind it and delivering some POC,
>>>>>>> customers were really enthusiastic about this feature (especially its
>>>>>>> integration with jbpm designer and BRMS) but it seems that the actual repo
>>>>>>> doesn't have some new effort.
>>>>>>> Will we provide API to push service tasks to the repository? I think
>>>>>>> it should be useful to provide some mechanism to approve a new service task
>>>>>>> before to make it public.
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Giovanni
>>>>>>>
>>>>>>> --
>>>>>>> Giovanni Marigi
>>>>>>> Red Hat - JBoss Consultant -
>>>>>>> email: gmarigi(a)redhat.com
>>>>>>> Mobile: +39 3423175986 <%2B39%203423175986>
>>>>>>> Office: +39 0687502315 <%2B39%200687502315>
>>>>>>>
>>>>>>> Red Hat Italy
>>>>>>> Via Andrea Doria 41m
>>>>>>> 00192 Roma - Italy
>>>>>>> www.redhat.com
>>>>>>>
>>>>>>> Prima di stampare, pensa all'ambiente ** Think about the environment
>>>>>>> before printing
>>>>>>> _______________________________________________
>>>>>>> jbpm-dev mailing list
>>>>>>> jbpm-dev(a)lists.jboss.org
>>>>>>> https://lists.jboss.org/mailman/listinfo/jbpm-dev
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> - MyJourney @ http://salaboy.wordpress.com
>>>>>> - Co-Founder @ http://www.jugargentina.org
>>>>>> - Co-Founder @ http://www.jbug.com.ar
>>>>>>
>>>>>> - Salatino "Salaboy" Mauricio -
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> jbpm-dev mailing listjbpm-dev@lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/jbpm-dev
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> - MyJourney @ http://salaboy.wordpress.com
>>>>> - Co-Founder @ http://www.jugargentina.org
>>>>> - Co-Founder @ http://www.jbug.com.ar
>>>>>
>>>>> - Salatino "Salaboy" Mauricio -
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> jbpm-dev mailing list
>>>>> jbpm-dev(a)lists.jboss.org
>>>>> https://lists.jboss.org/mailman/listinfo/jbpm-dev
>>>>>
>>>>>
>>>>
>>>
>>>
>>> --
>>> - MyJourney @ http://salaboy.wordpress.com
>>> - Co-Founder @ http://www.jugargentina.org
>>> - Co-Founder @ http://www.jbug.com.ar
>>>
>>> - Salatino "Salaboy" Mauricio -
>>>
>>>
>
>
> --
> - MyJourney @ http://salaboy.wordpress.com
> - Co-Founder @ http://www.jugargentina.org
> - Co-Founder @ http://www.jbug.com.ar
>
> - Salatino "Salaboy" Mauricio -
>
>
12 years, 9 months
Don't name your test *IntegrationTest, unless it needs to be run after "mvn package"
by Geoffrey De Smet
Hi guys,
A small change in the droolsjbpm-parent pom's surefire plugin:
"mvn test" will run all tests, except those with the name
"*IntegrationTest".
The latter will be run by "mvn integration-test", which is run after
"mvn package" and before "mvn install" automatically.
Any tests that were named *IntegrationTest but need to be run during
"mvn test", have been renamed appropriately.
Only guvnor currently has tests named *IntegrationTest that have to be
run after the war has been created by "mvn package".
PS: If you have tests that shouldn't run:
- either @Ignore them (so they are reported in hudson)
- or declare the class abstract: public abstract class ...
But do not exclude them in an overridden maven-surefire-plugin
configuration.
--
With kind regards,
Geoffrey De Smet
12 years, 9 months
Maven Project Structure
by Justin Holmes
Hello Devs,
I'm currently working on a project where I'm embedding Drools inside my
application and using Maven to pull down the necessary artifacts. During
this exercise, I've noticed that each project's pom (e.g. drools-core)
references an aggregator pom (e.g drools-multiproject) as its parent. These
aggregators then reference droolsjbpm-parent as their parent. I'm no maven
expert, but it seems to me that this introduces an unnecessary layer of
artifacts in the maven repository. My understanding is that aggregators are
present solely to propagate build commands to their children and do not
contain dependency information (as is the case in the Drools aggregators),
so shouldn't the project poms reference droolsjbpm-parent directly?
Thanks,
Justin
12 years, 9 months