function createPlant(plantData) {

    return getParticipantRegistry('outbound.logistics.participant.Plant').then(function (plantRegistry) {
        var factory = getFactory();

        var plant = factory.newResource('outbound.logistics.participant', 'Plant', plantData.plantId);
        plant.owner = plantData.owner;

        return plantRegistry.add(plant);
    });
    // CREATE NEW EVENT: PlantCreated
}
/**
 * Manufacturer creates a plant
 * @param {outbound.logistics.participant.CreatePlant} plantData
 * @transaction
 */
Manufacturer creates a plant
@param {outbound.logistics.participant.CreatePlant} plantData
@transaction
Manufacturer creates a plant @param { outbound . logistics . participant . CreatePlant } plantData @transaction
function createPlant(plantData) {
    return getParticipantRegistry('outbound.logistics.participant.Plant').then(function (plantRegistry) {
        var factory = getFactory();
        var plant = factory.newResource('outbound.logistics.participant', 'Plant', plantData.plantId);
        plant.owner = plantData.owner;
        return plantRegistry.add(plant);
    });
}
function createPlant ( plantData ) { return getParticipantRegistry ( 'outbound.logistics.participant.Plant' ) . then ( function ( plantRegistry ) { var factory = getFactory ( ) ; var plant = factory . newResource ( 'outbound.logistics.participant' , 'Plant' , plantData . plantId ) ; plant . owner = plantData . owner ; return plantRegistry . add ( plant ) ; } ) ; }
Manufacturer creates a plant
 @param {outbound.logistics.participant.CreatePlant} plantData
 @transaction
Manufacturer creates a plant @param { outbound . logistics . participant . CreatePlant } plantData @transaction
// CREATE NEW EVENT: PlantCreated