Package org.qi4j.sample.dcicargo.sample_b.context.interaction.booking.routing

Examples of org.qi4j.sample.dcicargo.sample_b.context.interaction.booking.routing.AssignCargoToRoute$CargoInspectorRole$Mixin


                    // ROUTE
                    if( i > 11 )
                    {
                        final List<Itinerary> routes = routingService.fetchRoutesForSpecification( routeSpec );
                        final Itinerary itinerary = routes.get( 0 );
                        new AssignCargoToRoute( cargo, itinerary ).assign();
                    }

                    // MISROUTE: Route specification not satisfied with itinerary
                    if( i == 12 )
                    {
View Full Code Here


            protected void onSubmit( AjaxRequestTarget target, Form<?> form )
            {
                try
                {
                    Itinerary itinerary = candidateRouteModel.getObject();
                    new AssignCargoToRoute( trackingIdString, itinerary ).assign();
                    setResponsePage( CargoDetailsPage.class, new PageParameters().set( 0, trackingIdString ) );
                }
                catch( Exception e )
                {
                    String msg = "Problem assigning this route to cargo: " + e.getMessage();
View Full Code Here

    public void precondition_x1_CannotReRouteClaimedCargo()
        throws Exception
    {
        cargo.delivery().set( delivery( TODAY, CLAIMED, ROUTED, unknownLeg ) );
        thrown.expect( RoutingException.class, "Can't re-route claimed cargo" );
        new AssignCargoToRoute( cargo, itinerary ).assign();
    }
View Full Code Here

    {
        precondition_x1_CannotReRouteClaimedCargo();

        cargo.delivery().set( delivery( TODAY, NOT_RECEIVED, NOT_ROUTED, unknownLeg ) );
        thrown.expect( UnsatisfyingRouteException.class, "Route specification was not satisfied with itinerary" );
        new AssignCargoToRoute( cargo, wrongItinerary ).assign();
    }
View Full Code Here

        throws Exception
    {
        deviation_1a_UnsatisfyingItinerary();

        cargo.delivery().set( delivery( TODAY, NOT_RECEIVED, NOT_ROUTED, unknownLeg ) );
        new AssignCargoToRoute( cargo, itinerary ).assign();
        assertDelivery( null, null, null, null,
                        NOT_RECEIVED, notArrived,
                        ROUTED, directed, itinerary.eta(), leg1,
                        RECEIVE, HONGKONG, noSpecificDate, noVoyage );
    }
View Full Code Here

        // New itinerary with arrival location of current carrier movement
        // Earliest departure date is after carrier arrival
        itinerary2 = itinerary( leg( V202, NEWYORK, STOCKHOLM, DAY8, DAY17 ) );

        // Re-route cargo while on board a carrier
        new AssignCargoToRoute( cargo, itinerary2 ).assign();
        assertDelivery( LOAD, CHICAGO, DAY5, V201,
                        ONBOARD_CARRIER, notArrived,
                        ROUTED, directed, itinerary2.eta(), leg1,
                        UNLOAD, NEWYORK, DAY6, V201 ); // from old itinerary!
    }
View Full Code Here

        // New itinerary going from current port
        itinerary2 = itinerary( leg( V202, HONGKONG, STOCKHOLM, DAY3, DAY17 ) );

        // Re-route cargo after receipt in port
        new AssignCargoToRoute( cargo, itinerary2 ).assign();
        assertDelivery( RECEIVE, HONGKONG, DAY1, noVoyage,
                        IN_PORT, notArrived,
                        ROUTED, directed, itinerary2.eta(), leg1,
                        LOAD, HONGKONG, DAY3, V202 ); // from new itinerary!
    }
View Full Code Here

                                        ROUTED, directed, unknownETA, leg2,
                                        nextHandlingEvent( UNLOAD, NEWYORK, DAY6, V201 ) ) );

        // Re-route cargo unloaded in port
        itinerary2 = itinerary( leg( V202, CHICAGO, STOCKHOLM, DAY6, DAY19 ) );
        new AssignCargoToRoute( cargo, itinerary2 ).assign();
        assertDelivery( UNLOAD, CHICAGO, DAY5, V201,
                        IN_PORT, notArrived,
                        ROUTED, directed, itinerary2.eta(), leg1,
                        LOAD, CHICAGO, DAY6, V202 );
    }
View Full Code Here

                                        ROUTED, directed, unknownETA, leg3,
                                        unknownNextHandlingEvent ) );

        // Re-route cargo while in customs
        itinerary2 = itinerary( leg( V202, NEWYORK, STOCKHOLM, DAY8, DAY18 ) );
        new AssignCargoToRoute( cargo, itinerary2 ).assign();
        assertDelivery( CUSTOMS, NEWYORK, DAY6, noVoyage,
                        IN_PORT, notArrived,
                        ROUTED, directed, itinerary2.eta(), leg1,
                        LOAD, NEWYORK, DAY8, V202 );
    }
View Full Code Here

TOP

Related Classes of org.qi4j.sample.dcicargo.sample_b.context.interaction.booking.routing.AssignCargoToRoute$CargoInspectorRole$Mixin

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.