Attribute Mapping and Part Number Configuration
The Business Logic is defined in database: it appears in the Knowledge Business Logic tree under the "Business Rules - Coexistence Business Logic" node.
The Business Logic is not applied to a reference or a representation but it uses the attributes of the reference and of the representation to define a list of attributes/values/types of properties which will be set on the CATDocument. The attributes you define through the Business Logic will then be displayed in the Properties dialog box of the converted CATProduct/CATPart just like the properties added when clicking Define other properties....
Therefore, the mapping strongly depends on the position of the reference or the representation in the product structure:
- Terminal reference
- with at least one representation: converted to a CATPart linked to the root product (if any). Takes the attributes of the reference and the representation.
- with no representation: converted to a CATProduct linked to the root product. Takes the attributes of the reference only.
- Representation reference: converted to an isolated CATPart. Takes the attributes of the representation only.
- Non-terminal reference: converted to a CATProduct linked to the root product (if it is not the root product itself). Takes the attributes of the reference only.
The positions in the 3DEXPERIENCE representation model are illustrated by the picture below:
The Business logic is invoked on each PLM component to transfer: reference, representation reference, single representation. Input objects are as follows:
Parameter Names | Types | Read/Write | Comments |
---|---|---|---|
iOperationId | string | Read | Used to identify the mapping context. The value CATDWCAttrMapAndPN is available in any conversion through the DownwardCompatibility batch. |
iSourcePLMComponentReference | CATIInstance_var | Read | Corresponds to the proxy of the Reference PLM entity for which the attribute mapping is computed. Value can be NULL when processing a single representation. |
iSourcePLMComponentRepresentation | CATIInstance_var | Read | Corresponds to the proxy of the Representation PLM entity for which the attribute mapping is computed. |
iContextName | string | Read | Name of the current transfer context. Value can be NULL when converting in a non-associative mode. |
iSourceType | string | Read | Position of the PLM component in the product structure to be converted. Possible values are: "Terminal Reference, "NonTerminal Reference", "Representation Reference". |
iV5ObjectExtension | string | Read | Type of the converted V5 object, i.e. CATPart, CATProduct, CATShape or CATDrawing. |
oPartNumber | string | Write | Contains the customized Part Number in case the converted CATPart must be used in the Part Number Configuration. This parameter is set by the Rule script during computation. |
oListOfTargetPropertiesName | list | Write | Contains the name of attributes. This parameter is set by the Rule script during computation. |
oListOfTargetPropertiesType | list | Write | Contains the type of attributes. This parameter is set by the Rule script during computation. |
oListOfTargetPropertiesValue | list | Write | Contains the value of attributes. This parameter is set by the Rule script during computation. |
- If the returned lists oListOfTargetPropertiesName, oListOfTargetPropertiesType and oListOfTargetPropertiesValue do not have the same size (each name corresponding to its type and a value), then the Downward Compatibility batch aborts and an error message is displayed in the Global Report.
- If the returned lists oListOfTargetPropertiesName, oListOfTargetPropertiesType and oListOfTargetPropertiesValue are NULL, then no property is transferred to the converted document.
The corresponding Part Number tag is still generated in the XML file but the definition is ignored for objects implementing the Business Logic.
If you want to use the Business Logic only to define the Part Number, then the Business Rule script should return the "3DEXPERIENCE PLM attributes as string" to simulate the default behavior.
If no appropriate Business Logic script is found, then the default behavior applies:
- All 3DEXPERIENCE attributes are mapped to the converted documents as "string" types.
- Identification_string = PLM_ExternalID of the selected representation when the object to be converted is the representation.
- Identification_string = PLM_ExternalID of the selected reference when the object to converted is the reference.