[rules-users] rules-users Digest, Vol 49, Issue 16

Mike Love mike.love at symbiotics.co.za
Mon Dec 6 04:23:21 EST 2010


Regards,
Mike Love
mike.love at symbiotics.co.za

-----Original Message-----
From: rules-users-request at lists.jboss.org
Sender: rules-users-bounces at lists.jboss.org
Date: Mon, 06 Dec 2010 04:15:57 
To: <rules-users at lists.jboss.org>
Reply-To: rules-users at lists.jboss.org
Subject: rules-users Digest, Vol 49, Issue 16

Send rules-users mailing list submissions to
	rules-users at lists.jboss.org

To subscribe or unsubscribe via the World Wide Web, visit
	https://lists.jboss.org/mailman/listinfo/rules-users
or, via email, send a message with subject or body 'help' to
	rules-users-request at lists.jboss.org

You can reach the person managing the list at
	rules-users-owner at lists.jboss.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of rules-users digest..."


Today's Topics:

   1. Re: Repackaging of the jar: missing	drools.rulebase.conf?
      (Kris Verlaenen)
   2. Re: Task Server as Jboss Service (Cristiano Nicolai)
   3. Drools Spring + JPA + JTA (Cristiano Nicolai)
   4. Re: How to modify changeset.xml in guvnor (Jervis Liu)
   5. new to Drools: modeling issues (Gabor Szokoli)


----------------------------------------------------------------------

Message: 1
Date: Sun, 05 Dec 2010 21:57:50 +0100
From: Kris Verlaenen <kris.verlaenen at cs.kuleuven.be>
Subject: Re: [rules-users] Repackaging of the jar: missing
	drools.rulebase.conf?
To: Rules Users List <rules-users at lists.jboss.org>, drdaveg at gmail.com
Message-ID: <4CFBFCCE.1020507 at cs.kuleuven.be>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

This is specified in the drools-core jar, in the 
drools.default.rulebase.conf:
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-core/src/main/resources/META-INF/

Kris

drdaveg wrote:
> I had several Eclipse projects with customized WorkItem's in 5.1.  The latest
> download of the source code seems to have been reorganized: I see
> drools.rulebase.conf files that seem unrelated to drools.workDefinitions and
> all the versions that look like what I would expect are in the example files
> and their jars; have the drools-process jar's been repackaged without
> drools.rulebase.conf or might this file have been deprecated?
>
> What I had been expecting was to find an entry like:
>
> drools.workDefinitions = WorkDefinitions.conf
>
> in the file with a corresponding WorkDefinitions.conf file for the email and
> log WorkItem's.  Thanks!
>   



------------------------------

Message: 2
Date: Mon, 6 Dec 2010 09:20:38 +1000
From: Cristiano Nicolai <cristiano.nicolai at gmail.com>
Subject: Re: [rules-users] Task Server as Jboss Service
To: Rules Users List <rules-users at lists.jboss.org>
Message-ID:
	<AANLkTimYSqyNCQi7uyKN2=2kUgxLXc5A0SaFfE4hLc-K at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

OK, done: https://jira.jboss.org/browse/JBRULES-2818

There's any reason for packing drools-process-task with persistence.xml? The
problem is that Jboss will try to deploy it if it's in the classpath.


Thanks.

2010/12/3 Mauricio Salatino <salaboy at gmail.com>

