Example 28 : Allocating an existing consignment

Printer-friendly version
package com.metapack.dm.test;
 
import com.metapack.deliverymanager.client.Consignment;
import com.metapack.deliverymanager.client.webservices.AllocationService;
 
public class Example28 extends ExampleBase {
 
	public void run() throws Exception {
		AllocationService service = createAllocationService();
 
		Consignment consignment = service.allocateConsignment( "DMC01V00N6PV" , null );
		if( "Allocated".equals( consignment.getStatus() ) ) {
			System.out.println( "Ok. It allocated" );
		}
	}
}