commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: [Workflow] Is this project still active?
Date Wed, 22 May 2002 10:40:36 GMT
Hi Colin

From: "Colin Sharples" <>
> I've been meaning for some time to have a look at integrating workflow and
> messenger, but haven't had much spare time. It's still on my list of
> to do, though.

FWIW I've had similar thoughts to Craig that maybe JSTL should be the core
for looping/scripting/XPath/SQL etc in the workflow project. I had a similar
thought for the Messenger project also. The Messagelet Engine can consume
JMS messages and delegate them to a Servlet for processing (by spoofing a
HTTP request) so that right now JSP and JSTL can be used to process JMS

So I could add this to the subscription.xml in the messagelet engine...

    <subscription connection="queue" subject="incoming.order">

Then the processOrder.jsp could contain any  JSP code, including the use of
JSTL and the EL, XPath, XSLT, SQL tags etc.

One of the reasons I started Jelly was to have a lightweight, non-servlet
dependent engine for running JSTL tags and Ant tasks that could also double
up as an XML processing engine for pipelining XML into and out of messages,
SOAP calls, databases, HTTP requests, XSLT etc. To cut a long story short,
I'd like to support Jelly scripts in the Messagelet engine to avoid the HTTP
spoofing thats required in the above example; so I can fire a Jelly script
directly from a JMS MessageListener without going through unnecessary
Servlet plumbing.

I'm fairly close to having this all working; I've been temporarily diverted
lately with using Jelly to do unit testing of JMS / XML / SQL based
applications, but fairly soon we should be able to do things like this...

    <subscription connection="queue" subject="incoming.order">

Then the Jelly script for processing a JMS message could be something

<?xml version="1.0"?>
<j:jelly xmlns:j="jelly:core" xmlns:x="jelly:xml" xmlns:sql="jelly:sql">

    <!-- use the EL for looping -->
    <j:if test='${message.getHeader("myHeader") == "foo"}'>

        <!-- lets parse the incoming XML message -->
        <x:parse var="doc">
            <j:out value="${message.text}"/>

        <!-- do some XML based processing with the XML tags -->
        <x:forEach select="$doc/foo/bar">
            <x:set var="x" select="number(@something)"/>

            <!-- here's the SQL tags in action -->
                insert into foo (x) values (?)
                <sql:param value="${x}"/>



Do You Yahoo!?
Get your free address at

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message