Wednesday, July 8, 2009

JMS – a new fact provider for Drools via Pipeline

The Drools Pipeline is a great tool that allows to put facts into the rule engine from the outside world. Currently supported stores are JMS queues and topics and text files. The format of the payload is almost free to choose, since out of the box you can use JAXB, XStream and the powerful Smooks transformer to convert your data into facts, which the rule engine is able to consume.
This article explains how to use Pipelines.

Labels: , ,

4 Comments:

At July 10, 2009 at 7:43 PM , Blogger Tom Fennelly said...

Nice post Jarosław.

Your article uses Smooks to bind CSV records into Java Objects. Thought you might be interested to know that we have made it easier to do this in Smooks v1.2, either through the XML config or the new programmatic config: http://www.smooks.org/mediawiki/index.php?title=V1.2:Smooks_v1.2_User_Guide#Binding_CSV_Records_to_Java

 
At July 10, 2009 at 7:45 PM , Blogger Tom Fennelly said...

Sorry... the link was screwed there :)

Try again: Binding CSV Records to Java

 
At July 11, 2009 at 3:01 PM , Blogger Jaroslaw Kijanowski said...

Hey Tom,
thanks! Used 1.2 and this simplified config works just fine :)

<?xml version='1.0' encoding='UTF-8'?>
<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
xmlns:csv="http://www.milyn.org/xsd/smooks/csv-1.2.xsd">
<csv:reader fields="name,surname,age,type,family">
<csv:singleBinding beanId="person"
class="eu.kijanowski.drools.pipeline.model.Person" />
</csv:reader>
</smooks-resource-list>

 
At September 13, 2012 at 2:27 PM , Blogger Sri said...

Nice Article on drools Pipeline.
In our project we are using tibco as jms provider.I am facing the issue while receiving events from the pipeline.

At the below line i am getting facing an issue.

Service messenger = PipelineFactory.newJmsMessenger(entry, props, destinationName, null);


My tibco jms related properties object is as follows.

props.setProperty(Context.INITIAL_CONTEXT_FACTORY, "com.tibco.tibjms.naming.TibjmsInitialContextFactory");
props.setProperty(Context.URL_PKG_PREFIXES, "com.tibco.tibjms.naming");
props.setProperty(Context.PROVIDER_URL, "tibjmsnaming://10.76.85.216:7222");
String destinationName = "queue/DIAG1_vmware-ucs-1-v02_routing";

i am getting the following issue:

Caused by: javax.naming.NameNotFoundException: Name not found: 'ConnectionFactory'

Please help me in resolving the issue.

 

Post a Comment

Subscribe to Post Comments [Atom]

<< Home