Package org.apache.camel.bam

Examples of org.apache.camel.bam.ActivityBuilder


    }

    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").stringResult());

        ActivityBuilder invoice = activity("file:src/data/invoices?noop=true")
                .correlate(xpath("/invoice/@purchaseOrderId").stringResult());

        // now lets add some BAM rules
        invoice.starts().after(purchaseOrder.completes())
                .expectWithin(seconds(1))
                .errorIfOver(seconds(2)).to("log:org.apache.camel.example.bam.BamFailures?level=error");
    }
View Full Code Here


    }

    public void configure() throws Exception {

        // let's define some activities, correlating on an XPath on the message bodies
        ActivityBuilder purchaseOrder = activity("file:src/data/purchaseOrders?noop=true")
                .correlate(xpath("/purchaseOrder/@id").stringResult());

        ActivityBuilder invoice = activity("file:src/data/invoices?noop=true&consumer.initialDelay=5000")
                .correlate(xpath("/invoice/@purchaseOrderId").stringResult());

        // now let's add some BAM rules
        invoice.starts().after(purchaseOrder.completes())
                .expectWithin(seconds(10))
                .errorIfOver(seconds(20)).to("log:org.apache.camel.example.bam.BamFailures?level=error");
    }
View Full Code Here

    }

    public void configure() throws Exception {

        // let's define some activities, correlating on an XPath on the message bodies
        ActivityBuilder purchaseOrder = activity("file:src/data/purchaseOrders?noop=true")
                .correlate(xpath("/purchaseOrder/@id").stringResult());

        ActivityBuilder invoice = activity("file:src/data/invoices?noop=true&consumer.initialDelay=5000")
                .correlate(xpath("/invoice/@purchaseOrderId").stringResult());

        // now let's add some BAM rules
        invoice.starts().after(purchaseOrder.completes())
                .expectWithin(seconds(10))
                .errorIfOver(seconds(20)).to("log:org.apache.camel.example.bam.BamFailures?level=error");
    }
View Full Code Here

    }

    public void configure() throws Exception {

        // let's define some activities, correlating on an XPath on the message bodies
        ActivityBuilder purchaseOrder = activity("file:src/data/purchaseOrders?noop=true")
                .correlate(xpath("/purchaseOrder/@id").stringResult());

        ActivityBuilder invoice = activity("file:src/data/invoices?noop=true&consumer.initialDelay=5000")
                .correlate(xpath("/invoice/@purchaseOrderId").stringResult());

        // now let's add some BAM rules
        invoice.starts().after(purchaseOrder.completes())
                .expectWithin(seconds(10))
                .errorIfOver(seconds(20)).to("log:org.apache.camel.example.bam.BamFailures?level=error");
    }
View Full Code Here

    }

    public void configure() throws Exception {

        // let's define some activities, correlating on an XPath on the message bodies
        ActivityBuilder purchaseOrder = activity("file:src/data/purchaseOrders?noop=true")
                .correlate(xpath("/purchaseOrder/@id").stringResult());

        ActivityBuilder invoice = activity("file:src/data/invoices?noop=true&consumer.initialDelay=5000")
                .correlate(xpath("/invoice/@purchaseOrderId").stringResult());

        // now let's add some BAM rules
        invoice.starts().after(purchaseOrder.completes())
                .expectWithin(seconds(10))
                .errorIfOver(seconds(20)).to("log:org.apache.camel.example.bam.BamFailures?level=error");
    }
View Full Code Here

    }

    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 {
View Full Code Here

    }

    public void configure() throws Exception {

        // let's define some activities, correlating on an XPath on the message bodies
        ActivityBuilder purchaseOrder = activity("file:src/data/purchaseOrders?noop=true")
                .correlate(xpath("/purchaseOrder/@id").stringResult());

        ActivityBuilder invoice = activity("file:src/data/invoices?noop=true&consumer.initialDelay=5000")
                .correlate(xpath("/invoice/@purchaseOrderId").stringResult());

        // now let's add some BAM rules
        invoice.starts().after(purchaseOrder.completes())
                .expectWithin(seconds(10))
                .errorIfOver(seconds(20)).to("log:org.apache.camel.example.bam.BamFailures?level=error");
    }
View Full Code Here

    }

    public void configure() throws Exception {

        // let's define some activities, correlating on an XPath on the message bodies
        ActivityBuilder purchaseOrder = activity("file:src/data/purchaseOrders?noop=true")
                .correlate(xpath("/purchaseOrder/@id").stringResult());

        ActivityBuilder invoice = activity("file:src/data/invoices?noop=true")
                .correlate(xpath("/invoice/@purchaseOrderId").stringResult());

        // now let's add some BAM rules
        invoice.starts().after(purchaseOrder.completes())
                .expectWithin(seconds(1))
                .errorIfOver(seconds(2)).to("log:org.apache.camel.example.bam.BamFailures?level=error");
    }
View Full Code Here

    }

    public void configure() throws Exception {

        // let's define some activities, correlating on an XPath on the message bodies
        ActivityBuilder purchaseOrder = activity("file:src/data/purchaseOrders?noop=true")
                .correlate(xpath("/purchaseOrder/@id").stringResult());

        ActivityBuilder invoice = activity("file:src/data/invoices?noop=true&consumer.initialDelay=5000")
                .correlate(xpath("/invoice/@purchaseOrderId").stringResult());

        // now let's add some BAM rules
        invoice.starts().after(purchaseOrder.completes())
                .expectWithin(seconds(10))
                .errorIfOver(seconds(20)).to("log:org.apache.camel.example.bam.BamFailures?level=error");
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.bam.ActivityBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.