> You can create a jira issue explaining your contribution as a new feature.
> And attach a patch or the project into it. Then we will review it and let
> you know.
>
> 2010/12/3 Cristiano Nicolai <cristiano.nicolai at gmail.com>
>
> I'd done some work on deploying the task service on Jboss and I'm wondering
>> that could be a new maven module.
>> I also changed the rhq-plugin to control it over admin-console.
>>
>> How can I start to contribute with that?
>>
>> Thanks
>>
>>
>> On Thu, Dec 2, 2010 at 9:29 AM, Cristiano Nicolai <
>> cristiano.nicolai at gmail.com> wrote:
>>
>>> That's interesting and important as well, I'll give a try with HornetQ...
>>>
>>> There's any sample configuration? Which WorkItemHandler must be used...
>>>
>>> Thanks
>>>
>>>
>>> 2010/12/1 Mauricio Salatino <salaboy at gmail.com>
>>>
>>>> Hmm it really depends on your scenario.
>>>> Mina doesn't have message realibility and a lot of things that HornetQ
>>>> provides. But If you are OK with Mina you can use it.
>>>>
>>>>
>>>>
>>>> 2010/11/30 Cristiano Nicolai <cristiano.nicolai at gmail.com>
>>>>
>>>>> No, I didn't, I just saw some sources in the drools-process-task
>>>>> module. I preferred to go with what is in the documentation, wondering that
>>>>> Mina transport is the recommended approach.
>>>>>
>>>>> 2010/12/1 Mauricio Salatino <salaboy at gmail.com>
>>>>>
>>>>> did you try the HornetQ integration?
>>>>>> The main idea was to create a transport agnostic TaskServer, so for
>>>>>> each implementation you can choose between different technologies depending
>>>>>> on the situation.
>>>>>> I'm not sure if there is another effort for this kind of deployment..
>>>>>> if no one else answer this mail feel free to propose and contribute with
>>>>>> your ideas.
>>>>>> Greetings
>>>>>>
>>>>>> 2010/11/30 Cristiano Nicolai <cristiano.nicolai at gmail.com>
>>>>>>
>>>>>>> If there's no other way/plans to deploy it, even using HornetQ
>>>>>>> integration, I'll be more than happy to contribute!
>>>>>>>
>>>>>>> 2010/11/30 Mauricio Salatino <salaboy at gmail.com>
>>>>>>>
>>>>>>> I think that your idea would be a great contribution!
>>>>>>>>
>>>>>>>> 2010/11/30 Cristiano Nicolai <cristiano.nicolai at gmail.com>
>>>>>>>>
>>>>>>>>> Hi guys,
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> I think that would be great if we could deploy the TaskServer
>>>>>>>>> (MinaTaskServer) as a JbossMC bean, making possible to administer it using
>>>>>>>>> admin-console.
>>>>>>>>>
>>>>>>>>> There's any work in this way or other plans to deploy this
>>>>>>>>> component?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Thanks.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Best regards,
>>>>>>>>>
>>>>>>>>> Cristiano Nicolai
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> rules-users mailing list
>>>>>>>>> rules-users at 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 at lists.jboss.org
>>>>>>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Best regards,
>>>>>>>
>>>>>>> Cristiano Nicolai
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> rules-users mailing list
>>>>>>> rules-users at 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 at lists.jboss.org
>>>>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best regards,
>>>>>
>>>>> Cristiano Nicolai
>>>>>
>>>>> _______________________________________________
>>>>> rules-users mailing list
>>>>> rules-users at 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 at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>>
>>>>
>>>
>>>
>>> --
>>> Best regards,
>>>
>>> Cristiano Nicolai
>>>
>>
>>
>>
>> --
>> Best regards,
>>
>> Cristiano Nicolai
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users at 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 at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>


-- 
Best regards,

Cristiano Nicolai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20101206/115327cc/attachment-0001.html 

------------------------------

Message: 3
Date: Mon, 6 Dec 2010 12:09:21 +1000
From: Cristiano Nicolai <cristiano.nicolai at gmail.com>
Subject: [rules-users] Drools Spring + JPA + JTA
To: Rules Users List <rules-users at lists.jboss.org>
Message-ID:
	<AANLkTi=JW2aBs9MSLZQ9b6eu=zVPKOddjgDAq6iTo47s at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi guys,

I'm trying to deploy a spring based Knowledege Session with JPA persistence
on Jboss 5.1, I was able to do it using a RESOURCE_LOCAL persistence unit
but I would like to use a container JTA based deployment.

Basically, JPAConfiguration requires a Spring PlatformTransactionManager
then I tried to use the following combination:

<bean id="springTxManager"
class="org.springframework.transaction.jta.JtaTransactionManager" />
<jee:jndi-lookup id="springEMF" jndi-name="java:DroolsEMF"/>

The problem is that using it,
SingleSessionCommandService.initTransactionManager does not create a
JPAManager.

