camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Okello Nelson <cn.oke...@gmail.com>
Subject Accessing CamelLoopIndex in route
Date Thu, 11 Apr 2013 13:17:02 GMT
Hi guys,

I have the following route DSL:

from("file:" + autoLoadBaseDir + "?move=.classified")
                .loop(fileTypes.length)
                    .choice()

.when(header("CamelFileName").contains(fileTypes[Integer.valueOf("${CamelLoopIndex}")]))
                            .to("file:" + classesBaseDir + "/" +
fileTypes[Integer.valueOf("${CamelLoopIndex}")]);

I'm trying to use the loop index with an array to create a content based
router. However, the "${CamelLoopIndex"} seems like its not being resolved.
Is there something that I'm doing wrong? Thanks in advance.

Kind Regards,
Okello Nelson.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message