I have two programs, made up of three routes.
[
one is a route, from JPA database to bean.
one is a copier, from file system endpoint to file system endpoint
]
[
one is a uploader, from file system endpoint to bean.
]
I want to run the one program based on input from my property file
<context:property-placeholder location="./run.properties"
ignore-resource-not-found="false" />
But all I can find for content-based-routing, is examples where the choose is below the from. eg.
from("direct:start")
.choice()
.when(body().contains("Camel"))
.loadBalance().roundRobin().to("mock:foo").to("mock:bar")
.otherwise()
.to("mock:result");
I want a way to rearrange to something like this:
choice()
.when(body().contains("Camel"))
from("direct:start1").loadBalance().roundRobin().to("mock:foo").to("mock:bar")
.otherwise()
from("direct:start2").to("mock:result");
The way I ended up doing it:
...
...