cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Set End Items Lifecycle State to Obsolete

rdayalu
9-Granite

Set End Items Lifecycle State to Obsolete

Hello All,



Do you know a way to set the lifecycle state to Obsolete on End Items
belonging to different product groups?



We have around 4000 items that needs to be marked Obsolete from the
Released state.



The reassign lifecycle option or the search and set state option is very
time consuming.



Is there a utility that can do this? Please let me know.



Thank you for helping.



Regards,
Rekha


14 REPLIES 14
avillanueva
22-Sapphire II
(To:rdayalu)

In a workspace, you can use set state and feed it a search results.
rdayalu
9-Granite
(To:rdayalu)

Antonio,

Thank you for your help.

Unfortunately we don't have the CAD integration yet on our Windchill system.

Only a utility or a script can do this.

Regards,
Rekha

Are you using pro/E?



Herb Miller

TWeatherford, Inc.

3148 Beach Blvd

Cicero, IN 46034

www.tweatherford.com
clicking here

"If you continue to ignore PLM, you will learn about it from your biggest
competitor"
avillanueva
22-Sapphire II
(To:rdayalu)

You can enable a web view of the workspace.
rdayalu
9-Granite
(To:rdayalu)

Yes. Pro-E with WF4.

However, the End Items I am referring to is only on Windchill Product structure.

Pro-E does not have any knowledge about these End Items as they are finished goods (sold to customers)

One level down (top assembly) is what pro-e understands.

Regards,
Rekha

Hello

Hello

I did not thoroughly read all the messages on this one, but from what I seen, there is a need to take mass objects & reassign lifecycle.

Maybe an old ptc wc8 reassign lifecylejsp can help. It that allows drop-downs for many object types (I think including end items) or they can
be added. It has a couple issues in wc9, but I have not had time to update.

Main issue:

The later version of tomcat wants $() in wc9, instead of ${} as in wc8 or before.

$(@FORM[]container[0]) instead of${@FORM[]container[0]}

But I think it will work with that change alone. It also needs table viewing clean-up. Thats 5-10 minutes for Antonio..Ha..Ha

It allows for multiple objects searches & has name/number search fields (might want specific syntax), then displays all
objects is finds. Then allows for new lifecycle & state change through drop-downs.

I have attached the code. Hope it helps.

L Jett
cadjett@aol.com,datajett@aol.com

rdayalu
9-Granite
(To:rdayalu)

All,



Thanks to all who responded. I really appreciated that. I have to try
the workspace and the JSP technique.



I completed this task of setting the lifecycle states on these End
Items.



I did it via Oracle database directly. I prefer not to touch the
database (bad things can happen!). However, in this particular case, I
felt safe to do so.



I tested it on the test server before applying it on Production server.



Below is a snippet of the queries I used:



select ida2a2

from wtpartmaster

where wtpartnumber in ('End-Item1','End-Item2')



And from the result set, executed the below query



UPDATE WTPART

set statestate = 'OBSOLETE'

WHERE ida3masterreference IN (1001,1002)





So as you can see I used the select query to get the IDA2A2 from the
WTPartMaster table and updated the WTPart table to set the state to
Obsolete.



Regards,

Rekha




avillanueva
22-Sapphire II
(To:rdayalu)

I am not sure if the system cares or not but this approach does not
create a Lifecycle History record for this change.


rdayalu
9-Granite
(To:rdayalu)

Antonio,

I appreciate these comments because it helps to cross check and validate.

I think it does not create an iteration (revision history) when you set state, even via the UI. (Unless there is an enable history tracking button on the UI which we have not enabled)

I noticed that and that was a prime reason why I thought safe to change using sql scripts.

If I noticed it rolled an iteration when I set the state, then I would be very hesitant to change the database.

Regards,
Rekha

When you promote objects it doesn't iterate but the state changes and 
you'll see that in it's maturity history. It's nice to know how an 
object got to its current state.

Steve D.



Antonio, Yes you are right. The query should be a little more
complicated that it can revise the part and set lifecycle state.


thanks,
Dmitry
rwelch
6-Contributor
(To:rdayalu)

Rekha,

Even though a new iteration is not created when a part's state is set, the "Promoted By" and "Promoted On" attributes in the "Maturity History" for the part will get updated if you set the state via the Java APIs. This is the API call that I generally use to do it:

LifeCycleHelper.service.setLifeCycleState(aPart, State.toState("OBSOLETE"));

It works on any lifecycle managed object, not just parts. So you could for example convert your SQL query to a QuerySpec and loop through the ResultSet with the API call above.

Ron

Hello

In case some one wanted to use the jsp I attached, I just recalled 2 other changes needed for wc9.

The begin & end jsp needs to be changed to jspf:

From:

<%@ include file="/netmarkets/jsp/util/begin.jsp"%>
<%@ include file="/netmarkets/jsp/util/end.jsp"%>

To:

<%@ include file="/netmarkets/jsp/util/begin.jspf"%>
<%@ include file="/netmarkets/jsp/util/end.jspf"%>

This is just from memory. Have not gone to vmare & checked syntax.

L Jett

Announcements

Top Tags