Thank you Claus for your help..I got it running!
package org.mainegeneral.camel;
import org.apache.camel.Processor;
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
public class MyRouteBuilder extends RouteBuilder {
public void configure() {
So I execute and all I get is this... it just sits here:
camel.MainApp.main()] FileEndpoint INFO Endpoint is
configured with noop=true so forcing endpoint to be idempotent as well
camel.MainApp.main()] FileEndpoint INFO Using default memory
based idempotent
OK.. I currently have it configured to read in the XML, pull the contained
second filename, log it, but send it to a bean for it to process both file
moves. When I execute.. I don't even get the first log statements
package org.mainegeneral.camel;
import org.apache.camel.Processor;
Hi
If you in the first route just solves to move files to another folder,
when you have both of them (eg the pairs you talked a bit about).
The 2nd route can then process these files, knowing that both of them
are available.
Camel does have support for "done files" but they are based on a
Yes.. this was my thinking, but with either scenario, I need to comingle
exchanges to know what the first route is reading to make the decision in the
second route.. In the previous e-mail you suggested I can extract the xpath in
another java instance outside the route.. but I need that to
Hi
An alternative is maybe to use 2 routes, where the first route checks
if that 2nd file exists with a and then move the files to
another folder, where the 2nd route pickup and process that file,
knowing that the other file exists.
On Thu, Dec 13, 2018 at 3:20 PM Claus Ibsen wrote:
>
> Hi
>
>
Hi
You can use a bit of Java code to read the file content into memory,
and then use xpath to extract that other file name.
Camel has some helper APIs for that in IOHelper#loadTexxt and XPathBuilder.
Here is some snippet from an unit test
@Test
public void testNotUsingExchangeResultType()
Thank you Claus.. it's great to hear from you again..
I did see an example close to this on stackoverflow.. someone referenced a bean
as a filter to check for an extra file to exist, but in that example the extra
file's name that needed to exist was static.The "chicken or the egg" question
Hi
Just use Java - You can use Java File API to check for the existence
of a file ;)
You can also use a file filter to only pickup the file where you check
for the existence of that other file.
You can then write a bit of Java code as the filter and configure it
on the file endpoint. In the
OK.. not hearing any pre-build advise.. I started building.
I can successfully extract the XML field value that is the name of the work
file out of the consumed file of the route.
What I need to do is only move both (the file I'm consuming and it's work
file).. if the work file shows up..
Figured I'd try something new and ask for advice here first before hitting a
brick wall and asking after I hit that dead end...I need to poll for XML files
dumping into a specific NFS directory, read in the XML, find the "work" file
generated by the task that generated the XML, and move both
11 matches
Mail list logo