Basic Examples of CSL Logic
The following snippets show some simple examples of the ability to embed CSL logic into your mapping file. The first example shows a commented-out simple mapping between the Creo "COMMODITY" property and the aPriori Process Group production input. It has been replaced by a CSL expression that checks whether COMMODITY is set to "Casting". If it is, the aPriori Process Group is set to "Casting – Die". If not, the Process Group is set to "Plastic Molding".
 
A more complex CSL expression is used to determine the correct aPriori VPE based on the value of the Creo "PRODUCTION_LOCATION" property:
CSL cannot directly access the value of named properties, so the <source> tag also includes an id attribute for CSL to use. The PRODUCTION_LOCATION property may be one of several cities, so the CSL code evaluates whether the city is located in the United States or China and picks the correct VPE for that region. As a back-up, if neither region is recognized, the "aPriori Mexico" VPE is chosen.