}
public void configure() throws Exception {
// lets define some activities, correlating on an XPath on the message bodies
ActivityBuilder purchaseOrder = activity("file:src/data/purchaseOrders?noop=true")
.correlate(xpath("/purchaseOrder/@id"));
ActivityBuilder invoice = activity("file:src/data/invoices?noop=true")
.correlate(xpath("/invoice/@purchaseOrderId"));
// now lets add some rules
invoice.starts().after(purchaseOrder.completes())
.expectWithin(seconds(1))
.errorIfOver(seconds(2)).to("log:org.apache.camel.example.bam.BamFailures?level=error");
from("seda:failures").process(new Processor() {
public void process(Exchange exchange) throws Exception {