So, my guess for this to work is to add support for this on
SingleSessionCommandService or change JPAConfiguration
(drools-spring-1.0.0.xsd) to accept that no transaction-manager is defined,
causing Drools JtaTransactionManager to lookup the TransactionMananger from
JNDI context.

The only way that I could deploy it is using these beans definitions:

<bean id="springEMF"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
        <property name="persistenceXmlLocation"
value="classpath:META-INF/spring-persistence.xml" />
        <property name="jpaVendorAdapter">
            <bean
class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" />
        </property>
    </bean>

    <bean id="springTxManager"
class="org.springframework.orm.jpa.JpaTransactionManager">
           <property name="entityManagerFactory" ref="springEMF" />
    </bean>


Thanks.


-- 
Best regards,

Cristiano Nicolai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20101206/3296bf32/attachment-0001.html 

------------------------------

Message: 4
Date: Mon, 06 Dec 2010 12:27:28 +0800
From: Jervis Liu <jliu at redhat.com>
Subject: Re: [rules-users] How to modify changeset.xml in guvnor
To: rules-users at lists.jboss.org
Message-ID: <4CFC6630.5060903 at redhat.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 2010/12/4 7:52, kenichiwa wrote:
>
> A couple of new things I notice. I changed the components.xml file in the
> drools-guvnor.war to bypass login and treat everyone as guest. I get
> different results depending on the URL I access from a browser:
>
> Does NOT require authentication:
> http://localhost:9080/drools-guvnor/org.drools.guvnor.Guvnor/Guvnor.html
>
> Does NOT require authentication:
> http://localhost:9080/drools-guvnor/org.drools.guvnor.Guvnor/package/defaultPackage/LATEST/ChangeSet.xml
>
> DOES require authentication:
> http://localhost:9080/drools-guvnor/org.drools.guvnor.Guvnor/package/defaultPackage/LATEST
>
This should have been fixed in revision 35785 on trunk. So try a 
snapshot version, it should not ask for authentication anymore if you 
have configured Guvnor to bypass login. Details please see jira: 
http://jira.jboss.org/browse/GUVNOR-802

Cheers,
Jervis
> What gives??



------------------------------

Message: 5
Date: Mon, 6 Dec 2010 10:15:19 +0100
From: Gabor Szokoli <szocske at gmail.com>
Subject: [rules-users] new to Drools: modeling issues
To: rules-users at lists.jboss.org
Message-ID:
	<AANLkTi=q7-jAxZA6UL00erd6Gi1NWvx+_+=qcdTasOKJ at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Hi there,

We are evaluating Drools for an industry project. Trouble is, I'm not
good at ignoring men behind curtains, and need to know how things
actually work.
Links to papers explaining the theory and principles of Drools Expert
are highly appreciated.

Some specifics:

We have a network of domain objects, with basic attributes (numbers,
strings, enums) and two-way mapped associations.
Rules modify the basic attributes only. Associations (references and
reference sets) are static.
"where" conditions refer to both static information and modifiable attributes.
I was wondering how I can express this distinction in my domain
objects without sacrificing readability of the actual rules?
(Domain experts should be able to edit the rules themselves.)

Here's the current pattern of my rules:


rule "child molester"
where
	$parent : Parent( ... )
	$child: Child(parent==$parent ... attribute!="value")
then
	modify ($child) { setAttribute("value") }
end

I'm not happy my users need to know about the setter methods instead
of using the same reflection-backed notation as in the condition.
I also worry they'll make infinite loops by omitting the
"attribute!=value" clause.

So I guess I should elevate the attributes to first class status in my
model to make them the atomic unit of triggering, but how do I do that
elegantly?

rule "attribute molester"
where
	$parent : Parent( ... )
	$attribute : StringHolder(get()!="value")
	$child: Child(parent==$parent ... attribute=$attribute)
then
	modify ($attribute) { set("value") }
end


That looks worse than before! Please share your thoughts.


Thanks in advance:

Gabor Szokoli


------------------------------

_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


End of rules-users Digest, Vol 49, Issue 16
*******************************************




More information about the rules-users mailing list