You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by j_pramanik_ind <ja...@gmail.com> on 2014/04/26 19:48:29 UTC

How To Assemble Tokens After Split

Hi,

How can I assemble all tokens after splitting original message read from
file ? I tried to assemble all token using aggregator but it did not work.

Can any one please tell me how to configure in XML DSL for this purpose ?
I'm using Apache Camel version 2.10

Following is my XML DSL :

                  <route id="route1">
			<from uri="file:E:\\bankappfiles\\received?delete=true" />
			<log message="The Full String :: [${body}]" />

			<split stopOnException="true">
				<tokenize token="~" />
				
				<choice>
					<when>
						<simple> ${in.body} == 'oprncode=ATM'</simple>
						<log message="=========>> ATM [${in.body}]" />
						<aggregate strategyRef="aggregatorStrategy"
  		   		                        completionSize="3">
					              <correlationExpression>
						          <simple>${in.body}</simple>									
				 	             </correlationExpression>
					             <to uri="file:E:\\bankappfiles\\atm\\" />
				               </aggregate>

					</when>

					<when>
						<simple>${in.body} == 'oprncode=NEFT'</simple>
						<log message="=========>> NEFT [${in.body}]" />
						<aggregate strategyRef="aggregatorStrategy"
				                      completionSize="3">
					             <correlationExpression>
						             <simple>${in.body}</simple>									
				 	             </correlationExpression>
					             <to uri="file:E:\\bankappfiles\\neft\\" />
				                </aggregate>
					</when>

				</choice>
				
			</split>
		</route>

Thanks in advance

Jayanta P.



--
View this message in context: http://camel.465427.n5.nabble.com/How-To-Assemble-Tokens-After-Split-tp5750627.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How To Assemble Tokens After Split

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Maybe its the composed message processor eip you are looking for
See the splitter only example
http://camel.apache.org/composed-message-processor.html

On Sat, Apr 26, 2014 at 7:48 PM, j_pramanik_ind
<ja...@gmail.com> wrote:
> Hi,
>
> How can I assemble all tokens after splitting original message read from
> file ? I tried to assemble all token using aggregator but it did not work.
>
> Can any one please tell me how to configure in XML DSL for this purpose ?
> I'm using Apache Camel version 2.10
>
> Following is my XML DSL :
>
>                   <route id="route1">
>                         <from uri="file:E:\\bankappfiles\\received?delete=true" />
>                         <log message="The Full String :: [${body}]" />
>
>                         <split stopOnException="true">
>                                 <tokenize token="~" />
>
>                                 <choice>
>                                         <when>
>                                                 <simple> ${in.body} == 'oprncode=ATM'</simple>
>                                                 <log message="=========>> ATM [${in.body}]" />
>                                                 <aggregate strategyRef="aggregatorStrategy"
>                                                         completionSize="3">
>                                                       <correlationExpression>
>                                                           <simple>${in.body}</simple>
>                                                      </correlationExpression>
>                                                      <to uri="file:E:\\bankappfiles\\atm\\" />
>                                                </aggregate>
>
>                                         </when>
>
>                                         <when>
>                                                 <simple>${in.body} == 'oprncode=NEFT'</simple>
>                                                 <log message="=========>> NEFT [${in.body}]" />
>                                                 <aggregate strategyRef="aggregatorStrategy"
>                                                       completionSize="3">
>                                                      <correlationExpression>
>                                                              <simple>${in.body}</simple>
>                                                      </correlationExpression>
>                                                      <to uri="file:E:\\bankappfiles\\neft\\" />
>                                                 </aggregate>
>                                         </when>
>
>                                 </choice>
>
>                         </split>
>                 </route>
>
> Thanks in advance
>
> Jayanta P.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-To-Assemble-Tokens-After-Split-tp5750627.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/