Customization > Deploying Code and Configuration Package > Importing a BAC Package Using CCD Utility
Importing a BAC Package Using CCD Utility
You can import a Business Administrative Change (BAC) package using the Code and Configuration Deployment (CCD) utility. Before importing, you must set the following property:
com.ptc.windchill.bac.ignoreGUIDList=All
* 
This property ensures that the system allows all BAC packages irrespective of their intended target.
Perform the following steps to import a Business Administrative Change (BAC) package using the Code and Configuration Deployment (CCD) utility:
1. From the source system, export and copy the BAC package.
2. Place it at the following location:
<customizationRootDirectory>/generated/BAC/
3. From the target system, execute the following load command related to the CCD Utility:
ant load.data -Dadministrator.username=wcadmin
For more information, see Deploying Code and Configuration Package.
After successfully importing the BAC package, the system generates the reports at the following location:
<WT_HOME>/buildlogs/customizationLogs/bac/reports
By default, CCD utility logs are generated at the following location:
<WT_HOME>/buildlogs/customizationLogs
You can view detailed messages for success and failure cases in the logs.
Key Points
In case of identity conflicts, the BAC packages imported using CCD overwrite the objects in the target system. However, the import action fails if any other type of conflict occurs. For example, XML file is not valid when importing a list-based versioning scheme.
At a time, only one BAC package can be consumed in the customization package. You should export all administrative change objects in a single BAC package. You can submit changes related to the administrative objects as a zip file in a new customization package if needed.
If the CCD package is to be deployed for the first time and if it contains a BAC package, perform the following steps:
1. Use the environment settings to add the following property along with any other property in the wt.properties file:
wt.pom.emptyTableManagerEnabled=false
2. Deploy the CCD package.
3. Using the environment settings to revert the above changes by setting the property to true.
wt.pom.emptyTableManagerEnabled=true
To run the migration factory with the CCD package that contains BAC, you need to either set the following preference on the source server to Yes or include the preference in the CCD package as a loader:
Participant Identification Using Additional Attributes
Mapping Support in BAC
The system allows the users and contexts of source system to be mapped with the users and contexts of the local system. For mapping, the BAC (.zip) package and the mapping (.xsl) file must be present in the same folder.
You must create an instance of the Participant Identification Using Additional Attributes preference to ensure that the future BAC mappings for the user and context will work as expected. This preference can be set by a loader or a BAC package after the environment is set up.
An example of the mapping(.xsl) file is as follows:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="@* | node()" priority="-9">
<xsl:copy><xsl:apply-templates select="@* | node()"/></xsl:copy>
</xsl:template>
<xsl:template match="objectContainerPath">
<xsl:choose>
<xsl:when test=". = '/wt.inf.container.OrgContainer=SJ_Organization/wt.pdmlink.PDMLinkProduct=SJ_Product'">
<xsl:element name="objectContainerPath">
<xsl:text>/wt.inf.container.OrgContainer=Demo Organization/wt.pdmlink.PDMLinkProduct=GOLF_CART</xsl:text>
</xsl:element>
</xsl:when>

<xsl:otherwise>
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:otherwise> </xsl:choose>
</xsl:template>
<xsl:template match="@isInternal[parent::WTPrincipalReference]">
<xsl:choose>
<xsl:when test="../name = 'SJ_prodmanager'">
<xsl:attribute name="isInternal">
<xsl:text>false</xsl:text>
</xsl:attribute>
</xsl:when>

<xsl:otherwise>
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="@classType[parent::WTPrincipalReference]">
<xsl:choose>
<xsl:when test="../name = 'SJ_prodmanager'">
<xsl:attribute name="classType">
<xsl:text>wt.org.WTUser</xsl:text>
</xsl:attribute>
</xsl:when>

<xsl:otherwise>
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="@fullName[parent::WTPrincipalReference]">
<xsl:choose>
<xsl:when test="../name = 'SJ_prodmanager'">
<xsl:attribute name="fullName">
<xsl:text>Demo, User</xsl:text>
</xsl:attribute>
</xsl:when>

<xsl:otherwise>
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="@surname[parent::WTPrincipalReference]">
<xsl:choose>
<xsl:when test="../name = 'SJ_prodmanager'">
<xsl:attribute name="surname">
<xsl:text>Demo</xsl:text>
</xsl:attribute>
</xsl:when>

<xsl:otherwise>
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="@userEmail[parent::WTPrincipalReference]">
<xsl:choose>
<xsl:when test="../name = 'SJ_prodmanager'">
<xsl:attribute name="userEmail">
<xsl:text>demouser</xsl:text>
</xsl:attribute>
</xsl:when>

<xsl:otherwise>
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="WTPrincipalReference/name">
<xsl:choose>
<xsl:when test=". = 'SJ_prodmanager'">
<xsl:element name="name">
<xsl:text>demo</xsl:text>
</xsl:element>
</xsl:when>

<xsl:otherwise>
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="WTPrincipalReference/ufid">
<xsl:choose>
<xsl:when test="../name = 'SJ_prodmanager'">
<xsl:element name="ufid">
<xsl:text>uid=demo,ou=people,cn=ldap,cn=narwhal_03_24,o=ptc|Ldap.ptcnet.ptc.com|Ldap.ptcnet.ptc.com</xsl:text>
</xsl:element>
</xsl:when>

<xsl:otherwise>
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
Was this helpful?