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 {