Loading Variant Specifications Using VariantSpecLoadOutputBean API
You can load variant specifications using this API provided out-of-the-box. To invoke the API, make a call similar to this in your Java code:
List<VariantSpecLoadOutputBean> outputBeans = VariantSpecLoaderHelper.service.loadVariantSpecs(variantSpecBeans, existingVariantSpecs);
You must provide the following information for the API:
A list of VariantSpecLoadOutputBean objects—Each bean pertains to a variant specification that must be created.
Each bean must contain the following information:
Name—The name of the variant specification.
Number— A valid variant specification number if you are reconfiguring an existing variant specification.
WTPart—If creating the specification based on the part.
Option set—If creating a specification based on a part, provide the assigned option set for the part. Otherwise, provide a valid option set.
Folder—Folder in which to store the variant specification.
NavigationCriteria object—This object can be persisted. It must have:
Name
Owner
Applicable type, for example, applied to a part
List of WTPartConfigSpec objects
List of NavigationFilter2 objects—These can contain a list of ATORuleConfigSpec objects. An ATORuleConfigSpec represents the Option Filter configuration specification.
A HashMap<String, Set<String>> represents the choice selections in the Option Filter. The keyset on the HashMap is the object identifier for the option, and the Set<String> is a collection of object identifiers for the choices.
variantSpecLifeCycleTemplate – The name of the life cycle template to assign to the variant specification.
variantSpecLifeCycleState – The enumerated value identifying the life cycle state to assign to the variant specification. For example, specify “INWORK” to use “In Work” as the life cycle state.
variantSpecIBAsMap<String, Object>. A map of internal names for soft attributes and the corresponding values to assign to the variant specification. The supported attribute types are: String, Boolean, Integer Number, Real Number, Real Number with Units, Date and Time, and URL.
The code must pass the collection of beans to the API.
Each resultant outputBean has a loadStatus object that contains success/failure and other information regarding the creation of the variant specification.
Deploy Customization on Development Environment
For information on the CCD process for deployment, see Deploy Your Customizations on Your Development Environment.
Prepare CCD Package for Promotion
For information on the CCD process for promotion, see Deploying Code and Configuration Package.
Was this helpful?