
|
[wc-pdmlink]
||
[Date Prev]
[03-2004 Date Index]
[Date Next]
||
[Thread Prev]
[03-2004 Thread Index]
[Thread Next]
[wc-pdmlink] Re: Renaming Products and Repositories
- From: "Villanueva, Antonio" <Antonio.Villanueva@xxxxxxxxxxxx>
- To: "'wc-pdmlink@xxxxxxxxxxxxx'" <wc-pdmlink@xxxxxxxxxxxxx>
- Date: Wed, 17 Mar 2004 09:21:50 -0500
Hmmm, cannot send attachments to freelists. Ok, here is the text version:
Renaming a Product or Repository in PDMLink 626
This document requires special modifications to the standard PDMLink system.
An additional JSP page has been added under the Administration tab.
When a Product or Repository is created, a cabinet is created in PDMLink
along with an administrative domain. They are tied together and the names
must match. If there is a disconnect, you will have problems displaying
pages in PDMLink. This tool works but since there is always something that
can go wrong, it is strongly advised that the database be backed up before
performing changes of this nature. For Products, there is a Product object
that is created in the cabinet. This will be changed as well. The Product
number will not be changed but that can be changed easily in Windchill
explorer.
As part of the configuration of PDMLink, there are 3 groups that are created
and associated via Teams to each Product or Repository. These groups have
the existing name as part of their name. For example, ProductA would have
ProductA Managers, ProductA Authors and ProductA Observers. The team is
used to map the groups to roles that are used in the workflows.
When an object is created in a Product or Repository, the team is mapped to
that object. The typedservices.properties defines this mapping based on the
Product or Repository name and the name of the team. This will need to be
changed as well. This file is located in the codebase folder of PDMLink.
1. Backup the database before beginning this procedure.
2. For each Product and Repository to rename...
a. Go to Administrator tab and click on Rename/Product Rename Tool.
b. Type in the old name, the new name and the description. The
description and name should appear like below for Repositories. When you
choose update, PDMLink will be restarted.
c. Verify that the change was made properly by visiting the Products,
Repository and Administration page. If the page fails to load completely,
restore the database from backup.
d. If this is a Product being renamed, make sure that number for the
Product is correct. If not, skip to step l.
e. Go to the Administration tab and click on Windchill Explorer.
f. A popup should appear. Click on Windchill Explorer.
g. A java window should appear showing all the cabinets.
h. Click on the Product cabinet that matches the new name.
i. There on the right hand window will be an object with the same name
as the cabinet and of type "Product". Highlight this object and click
File-rename.
j. Enter the new number but DO NOT CHANGE THE NAME. Click ok and close
Windchill Explorer
k. Verify that number has been changed by clicking on the Products tab.
New number should be displayed however due to server caching, it may not
show up right away.
l. Rename the associated groups. Go to the Administration tab and click
on Users and Groups. (See note below for this step)
m. Select Groups radio button and click search.
n. For each group associated to the old name...
o. Click on the group name. This should bring up a page where you can
change the name and description. Change to the new name leaving the words
Authors, Managers and Observers at the end where appropriate.
p. Verify that the change took by re-searching the groups, checking the
Policy administration. The policy administration is available from the
Administration tab. Click on Policies. Expand "PDMLink" to show the Product
or Repository by its new name. Select view. Click on the Access Control
tab. Click the retrieve button. New group name should appear under the
Principal column.
q. Rename associated Teams. Go to the Administration tab. Click on
Teams.
r. Select the Team associated with the old Product or Repository name.
s. Click view to verify that the new group names are listed.
t. Click rename and replace the old name with the new name. Keep this
new name handy.
u. Make changes to typedservices.properties file. This file is located
in /pdmlink/ptc/pdmlink/Windchill/codebase folder. At the end of the file
should find lines similar to this:
################################################################
# Antonio Villanueva - 17Feb2004
################################################################
wt.services/rsc/default/com.ptc.windchill.pdmlink.TeamDelegate/ProductA/WCTY
PE|wt.fc.WTObject/0=ProductA Team
wt.services/rsc/default/com.ptc.windchill.pdmlink.TeamDelegate/ProductB/WCTY
PE|wt.fc.WTObject/0=ProductB Team
wt.services/rsc/default/com.ptc.windchill.pdmlink.TeamDelegate/ProductC/WCTY
PE|wt.fc.WTObject/0=ProductC Team
wt.services/rsc/default/com.ptc.windchill.pdmlink.TeamDelegate/ProductD/WCTY
PE|wt.fc.WTObject/0=ProductD Team
wt.services/rsc/default/com.ptc.windchill.pdmlink.TeamDelegate/ProductE/WCTY
PE|wt.fc.WTObject/0=ProductE Team
wt.services/rsc/default/com.ptc.windchill.pdmlink.TeamDelegate/ProductF/WCTY
PE|wt.fc.WTObject/0=ProductF Team
wt.services/rsc/default/com.ptc.windchill.pdmlink.TeamDelegate/ProEUpload/WC
TYPE|wt.fc.WTObject/0=ProEUpload Team
wt.services/rsc/default/com.ptc.windchill.pdmlink.TeamDelegate/Basic Parts
Library/WCTYPE|wt.fc.WTObject/0=Basic Parts Library Team
wt.services/rsc/default/com.ptc.windchill.pdmlink.TeamDelegate/ProEStandards
/WCTYPE|wt.fc.WTObject/0=ProEStandards Team
#------END: typedservices.properties file entries
v. Find the line associated with the old Product or Repository and team
name.
w. Replace with new name and new team name. Make sure they are spelled
exactly as they appear in PDMLink. File is case sensitive. Watch out for
extra or trailing spaces.
x. Restart PDMLink.
y. Verify by creating a test document in PDMLink under this new Product
or Repository.
z. From either the Product or Repository Tab as wcadmin, there should
be an icon that looks like this:
aa. This will launch a popup window to create a document. Click Next.
Fill out the form. The content file is required but it is not critical what
it is. Click finish.
bb. Search for new document in search window. Click on name hyperlink to
go to detail page. There should be a hyperlink next to Team. This will show
the team mappings. The new group names should be listed there.
Repeat steps for any additional groups that need to be renamed.
Antonio Villanueva
3/16/04
Note on renaming groups - OOTB PDMLink might need to have an additional
setting to allow the rename of a group.
1. Add credentials to allow PDMLink to rename groups
a. Login to PDMLink and go to Administration Tab
b. Click on InfoEngine
c. Login with Principal set as "cn=Manager" and Password as "ldapadmin"
d. Set the Directory System Agent User to "cn=Manager" and Directory
System Agent Credentials to "ldapadmin"
e. Click "ok" at the bottom.
rename.jsp (from codebase/customizations/renameRepTool)
<%@page language="java"%>
<%@page import="com.ptc.windchill.pdmlink.repository.common.*"%>
<%@page import="com.infoengine.util.Base64"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core" prefix="ie"%>
<body bgColor=#E7E9E0>
<!-- CHANGE THE VALUE OF THIS VARIABLE -->
<%! String INSTANCE="local.danbury.pdmlink.Windchill";%>
<% String description = request.getParameter("description");
if ( description==null || description.trim().length()==0)
description = null;
String showForm = request.getParameter("form");
if ( showForm == null ) {%>
<H1>Rename Existing Product or Repository</h1>
<B>This tool is unsupported by PTC and should be only used by
Administrators. Enter the name of the Product or Repository without slashes
exactly as it appears on screen. The database should be backed up BEFORE
running this tool. In addition, each successful run of this tool will
result in restarting of the Method Server. It should therefore be run off
hours.<B>
<Form name="form">
<input type=hidden name=form value=no>
<table border=0>
<TR>
<td><b>Old Name</b>:</td>
<td><input name=old></td>
</tr>
<tr>
<td><b>New Name</b>:</td>
<td><input name=new></td>
</tr>
<tr>
<td><b>New Description</b>:</td>
<td><textarea name=description cols=30 rows=2></textarea></td>
<td><font size=-1>(to leave Description unchanged, leave this
field blank)</font></td>
</tr>
<tr>
<td colspan=2 align=center><input type=submit value="Update"></td>
</tr>
<table>
</form>
<%} else {%>
<ie:authenticate/>
<ie:webject name="Update-Objects" type="ACT">
<ie:param name="FIELD" data="name='${FORM[]new[0]}'"/>
<% if (description != null ) {%>
<ie:param name="FIELD"
data="description='${FORM[]description[0]}'"/>
<%}%>
<ie:param name="CLASS" data="wt.folder.Cabinet"/>
<ie:param name="ELEMENT" data="FAILURE=IEException"/>
<ie:param name="INSTANCE" data="<%=INSTANCE%>"/>
<ie:param name="DBUSER" data="${FORM[]user[0]}"/>
<ie:param name="PASSWD" data="${FORM[]passwd[0]}"/>
<ie:param name="GROUP_OUT" data="products"/>
<ie:param name="ATTRIBUTE" data="name"/>
<ie:param name="WHERE" data="name='${FORM[]old[0]}'"/>
</ie:webject>
<b>Updated The Cabinet</b><br>
</ie:unit>
<ie:webject name="Query-Objects" type="OBJ">
<ie:param name="TYPE" data="wt.part.WTProductMaster"/>
<ie:param name="INSTANCE" data="<%=INSTANCE%>"/>
<ie:param name="DBUSER" data="${FORM[]user[0]}"/>
<ie:param name="PASSWD" data="${FORM[]passwd[0]}"/>
<ie:param name="GROUP_OUT" data="productMasters"/>
<ie:param name="WHERE" data="name='${FORM[]old[0]}'"/>
</ie:webject>
<ie:forEach groupIn="productMasters" groupOut="product">
<ie:webject name="Change-Identity" type="ACT">
<ie:param name="FIELD" data="name='${FORM[]new[0]}'"/>
<ie:param name="ELEMENT"
data="FAILURE=IEFatalServiceException"/>
<ie:param name="TYPE" data="wt.part.WTProductMaster"/>
<ie:param name="INSTANCE" data="<%=INSTANCE%>"/>
<ie:param name="DBUSER" data="${FORM[]user[0]}"/>
<ie:param name="PASSWD" data="${FORM[]passwd[0]}"/>
<ie:param name="GROUP_OUT" data="products"/>
<ie:param name="WHERE" data="name='${product[]name[0]}'"/>
</ie:webject>
<b>Updated The Product Master</b><br>
</ie:forEach>
<ie:webject name="Update-Objects" type="ACT">
<ie:param name="FIELD" data="name='${FORM[]new[0]} Templates'"/>
<% if (description != null ) {%>
<ie:param name="FIELD"
data="description='${FORM[]description[0]}'"/>
<%}%>
<ie:param name="CLASS" data="wt.folder.Cabinet"/>
<ie:param name="INSTANCE" data="<%=INSTANCE%>"/>
<ie:param name="DBUSER" data="${FORM[]user[0]}"/>
<ie:param name="PASSWD" data="${FORM[]passwd[0]}"/>
<ie:param name="GROUP_OUT" data="products"/>
<ie:param name="ATTRIBUTE" data="name"/>
<ie:param name="WHERE" data="name='${FORM[]old[0]} Templates'"/>
</ie:webject>
<b>Updated The Templates Cabinet</b><br>
<ie:webject name="Update-Objects" type="ACT">
<ie:param name="FIELD" data="name='${FORM[]new[0]}'"/>
<% if (description != null ) {%>
<ie:param name="FIELD"
data="description='${FORM[]description[0]}'"/>
<%}%>
<ie:param name="CLASS" data="wt.admin.AdministrativeDomain"/>
<ie:param name="INSTANCE" data="<%=INSTANCE%>"/>
<ie:param name="DBUSER" data="${FORM[]user[0]}"/>
<ie:param name="PASSWD" data="${FORM[]passwd[0]}"/>
<ie:param name="GROUP_OUT" data="products"/>
<ie:param name="ATTRIBUTE" data="name"/>
<ie:param name="WHERE" data="name='${FORM[]old[0]}'"/>
</ie:webject>
<b>Updated The Administrative Domain</b><br>
<%
String authHeader = request.getHeader ("Authorization");
String authUser = null;
String authPass = null;
try {
if ( authHeader != null && authHeader.substring (0,
6).equalsIgnoreCase ("Basic ") ) {
String decoded =Base64.decode (authHeader.substring (6).trim
());
if ( decoded != null ) {
int i = decoded.indexOf (":");
if ( i != -1 ) {
authUser = decoded.substring (0, i);
authPass = decoded.substring (i + 1);
}
}
}
wt.util.WTContext.init((String[])null);
if(authUser!=null)
wt.method.RemoteMethodServer.getDefault().setUserName(authUser);
if(authPass!=null)
wt.method.RemoteMethodServer.getDefault().setPassword(authPass);
wt.method.RemoteMethodServer.getDefault().stopAllServers();
out.println("<b>Killed The Method Server</b><br>");
wt.manager.RemoteServerManager.getDefault().reportDeadServer("MethodServer",
wt.manager.RemoteServerManager.getDefault().getServer("MethodServer"), new
Exception("changed Repository Name by Admin Portal"));
out.println("<b>Restarted The Method Server</b>");
wt.manager.ServerLauncher.start();
} catch( Exception e ) {
e.printStackTrace();
}
%>
<br><b>Done with updates!</b><br>
<%}%>
</body>
-----Original Message-----
From: Villanueva, Antonio [mailto:Antonio.Villanueva@xxxxxxxxxxxx]
Sent: Wednesday, March 17, 2004 9:17 AM
To: 'wc-pdmlink@xxxxxxxxxxxxx'
Subject: [wc-pdmlink] Renaming Products and Repositories
Content-Type: text/plain
Here is a document that I wrote that should handle this.
-- Binary/unsupported file stripped by Ecartis --
-- Type: application/msword
-- File: PDMLink Rename Product Instructions.doc
|

|