Package org.switchyard.quickstarts.bpm.service.data

Examples of org.switchyard.quickstarts.bpm.service.data.OrderAck


    public static final String SHIPPED_STATUS =
        "Thanks for your order, it has been shipped!";

    @Override
    public OrderAck ship(Order order) {
        OrderAck ack = new OrderAck();
        ack.setAccepted(true);
        ack.setOrderId(order.getOrderId());
        ack.setStatus(SHIPPED_STATUS);

        return ack;
    }
View Full Code Here


    public static final String HOLD_STATUS =
        "Insufficient quantity on hand - order has been placed on hold.";

    @Override
    public OrderAck hold(Order order) {
        OrderAck ack = new OrderAck();
        ack.setAccepted(false);
        ack.setOrderId(order.getOrderId());
        ack.setStatus(HOLD_STATUS);

        return ack;
    }
View Full Code Here

        Order order = new Order();
        order.setItemId("cowbell");
        order.setOrderId("SHIPIT");
        order.setQuantity(50);

        OrderAck ack = service.sendInOut(order).getContent(OrderAck.class);

        Assert.assertTrue(ack.isAccepted());
        System.out.println(ack.getStatus());
    }
View Full Code Here

        Order order = new Order();
        order.setItemId("cowbell");
        order.setOrderId("FEVER");
        order.setQuantity(500);

        OrderAck ack = service.sendInOut(order).getContent(OrderAck.class);

        Assert.assertFalse(ack.isAccepted());
        System.out.println(ack.getStatus());
    }
View Full Code Here

    @Test
    public void sendMessage() {
        Order order = new Order();
        order.setOrderId("SHIPIT");
        OrderAck ack = service.sendInOut(order).getContent(OrderAck.class);

        Assert.assertFalse(ack.isAccepted());
        Assert.assertEquals(BackOrderBean.HOLD_STATUS, ack.getStatus());
    }
View Full Code Here

    @Test
    public void testShip() {
        Order order = new Order();
        order.setOrderId("SHIPIT");
        OrderAck ack = service.sendInOut(order).getContent(OrderAck.class);

        Assert.assertTrue(ack.isAccepted());
        Assert.assertEquals(ShippingBean.SHIPPED_STATUS, ack.getStatus());
    }
View Full Code Here

TOP

Related Classes of org.switchyard.quickstarts.bpm.service.data.OrderAck

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.