[rules-users] rules-users Digest, Vol 88, Issue 12

Mallikarjun Kohalli (mkohalli) mkohalli at cisco.com
Wed Mar 5 04:23:51 EST 2014


Hi I am using drools 5.1.1

-----Original Message-----
From: rules-users-bounces at lists.jboss.org [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of rules-users-request at lists.jboss.org
Sent: Wednesday, March 05, 2014 2:20 PM
To: rules-users at lists.jboss.org
Subject: rules-users Digest, Vol 88, Issue 12

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: Drools template declaration in kmodule.xml (Michael Anstis)
   2. Re: Guvnor - Custom operator problem (Not finding it)
      (Michael Anstis)
   3. Re: Drools 6.0.1 Workbench - How to import existing	drl
      files? (Michael Anstis)
   4. Re: Some basic questions/assumptions on Drools
      Work-bench/Guvnor (Michael Anstis)
   5. Re: 6.0.1.F How to use @role and @expires with DSL
      (Michael Anstis)
   6. Re: Facing Problem with this exception (Wolfgang Laun)


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

Message: 1
Date: Wed, 5 Mar 2014 08:06:26 +0000
From: Michael Anstis <michael.anstis at gmail.com>
Subject: Re: [rules-users] Drools template declaration in kmodule.xml
To: Rules Users List <rules-users at lists.jboss.org>
Message-ID:
	<CAAG9P0suYi7MdP69nsNa4Y9S6c76nniZZ4u5QC72MO6zPTRLnA at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hello,

I believe the KIE API doesn't supports your use-case.

You would normally use drools-templates pro grammatically: parse the template and interpolate your data. The resulting DRL would then be added to a KBase.

Templates within the Workbench work exactly the same (and uses drools-templates); however we persist the template and accompanying data as XML that KieBuilder (fortunately) knows how to convert to DRL.

With kind regards,

Mike






On 4 March 2014 22:24, david.berkman <david.berkman at grenadefish.net> wrote:

> Is there any way to declare a drools template (*.drt) and its data 
> files (in tab delimited or csv or whatever) in a kmodule.xml for 
> publication via Maven? I realize I can use the Workbench to create a 
> 'similar' web template and deploy that as a consumable .jar file, but 
> I get the impression that this web template is not quite the same as a 
> drools template, and if I publish like that and disassemble the 
> resulting jar, that the kmodule.xml present there (if there is one), 
> would not reverse engineer and be applicable to my .drt + .csv files 
> I'm currently loading programmatically.
> And although programmatic loading works, it's not available to 
> monitoring by a KieScanner, and of dynamically loading any changes 
> thereby. I can create my own monitoring and reloading system, but I'd 
> rather not be reinventing the wheel.
>
> All help appreciated,
>
> Thanks,
> David
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Drools-template-declaration-in-kmodu
> le-xml-tp4028504.html Sent from the Drools: User forum mailing list 
> archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140305/40df25c9/attachment-0001.html 

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

Message: 2
Date: Wed, 5 Mar 2014 08:08:15 +0000
From: Michael Anstis <michael.anstis at gmail.com>
Subject: Re: [rules-users] Guvnor - Custom operator problem (Not
	finding it)
To: Rules Users List <rules-users at lists.jboss.org>
Message-ID:
	<CAAG9P0tmisdWyQss7oAVr3KYAXDYJwGpbs8YPJNt-uGprK5ntw at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

You should be able to do as Davide suggests - create a packagebuilder.conf file in the package; if not please raise a JIRA (
https://issues.jboss.org/browse/GUVNOR) and we will investigate.

(This applies to 5.5, 5.6 and 6.0)


On 4 March 2014 21:38, mattmadhavan <mmadhavan at facs.org> wrote:

> Hi Davide,
> Sorry but any idea or point me to the rt direction on how to add 
> custom operator in Guvnor?
>
> Thanks
> Matt'M
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Guvnor-Custom-operator-problem-Not-f
> inding-it-tp4028490p4028500.html Sent from the Drools: User forum 
> mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140305/33984982/attachment-0001.html 

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

Message: 3
Date: Wed, 5 Mar 2014 08:16:04 +0000
From: Michael Anstis <michael.anstis at gmail.com>
Subject: Re: [rules-users] Drools 6.0.1 Workbench - How to import
	existing	drl files?
To: Rules Users List <rules-users at lists.jboss.org>
Message-ID:
	<CAAG9P0si+BXS5UuqztU6FBuBPa8xM1+rSp6aWvU8XR=8=ntT5w at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Sure.

GIT is a version control system and is the repository implementation the workbench has by default. Simply put much like any VCS you can push/commit changes to it.

Whether the changes are made "within" the workbench (as would be the normal case for most users) or whether you have a link to the VCS from another tool; does not matter.

Within Eclipse you should be able to clone the GIT repository (think "take a copy for local use") behind the workbench (using the EGIT plugin). If you use the SSH protocol (e.g. git clone ssh://admin@server/repository) you will be able to push changes made in Eclipse back to the workbench (you could use HTTP, but you won't be able to push changes back).

If this sounds like mumbo-jumbo, please read a bit more about GIT.

With kind regards,

Mike



On 4 March 2014 23:18, mattmadhavan <mmadhavan at facs.org> wrote:

> Hi Manstis,
> Thank very much for your reply! Please bear with me if I repeat my 
> self with my questions.
>
> This is the scenario!
> * We are moving away from a custom rule engine to Drools
> * We are converting the existing rules to .drl using a parser
> * I have an standard eclipse project which I am using to test the 
> rules by loading bunch of facts (Stateless Session) from the Database. 
> All looking good.
>
> Now I want to set up the Drools-workbench so that my analysts can take 
> over and start adding new rules and test them.
>
> I am new to  drools/Guvnor/Workbench. But i have mastered the standard 
> .DRL syntax, have written my own custom operator (Which I am going to 
> share because its really useful for others too) and the project is working great.
> I am really strong with Maven but with Git kind'a newbie.
>
> I have gone thro' the docs and able to create a Project, import my 
> model jars and related jars.  Now I want to import the DRL file from 
> my eclipse project, set it up and test the individual rules.
>
> I do not really understand your second point!
>
> *2) In order to manipulate a project outside of the workbench (I.e. 
> add your rule files) you will need to clone it with the ssh protocol. 
> The workbench will display the url in the Administration perspective. 
> *
>
> Could you please elaborate how do I suck the .drl file from my eclipse 
> project to the Drools Wrokbench ?
>
> Thanks
> Matt'M
>
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Drools-6-0-1-Workbench-How-to-import
> -existing-drl-files-tp4028495p4028508.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140305/35fd8e8d/attachment-0001.html 

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

Message: 4
Date: Wed, 5 Mar 2014 08:17:32 +0000
From: Michael Anstis <michael.anstis at gmail.com>
Subject: Re: [rules-users] Some basic questions/assumptions on Drools
	Work-bench/Guvnor
To: Rules Users List <rules-users at lists.jboss.org>
Message-ID:
	<CAAG9P0vBdxMyWGe_E6wdGppD=L9BVpAfR8r30vMUqtN8FGy_4w at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

1) Correct
2) Correct
3) Correct
4) Correct
5) Correct

