Amministrazione generale > Caricamento di dati Windchill > Loading Data for Product Families and Options and Variants > Loading Data From XML > Include Rule
  
Include Rule
Load the com.ptc.windchill.option.model.ChoiceMapping object in Windchill database using the Windchill loader.
XML Format
<csvbeginChoiceMapping handler= "com.ptc.windchill.option.load.Loader.beginChoiceMapping">
<csvsourceChoiceName>source choice name</csvsourceChoiceName>
<csvname>name for the include rule (optional) if not given OIR will set the name
</csvdescription>
<csvlocal>specify if local include rule</csvlocal>
<csvoptionSet>name of option set where include rule is local</csvoptionSet>
<csvmerged>true</csvmerged>
</csvbeginChoiceMapping>
<csvChoiceMappingTargetChoice handler= "com.ptc.windchill.option.load.Loader.
createChoiceMappingTargetChoice" >
<csvtargetChoiceName>target choice name</csvtargetChoiceName>
<csvcontainerPath>choice container path</csvcontainerPath>
</csvChoiceMappingTargetChoice >
. . .
. . .
<csvendChoiceMapping handler= "com.ptc.windchill.option.load.Loader.endChoiceMapping" />
Table 6. Attributes for csvBeginChoiceMapping
Attribute
Description
Required or Optional?
csvsourceChoiceName
Choice name
Required
csvnumber
Rule number
Optional
csvversion
Version of the rule
Optional
csviteration
Iteration of the rule
Optional
csvdescription
Rule description
Optional
csvlocal
Specify whether the rule is local
Optional
csvoptionSet
Specify the option set for which the local rule was created
Optional
csvcontainerPath
Path to the context where the source choice resides
Optional
csvlifecycletemplate
Lifecycle template
Optional
csvlifecyclestate
Lifecycle state template
Optional
csvteamTemplate
Team template
Optional
csvmerged
Specify whether the rule is merged
Optional
Table 7. Attributes for csvChoiceMappingTargetChoice
Attribute
Description
Required or Optional?
csvtargetChoiceName
Target choice name
Required
csvcontainerPath
Path to the target choice’s context
Optional
Example
<csvBeginChoiceMapping
handler="com.ptc.windchill.option.load.Loader.beginChoiceMapping">
<csvsourceChoiceName>Red</csvsourceChoiceName>
<csvnumber>IR-00001</csvnumber>
<csvdescription>Red Colour Default Finish</csvdescription>
<csvcontainerPath />
<csvmerged>true</csvmerged>
</csvBeginChoiceMapping>
<csvChoiceMappingTargetChoice
handler=>"com.ptc.windchill.option.load.Loader.createChoiceMappingTargetChoice"
<csvtargetChoiceName>Glossy</csvtargetChoiceName>
<csvcontainerPath />
</csvChoiceMappingTargetChoice>
<csvEndChoiceMapping
handler= "com.ptc.windchill.option.load.Loader.endChoiceMapping"/>

<csvBeginChoiceMapping
handler="com.ptc.windchill.option.load.Loader.beginChoiceMapping">
<csvsourceChoiceName>Green</csvsourceChoiceName>
<csvnumber>IR-00002</csvnumber>
<csvdescription>Green Colour Default Finish</csvdescription>
<csvcontainerPath />
<csvmerged>true</csvmerged>
</csvBeginChoiceMapping>
<csvChoiceMappingTargetChoice
handler="com.ptc.windchill.option.load.Loader.createChoiceMappingTargetChoice">
<csvtargetChoiceName>Glossy</csvtargetChoiceName>
<csvcontainerPath />
</csvChoiceMappingTargetChoice>
<csvEndChoiceMapping
handler="com.ptc.windchill.option.load.Loader.endChoiceMapping" />

<csvBeginChoiceMapping
handler="com.ptc.windchill.option.load.Loader.beginChoiceMapping">
<csvsourceChoiceName>Blue</csvsourceChoiceName>
<csvnumber>IR-00003</csvnumber>
<csvdescription>Blue Colour Default Finish</csvdescription>
<csvcontainerPath />
<csvmerged>true</csvmerged>
</csvBeginChoiceMapping>
<csvChoiceMappingTargetChoice
handler="com.ptc.windchill.option.load.Loader.createChoiceMappingTargetChoice">
<csvtargetChoiceName>Glossy</csvtargetChoiceName>
<csvcontainerPath />
</csvChoiceMappingTargetChoice>
<csvEndChoiceMapping
handler= "com.ptc.windchill.option.load.Loader.endChoiceMapping"/>