function onTransportPlanAssignment(transportPlanData) {

    var factory = getFactory();

    return getAssetRegistry('outbound.logistics.vehicle.Car').then(function (carRegistry) {
        return carRegistry.exists(transportPlanData.vin).then(function (exists) {
            if (exists) {
                return carRegistry.get(transportPlanData.vin).then(function (car) {
                    car.transportPlan = transportPlanData.transportPlan;
                    return carRegistry.update(car);
                });
            }
        });
    });
}
/**
 * Assign a Transport Plan to a vehicle.
 * Assigning a transport plan is only available to logistics teams.
 * @param {outbound.logistics.vehicle.AssignTransportPlan} transportPlanData
 * @transaction
 */
Assign a Transport Plan to a vehicle.
Assigning a transport plan is only available to logistics teams.
Assign a Transport Plan to a vehicle . Assigning a transport plan is only available to logistics teams .
function onTransportPlanAssignment(transportPlanData) {
    var factory = getFactory();
    return getAssetRegistry('outbound.logistics.vehicle.Car').then(function (carRegistry) {
        return carRegistry.exists(transportPlanData.vin).then(function (exists) {
            if (exists) {
                return carRegistry.get(transportPlanData.vin).then(function (car) {
                    car.transportPlan = transportPlanData.transportPlan;
                    return carRegistry.update(car);
                });
            }
        });
    });
}
function onTransportPlanAssignment ( transportPlanData ) { var factory = getFactory ( ) ; return getAssetRegistry ( 'outbound.logistics.vehicle.Car' ) . then ( function ( carRegistry ) { return carRegistry . exists ( transportPlanData . vin ) . then ( function ( exists ) { if ( exists ) { return carRegistry . get ( transportPlanData . vin ) . then ( function ( car ) { car . transportPlan = transportPlanData . transportPlan ; return carRegistry . update ( car ) ; } ) ; } } ) ; } ) ; }
Assign a Transport Plan to a vehicle.
Assign a Transport Plan to a vehicle .