Example 20 : Identifying carriers and consignments that need manifesting

Printer-friendly version

  When the delivery driver comes, he often requires some paperwork. The carrier will also require an electronic copy of the information (which this system delivers for you).

This example shows how identify which carriers have parcels waiting to be manifested. It does nothing more than that; it does not create the manfiest, and it does not send it.

package com.metapack.dm.test;
 
import com.metapack.deliverymanager.client.ReadyToManifestInfo;
import com.metapack.deliverymanager.client.webservices.ManifestService;
 
public class Example20 extends ExampleBase {
 
	public void run() throws Exception {
		ManifestService service = createManifestService();
 
		ReadyToManifestInfo[] readyToManifestList = service.findReadyToManifestRecords( "DEFAULT" , "DELIVERY" );
 
		for( ReadyToManifestInfo info : readyToManifestList ) {
			System.out.println( "Carrier " + info.getCarrierCode() 
					+ " has " + info.getParcelCount() + " parcels ready to manifest" );
		}
	}
}