Administración de la empresa > Carga de datos de Windchill > Loading Members into Context Teams: Windchill PDMLink and Windchill ProjectLink Example
  
Loading Members into Context Teams: Windchill PDMLink and Windchill ProjectLink Example
This section provides a detailed example of the data loading process for adding members to an existing context team. It begins by creating a context with the desired team members in your Windchill system.
Before You Begin
To add members to a context team, you will need to export information about current Windchill participants. Use the following steps to export participant and role data:
1. Create a context and add participants (users, user-defined groups, or organizations) to the appropriate roles.
2. From the Details page of the context, select the Export as Template action.
3. Ensure that the Team Members checkbox is selected and save the template to the local system.
For more information, see Using the Current Context as a Template
4. Create the context into which you want to load members. You do not need to create any roles in the new context. Roles that are present in the load file are created during the load process if they are not already present in the target context.
Creating the Load File
The load file is created by exporting member data from an existing product, library, project, or program context. Use the following steps to create the load file from an exported context template:
1. Browse to the directory in which the exported context template ZIP is saved.
2. Open the TAG-0.xml file from the CONTENTS directory.
3. Create a new XML file and copy the information in the <ExportedRoleMemberMap> and <ExportedGuestMembers> tags into the new file.
4. [Optional] Add <WTPrincipalReference> elements for participants that you want to load into a context team, but did not add to the team in the context from which the template was exported. For more information, see the Introduction to Data Loading and the LoadFromFile Framework.
Each role is contained in a <projectMember> element and is specified with a <Role> tag. Participants in that role are identified by a <WTPrincipalReference> element. For more information about these elements, see the Introduction to Data Loading and the LoadFromFile Framework.
The following example load data was taken from a product with two groups in the Members role, one user in the Product Manager role, one user in the Collaboration Manager role, and one user in the Guest role. Additional roles have been removed for simplicity.
<ExportedRoleMemberMap>
<projectMember>
<Role roleType="MEMBERS"></Role>
<WTPrincipalReference classType="wt.org.WTGroup" isInternal="false">
<ufid>cn=marketing team,ou=people,cn=administrativeldap,cn=windchill_10.2,o=ptc|Ldap.ptcnet.ptc.com|Ldap.ptcnet.ptc.com</ufid>
<name>Marketing Team</name>
</WTPrincipalReference>
<WTPrincipalReference classType="wt.org.WTGroup" isInternal="false">
<ufid>cn=publications team,ou=people,cn=administrativeldap,cn=windchill_10.2,o=ptc|Ldap.ptcnet.ptc.com|Ldap.ptcnet.ptc.com</ufid>
<name>Publications Team</name>
</WTPrincipalReference>
</projectMember>
<projectMember>
<Role roleType="COLLABORATION MANAGER"></Role>
<WTPrincipalReference classType="wt.org.WTUser" fullName=
"Henrietta Jackson" isInternal="false" surname="Jackson" userEmail
="hjackson@acme.com">
<ufid>uid=hjackson,ou=people,cn=administrativeldap,cn=windchill_
10.2,o=ptc|Ldap.ptcnet.ptc.com|Ldap.ptcnet.ptc.com</ufid>
<name>hjackson</name>
</WTPrincipalReference>
</projectMember>
<projectMember>
<Role roleType="PRODUCT MANAGER"></Role>
<WTPrincipalReference classType="wt.org.WTUser" fullName="Julie Brown" isInternal="false" surname="Brown" userEmail="jbrown@acme.com">
<ufid>uid=jbrown,ou=people,cn=administrativeldap,cn=windchill_10.2,o=ptc|Ldap.ptcnet.ptc.com|Ldap.ptcnet.ptc.com</ufid>
<name>jbrown</name>
</WTPrincipalReference>
</projectMember>
</ExportedRoleMemberMap>

<ExportedGuestMembers>
<WTPrincipalReference classType="wt.org.WTUser" fullName="Paul Riley" isInternal="false" surname="Riley" userEmail="priley@acme.com">
<ufid>uid=priley,ou=people,cn=administrativeldap,cn=windchill_10.2,o=ptc|Ldap.ptcnet.ptc.com|Ldap.ptcnet.ptc.com</ufid>
<name>priley</name>
</WTPrincipalReference>
</ExportedGuestMembers>
Running the Utility
Run one of the following commands to load members into a context:
Product:
windchill wt.load.LoadFromFile -d <File Path> -u <User Name> -p
<Password> -CONT_PATH\"/wt.inf.container.OrgContainer=
<Organization Name>/wt.pdmlink.PDMLinkProduct=
<Product Name>"
Library:
windchill wt.load.LoadFromFile -d <File Path> -u <User Name> -p
<Password> -CONT_PATH\"/wt.inf.container.OrgContainer=
<Organization Name>
/wt.inf.WTLibrary=<Library Name>"
Project:
windchill wt.load.LoadFromFile -d <File Path> -u <User Name> -p
<Password> -CONT_PATH\"/wt.inf.container.OrgContainer=
<Organization Name>
/wt.projmgmt.admin.Project2=<Project Name>"
where:
<File Path> is the full path to the load file
<User Name> is the user name of the administrative user running the utility
<Password> is the password of the administrative user running the utility
<Organization Name> is the organization context under which the target project context resides
<Project Name> is the target project context into which the members are loaded
For example, the following command would be used for the product example load file created in the previous section:
windchill wt.load.LoadFromFile -d D:/LoadFiles/ProductRole.xml
-u username -p password -CONT_PATH\"/wt.inf.container.OrgContainer
=UmbrellaOrganization/wt.pdmlink.PDMLinkProduct=SportUmbrella"