Examples of dynamicPipeline()


Examples of org.mule.construct.Flow.dynamicPipeline()

    {
        MuleMessage result = client.send("vm://dynamic", "source->", null);
        assertEquals("source->(static)", result.getPayloadAsString());

        Flow flow = getFlow("dynamicFlow");
        String pipelineId = flow.dynamicPipeline(null).injectBefore(new StringAppendTransformer("(pre)")).resetAndUpdate();
        result = client.send("vm://dynamic", "source->", null);
        assertEquals("source->(pre)(static)", result.getPayloadAsString());

        flow.dynamicPipeline(pipelineId).injectBefore(new StringAppendTransformer("(pre1)"), new StringAppendTransformer("(pre2)")).resetAndUpdate();
        result = client.send("vm://dynamic", "source->", null);
View Full Code Here

Examples of org.mule.construct.Flow.dynamicPipeline()

        Flow flow = getFlow("dynamicFlow");
        String pipelineId = flow.dynamicPipeline(null).injectBefore(new StringAppendTransformer("(pre)")).resetAndUpdate();
        result = client.send("vm://dynamic", "source->", null);
        assertEquals("source->(pre)(static)", result.getPayloadAsString());

        flow.dynamicPipeline(pipelineId).injectBefore(new StringAppendTransformer("(pre1)"), new StringAppendTransformer("(pre2)")).resetAndUpdate();
        result = client.send("vm://dynamic", "source->", null);
        assertEquals("source->(pre1)(pre2)(static)", result.getPayloadAsString());
    }

    @Test
View Full Code Here

Examples of org.mule.construct.Flow.dynamicPipeline()

    @Test
    public void addPrePostMessageProccesor() throws Exception
    {
        Flow flow = getFlow("dynamicFlow");
        String pipelineId = flow.dynamicPipeline(null).injectBefore(new StringAppendTransformer("(pre)"))
                .injectAfter(new StringAppendTransformer("(post)"))
                .resetAndUpdate();
        MuleMessage result = client.send("vm://dynamic", "source->", null);
        assertEquals("source->(pre)(static)(post)", result.getPayloadAsString());
View Full Code Here

Examples of org.mule.construct.Flow.dynamicPipeline()

                .injectAfter(new StringAppendTransformer("(post)"))
                .resetAndUpdate();
        MuleMessage result = client.send("vm://dynamic", "source->", null);
        assertEquals("source->(pre)(static)(post)", result.getPayloadAsString());

        flow.dynamicPipeline(pipelineId).injectBefore(new StringAppendTransformer("(pre)"))
                .injectAfter(new StringAppendTransformer("(post1)"), new StringAppendTransformer("(post2)"))
                .resetAndUpdate();
        result = client.send("vm://dynamic", "source->", null);
        assertEquals("source->(pre)(static)(post1)(post2)", result.getPayloadAsString());
    }
View Full Code Here

Examples of org.mule.construct.Flow.dynamicPipeline()

            {
                throw new RuntimeException("force exception!");
            }
        });
        postList.add(new StringAppendTransformer("(post)"));
        flow.dynamicPipeline(null).injectBefore(preList).injectAfter(postList).resetAndUpdate();
        MuleMessage result = client.send("vm://exception", "source->", null);
        assertEquals("source->(pre)(handled)", result.getPayloadAsString());
    }

    @Test
View Full Code Here

Examples of org.mule.construct.Flow.dynamicPipeline()

    {
        StringBuilder expected = new StringBuilder();

        Flow flow = getFlow("dynamicFlow");
        LifecycleMessageProcessor lifecycleMessageProcessor = new LifecycleMessageProcessor();
        String pipelineId = flow.dynamicPipeline(null).injectBefore(lifecycleMessageProcessor).resetAndUpdate();
        MuleMessage result = client.send("vm://dynamic", "source->", null);
        assertEquals("source->(pre)(static)", result.getPayloadAsString());
        assertEquals(expected.append("ISP").toString(), lifecycleMessageProcessor.getSteps());

        result = client.send("vm://dynamic", "source->", null);
View Full Code Here

Examples of org.mule.construct.Flow.dynamicPipeline()

        result = client.send("vm://dynamic", "source->", null);
        assertEquals("source->(pre)(static)", result.getPayloadAsString());
        assertEquals(expected.append("P").toString(), lifecycleMessageProcessor.getSteps());

        flow.dynamicPipeline(pipelineId).reset();
        assertEquals(expected.append("TD").toString(), lifecycleMessageProcessor.getSteps());

        result = client.send("vm://dynamic", "source->", null);
        assertEquals("source->(static)", result.getPayloadAsString());
        assertEquals(expected.toString(), lifecycleMessageProcessor.getSteps());
View Full Code Here

Examples of org.mule.construct.Flow.dynamicPipeline()

    @Test
    public void applyAwareInterfaces() throws Exception
    {
        Flow flow = getFlow("dynamicFlow");
        UberAwareMessageProcessor awareMessageProcessor = new UberAwareMessageProcessor();
        flow.dynamicPipeline(null).injectBefore(awareMessageProcessor).resetAndUpdate();
        MuleMessage result = client.send("vm://dynamic", "source->", null);
        assertEquals("source->(pre)(static)", result.getPayloadAsString());
        assertNotNull(awareMessageProcessor.getFlowConstruct());
        assertNotNull(awareMessageProcessor.getMuleContext());
    }
View Full Code Here

Examples of org.mule.construct.Flow.dynamicPipeline()

        @Override
        public Object onCall(MuleEventContext eventContext) throws Exception
        {
            Flow flow = (Flow) eventContext.getMuleContext().getRegistry().lookupFlowConstruct("dynamicComponentFlow");
            pipelineId = flow.dynamicPipeline(pipelineId).injectBefore(new StringAppendTransformer("chain update #" + ++count)).resetAndUpdate();
            return eventContext.getMessage();
        }

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.