camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "" <>
Subject Re: [DISCUSS CAMEL 3.0] weekly IRC chat at 02/12/2013 7:00PM - 8:00PM CET
Date Sat, 04 May 2013 10:56:07 GMT
>[19:23:13] <hadrian>     another thing i looked at recently is scxml, i'll 
>write a component for it too, probably at acon 
Does scxml really need v3?   Surely it can work just fine in camel 2?
I imagined two interfaces -
A producer that sends an event to an scxml executer, and a eventDispatcher
that receives sends from scxml, sending them to consumers. 

examples using jexl:
     <state id="state6">
           <transition event="exchange" target="state7"
                       cond="_eventdata.getProperty('key') eq 7"/>
           <transition event="exchange" target="state8"
                       cond=" eq 7"/>
     <state id="state7" final="true"/>

A producer drives it by triggering an event:
        //exchange.setProperty("key", new Integer(7));
        Message message = new DefaultMessage();
        message.setBody(new Integer(7));
        te = new TriggerEvent("exchange", TriggerEvent.SIGNAL_EVENT,
Which transitions from state6 to state7.

Exchange headers can be saved in the state context domain model:
        message.setHeader("key", "val");
        te = new TriggerEvent("exchange", TriggerEvent.SIGNAL_EVENT,
     <state id="state9" final="true">
              <assign name="dmone" expr="['key']" />
But the exchange can't be updated and returned to camel (that I know of), so
its a one way trip.

To go from scxml to camel the scxml Send Event calls a custom
     <state id="state9" final="true">
              <assign name="dmone" expr="['key']" />
              <send event="'body'" type="'t'" target="'jms:x'"
targettype="'camelEndPoint'" namelist="dmone dmtwo">
The scxml domain model items must be named on the send namelist (dmone,
dmtwo in the above example). 

  EventDispatcher eventDispatcher = new EventDispatcher() {
			public void cancel(String sendId) {
			public void send(String sendId, String target, String targetType,
					String event, Map params, Object hints, long delay,
					List externalNodes) {
An implementation of the EventDispatcher should be able to create an
exchange, assign the event to the body, the params to the exchange
headers/properties, look up the endpoint.
Again its a one-way trip.

View this message in context:
Sent from the Camel Development mailing list archive at

View raw message