here it is:
my route:
<code>
<route>
<from uri="activemq:personnel.records"/>
<policy ref="droolsPolicy">
<unmarshal ref="myjaxb"/>
<to uri="drools:node1/ksession1?action=insertExchange"/>
<routingSlip uriDelimiter="#">
<header>routingSlip</header>
</routingSlip>
<log loggingLevel="INFO" message="Message Received in
Drools"/>
<marshal ref="myjaxb"/>
<to uri="file:target/messages/foo"/>
<log loggingLevel="INFO" message="Message received at
fileendpoint"/>
</policy>
</route>
</code>
and now the rule, which works:
<code>
rule "Rule 04"
dialect "mvel"
when
$exchange: Exchange()
eval($exchange.in.body instanceof Person )
then
$p = (Person)$exchange.in.body;
$exchange.in.setHeader("routingSlip","file:target/messages/hello");
System.out.println("Rule 04 Works " + $p.user);
end
</code>
but i want to do something like:
<code>
#$message = new JmsMessage();/doesnt work: "cannot Resolve
Constructor"
$message = $exchange.copy();
$neu = new Person();
$neu.firstname = "I";
$message.in.body = $neu;
$message.in.setHeader("routingSlip","file:target/messages/bar");
</code>
--
View this message in context:
http://drools.46999.n3.nabble.com/Drools-Camel-Integration-sending-messag...
Sent from the Drools: User forum mailing list archive at
Nabble.com.