Your assumptions are spot on.


On 4 March 2014 23:22, mattmadhavan <mmadhavan at facs.org> wrote:

> Hello,
> I have some basic questions on the Drools workbench. Can some one 
> please validate my assumptions?
>
> 1) Drools workbench/Guvnor is not a replacement for Eclipse.
> 2) Geeks like me develop the applications in Eclipse
> 3) Drools workbench will be mainly used by the Rule authors (Business 
> Analysts etc) once I set it up for them.
> 4) The anslysts will author the rules and test it in the workbench.
> 5) They will build the DRLs into a jar  and I include it as a 
> dependency in my POM.xml.
>
> How close am I to these assumptions?
>
> Thanks
> Matt'M
>
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Some-basic-questions-assumptions-on-
> Drools-Work-bench-Guvnor-tp4028509.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140305/815d757a/attachment-0001.html 

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

Message: 5
Date: Wed, 5 Mar 2014 08:18:52 +0000
From: Michael Anstis <michael.anstis at gmail.com>
Subject: Re: [rules-users] 6.0.1.F How to use @role and @expires with
	DSL
To: Rules Users List <rules-users at lists.jboss.org>
Message-ID:
	<CAAG9P0vCO3uU4iEe-jdOyJBXozdsEJjY4cEaEE5XmMArZseuKw at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

The recommendation in 6.0.x is to use the Data Modeller.


On 4 March 2014 23:25, SrjTx <clickthex at yahoo.com> wrote:

> I searched the forum and found some stuff from 2010 related to this - 
> but no final answer, but was wondering if this has been added to 
> 6.0.1.F
>
> I want to put
>
> declare Foo
>     @role(event)
>     @expires( 5m )
> end
>
> into a Guided Rule - what is the proper way to do this?
>
>
>
>
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/6-0-1-F-How-to-use-role-and-expires-
> with-DSL-tp4028510.html Sent from the Drools: User forum mailing list 
> archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140305/fbbc0520/attachment-0001.html 

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

Message: 6
Date: Wed, 5 Mar 2014 09:49:36 +0100
From: Wolfgang Laun <wolfgang.laun at gmail.com>
Subject: Re: [rules-users] Facing Problem with this exception
To: Rules Users List <rules-users at lists.jboss.org>
Message-ID:
	<CANaj1LeH5TS5OkovPvk1=Dx29N5ndeunLu1w8XRKkDw+HJVVFA at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Could be a bug that has been fixed. No telling without knowing which version this does. - If it isn't the latest of Drools 5, try 5.6.
-W

On 05/03/2014, Mallikarjun Kohalli (mkohalli) <mkohalli at cisco.com> wrote:
> Hi All,
> We are getting the following exceptions when drools is executing some 
> rules.
>
> Exception:
>
> Caused by: java.lang.NullPointerException
>         at
> org.drools.core.util.LeftTupleIndexHashTable.remove(LeftTupleIndexHashTable.java:251)
>         at org.drools.reteoo.NotNode.retractLeftTuple(NotNode.java:226)
>         at
> org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateRetractLeftTuple(SingleLeftTupleSinkAdapter.java:217)
>         at
> org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateRetractRightTuple(SingleLeftTupleSinkAdapter.java:124)
>         at org.drools.reteoo.JoinNode.retractRightTuple(JoinNode.java:151)
>         at
> org.drools.reteoo.ObjectTypeNode.retractObject(ObjectTypeNode.java:232)
>         at
> org.drools.reteoo.ReteooWorkingMemory$WorkingMemoryReteExpireAction.execute(ReteooWorkingMemory.java:412)
>         at
> org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:1471)
>         ... 51 more
>
>
>
> Regards,
> Mallikarjun K
>


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

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

End of rules-users Digest, Vol 88, Issue 12
*******************************************



More information about the rules-users mailing list