Package org.mule.construct

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


    {
        Flow flow = (Flow) getFlowConstruct("nestedTransactionalFail");
        MuleEvent event = getTestEvent("message", flow);
        try
        {
            flow.process(event);
        } catch (Exception e)
        {
        }
        MuleMessage message1 = muleContext.getClient().request("vm://out1?connector=vmConnector1", 1000);
        MuleMessage message2 = muleContext.getClient().request("vm://out2?connector=vmConnector1", 1000);
View Full Code Here


    {
        Flow flow = (Flow) getFlowConstruct("nestedTransactionalWithBeginOrJoinFail");
        MuleEvent event = getTestEvent("message", flow);
        try
        {
            flow.process(event);
        } catch (Exception e)
        {
        }
        MuleMessage message1 = muleContext.getClient().request("out1", 1000);
        MuleMessage message2 = muleContext.getClient().request("out2", 1000);
View Full Code Here

    @Test
    public void testNestedTransactionalFailWithCatch() throws Exception
    {
        Flow flow = (Flow) getFlowConstruct("nestedTransactionalFailWithCatch");
        MuleEvent event = getTestEvent("message", flow);
        flow.process(event);
        MuleMessage message1 = muleContext.getClient().request("vm://out1?connector=vmConnector1", 1000);
        MuleMessage message2 = muleContext.getClient().request("vm://out2?connector=vmConnector1", 1000);
        assertThat(message1, notNullValue());
        assertThat(message2, notNullValue());
    }
View Full Code Here

    @Test
    public void testNestedTransactionalWithBeginOrJoinFailWithCatch() throws Exception
    {
        Flow flow = (Flow) getFlowConstruct("nestedTransactionalWithBeginOrJoinFailWithCatch");
        MuleEvent event = getTestEvent("message", flow);
        flow.process(event);
        MuleMessage message1 = muleContext.getClient().request("out1", 1000);
        MuleMessage message2 = muleContext.getClient().request("out2", 1000);
        assertThat(message1, notNullValue());
        assertThat(message2, notNullValue());
    }
View Full Code Here

    @Test
    public void testNestedTransactionalWithBeginOrJoin() throws Exception
    {
        Flow flow = (Flow) getFlowConstruct("nestedTransactionalWithBeginOrJoin");
        MuleEvent event = getTestEvent("message", flow);
        flow.process(event);
        MuleMessage message1 = muleContext.getClient().request("vm://out1?connector=vmConnector1", 1000);
        MuleMessage message2 = muleContext.getClient().request("vm://out2?connector=vmConnector1", 1000);
        assertThat(message1, notNullValue());
        assertThat(message2, notNullValue());
    }
View Full Code Here

    @Test
    public void testNestedTransactionalWithBeginOrJoinFailWithCatchAndRollback() throws Exception
    {
        Flow flow = (Flow) getFlowConstruct("nestedTransactionalWithBeginOrJoinFailWithCatchAndRollback");
        MuleEvent event = getTestEvent("message", flow);
        flow.process(event);
        MuleMessage message1 = muleContext.getClient().request("out1", 1000);
        MuleMessage message2 = muleContext.getClient().request("out2", 1000);
        assertThat(message1, nullValue());
        assertThat(message2, nullValue());
    }
View Full Code Here

    {
        Flow flow = (Flow) getFlowConstruct("nestedTransactionalWithBeginOrJoinFail");
        MuleEvent event = getTestEvent("message", flow);
        try
        {
            flow.process(event);
        } catch (Exception e)
        {
        }
        MuleMessage message1 = muleContext.getClient().request("vm://out1?connector=vmConnector1", 1000);
        MuleMessage message2 = muleContext.getClient().request("vm://out2?connector=vmConnector1", 1000);
View Full Code Here

    @Test
    public void testNestedTransactionalWithBeginOrJoinFailWithCatch() throws Exception
    {
        Flow flow = (Flow) getFlowConstruct("nestedTransactionalWithBeginOrJoinFailWithCatch");
        MuleEvent event = getTestEvent("message", flow);
        flow.process(event);
        MuleMessage message1 = muleContext.getClient().request("vm://out1?connector=vmConnector1", 1000);
        MuleMessage message2 = muleContext.getClient().request("vm://out2?connector=vmConnector1", 1000);
        assertThat(message1, notNullValue());
        assertThat(message2, notNullValue());
    }
View Full Code Here

    @Test(expected = RoutingException.class)
    public void executeSynchronously() throws Exception
    {
        final String payload = RandomStringUtils.randomAlphanumeric(20);
        Flow flow = (Flow) getFlowConstruct("synchronous");
        flow.process(getTestEvent(payload));
        fail("Exception should be thrown");
    }

    @Test
    public void executeSynchronouslyDoingRetries() throws Exception
View Full Code Here

    {
        try
        {
            final String payload = RandomStringUtils.randomAlphanumeric(20);
            Flow flow = (Flow) getFlowConstruct("synchronous-with-retry");
            flow.process(getTestEvent(payload));
            fail("Exception should be thrown");
        }
        catch (Exception e)
        {
            assertThat(getNumberOfInvocationsFor("untilSuccessful"), is(4));
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.