Loading Users, Profiles, and Service Groups
Users, profiles, and service groups can be loaded from files during the initial setup and configuration of Servigistics InService, rather than being created individually from the utilities on the administration home page. This is accomplished using the LoadFromFile command-line utility.
Once loaded into Servigistics InService, these users, profiles, and service groups can be viewed and managed from the utilities on the administration home page.
The LoadFromFile syntax is as follows:
windchill wt.load.LoadFromFile -d <data file name> -u <username> -p <password>
where:
• <data file name> specifies the name of the object file that contains the objects to be loaded. This argument is required.
• <username> and <password> are the credentials for the Servigistics InService administrator. These arguments are optional, but if they are not entered with the command, you are prompted to authenticate when the utility is run.
For example, to load users from a file named Users.xml, complete the following steps:
1. Open the command prompt from <InS_HOME>\InService\InS_SW\SW\Applications\Windchill.ear\bin
2. Open a Windchill shell.
3. Run the following command:
windchill wt.load.LoadFromFile -d Users.xml
4. When prompted to authenticate, provide the credentials of a Servigistics InService administrator.
The following sections include sample load files for loading users, profiles, and service groups:
• Loading Users
• Loading Profiles
• Loading Service Groups
Loading Users
Users from both the external enterprise identity management system (commonly LDAP) configured with Servigistics InService, as well internal users can be bulk loaded into Servigistics InService. Internal users are users created within Servigistics InService for internal systems purposes, which are not present in the external enterprise identity management system. For more information, see “Users” in the Servigistics InService Administration Help Center.
Load the SampleUsers.xml file by running the following command from a Windchill shell: wt.load.LoadFromFile -d SampleUsers.xml
The following SampleUsers.xml file shows the load file format for loading users.
<?xml version="1.0"?>
<!DOCTYPE NmLoader SYSTEM "standardX26.dtd">
<NmLoader>
<csvUser handler="orgLoadPrincipal.createUser">
<csvuser></csvuser>
<csvnewUser>mkangas</csvnewUser>
<csvwebServerID>mkangas</csvwebServerID>
<csvfullName>Mike Kangas</csvfullName>
<csvLast></csvLast>
<csvLocale></csvLocale>
<csvEmail></csvEmail>
<csvDescription></csvDescription>
<csvTitle></csvTitle>
<csvOrganization></csvOrganization>
<csvStreet1></csvStreet1>
<csvStreet2></csvStreet2>
<csvCity></csvCity>
<csvState></csvState>
<csvCountry></csvCountry>
<csvZipCode></csvZipCode>
<csvignore></csvignore>
<csvpassword></csvpassword>
<csvDirectoryService>com.ptc.ldap-web</csvDirectoryService>
</csvUser>
<csvUser handler="orgLoadPrincipal.createUser">
<csvuser></csvuser>
<csvnewUser>sampleUser</csvnewUser>
<csvwebServerID>sampleUser</csvwebServerID>
<csvfullName>Sample User</csvfullName>
<csvLast></csvLast>
<csvLocale></csvLocale>
<csvEmail>sampleUser@ptc.com</csvEmail>
<csvDescription></csvDescription>
<csvTitle></csvTitle>
<csvOrganization></csvOrganization>
<csvStreet1></csvStreet1>
<csvStreet2></csvStreet2>
<csvCity></csvCity>
<csvState></csvState>
<csvCountry></csvCountry>
<csvZipCode></csvZipCode>
<csvignore></csvignore>
<csvpassword>sampleUser</csvpassword>
<csvDirectoryService></csvDirectoryService>
</csvUser>
</NmLoader>
Note the following items:
• While the loader does not require the csvLast (user’s last name) element to be provided, it is a best practice to do so.
• The csvDirectoryService element is optional. When it is not provided, the user is added to InService as an internal user. If the user must be added to the external enterprise identity management system (commonly LDAP) which is configured with Servigistics InService, then the csvDirectoryService element must be populated with the appropriate value.
Loading Profiles
The following SampleProfiles.xml file shows the load file format for loading profiles.
<?xml version="1.0"?>
<!DOCTYPE InSObjects SYSTEM "standardX26.dtd">
<InSObjects>
<SCProfile>
<name>P2</name>
<description>Demo profile P2 from loader</description>
<objectContainerPath>/</objectContainerPath>
<PHNode>
<name>0000016616</name>
<value>SN_SedanHybrid_Engine V4</value>
<path>V=1~{"rId":"0000022202","op":["0000022202","0000015163","0000016604", "0000016607","0000022145","0000022144","0000016616"], "nn":289,"ts":1438844494106}
</path>
</PHNode>
<PHNode>
<name>0000022202</name>
<value>SEDAN</value>
<path>V=1~{"rId":"0000022202","op": ["0000022202","0000014982"]}</path>
</PHNode>
<IENode>
<name>Parts List</name>
<value>partsList</value>
<path>infoType</path>
</IENode>
<user>u1</user>
<user>u2</user>
<user>u3</user>
<privilege>Activation</privilege>
<privilege>Updation</privilege>
<enterpriseAttributes>
<name>faxNumber</name>
<value>340985034</value>
</enterpriseAttributes>
<enterpriseAttributes>
<name>email</name>
<value>demo_user@ptc.com</value>
</enterpriseAttributes>
</SCProfile>
<SCProfile>
<name>P1</name>
<description>Demo profile P1 from loader</description>
<objectContainerPath>/</objectContainerPath>
<allPHNode>true</allPHNode>
<allIENode>true</allIENode>
<user>u1</user>
<user>u2</user>
<user>u3</user>
<privilege>Activation</privilege>
<privilege>Updation</privilege>
<enterpriseAttributes>
<name>faxNumber</name>
<value>340985034</value>
</enterpriseAttributes>
<enterpriseAttributes>
<name>email</name>
<value>demo_user@ptc.com</value>
</enterpriseAttributes>
</SCProfile>
</InSObjects>
Note the following information:
• For each PHNode element (product hierarchy), you must specify the name, value, and path values. These values are found from the InService system, as follows:
◦ value — Use the name of the specific product hierarchy level from the bread crumb navigation.
◦ path — Use the following steps to determine the path value:
1. In the Servigistics InService user interface, navigate to the specific product hierarchy level which you want to include in the profile. Do not navigate further down the information structure hierarchy, to ensure that only the relative orientation path ID for the product hierarchy level is included.
2. Copy the string from the browser URL which comes after Product::. For example: Vj0xfnsicklkIjoiMDAwMDAyMjIwMiIsIm9wIjpbIjAwMDAwMjIyMDIiLCIwMDAwMDE0OTgyIiwiMDAwMDAxNjYwMSIsIjAwMDAwMTY2MTAiXSwibm4iOjQ5NCwidHMiOjE0NTk3NzExMjUwNzF9
3. Use an open source decoder (such as
https://www.base64decode.org/) to get the required orientation path output. For the URL string in step 2, this required orientation path output is:
V=1~{"rId":"0000022202","op":["0000022202","0000014982","0000016601","0000016610"],"nn":494,"ts":1459771125071}
◦ name—Use the last ID number in the “op”:[] section of the orientation path output from step 3.
Loading Service Groups
The following SampleServiceGroups.xml file shows the load file format for loading service groups.
|
Service groups cannot be bulk loaded, but can be loaded individually.
|
<?xml version="1.0"?>
<!DOCTYPE Dealership SYSTEM "standardX26.dtd">
<Dealership>
<name>Dealer D1</name>
<description>This is dealer d1</description>
<isLoader>true</isLoader>
<user>user1</user>
<user>user2</user>
<administrator>admin1</administrator>
<logo>
<fileName>tn_MN</fileName>
<fileLocation>codebase.war/wt/icons/tn_MN.jpg</fileLocation>
</logo>
</Dealership>
Note the following items:
• The isLoader element must have a value of true when loading service groups.
• The value of the fileLocation element for the service group logo must be relative to the Windchill.ear location.