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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Adding states to lifecycle

vmcdaniel
2-Guest

Adding states to lifecycle

Gurus,
When adding additional states to my Lifecycle (no removal of existing states), what should I expect to see as a result for existing objects: 1. They will automatically adopt the latest changes/additions to the Life Cycle OR 2. They will continue their life cycle as it was when initiated.

The reason I ask is that the 'Reassign Life Cycle' function includes a 'Use latest Iteration of current' insinuating that in order to reflect the latest changes to the existing state this function would need to be performed.

[cid:image001.png@01CC6EC1.5ADCE030]

Thank you for your response,
Yay Friday!

Vaughn McDaniel III | CAD/PLM Administrator | Kärcher NA - Englewood |m:720.216.3495 o:303.762.1800x187 | vaughn.mcdaniel@karcherNA.com<">mailto:vaughn.mcdaniel@karcherNA.com>
[cid:image003.jpg@01CC6EC3.BCAE4F40]<">http://www.karcher.com/usa/Home.htm>
What is PLM?<">http://en.wikipedia.org/wiki/Product_lifecycle_management>
4 REPLIES 4

Cookie cutters (Lifecycle template) and cookies (objects using the lifecycle)...

Each object is assigned the Lifecycle on creation, and then again on each New Revision (Revise) action, but not when iterated. Essentially each lifecycle instance doesn't "know" the lifecycle template has changed.

The new lifecycle iteration can only be applied to all items that use the lifecycle using either the re-assign tool below or using a Windchill shell command available unofficially from PTC. The re-assign GUI shown below can be used for one or a few but of course is not practical for hundreds of thousands.

We've iterated our primary lifecycle used for most Docs / CAD Docs and all WTParts twice, and applied the changes to all items (700,000+). Takes a while - need to do on the weekend. Be careful about LC changes that remove states or those that have workflow templates mapped to them - could create a monster. Also, I believe the last time it ran we had issues with checked out items being skipped with no report of that.
AL_ANDERSON
5-Regular Member
(To:vmcdaniel)

>> 2. They will continue their life cycle as it was when initiated.

Whenever we update a lifecycle template to do something like add a new
state, in order to ensure that all existing objects adopt that latest
lifecycle template when and if we go to change the state of one of those
existing objects, we always run a script like this one to point existing
objects to the new, updated lifecycle template. It is a simple SQL script
for any object with a LifeCycle.

-- ---------------------------------------------------------------------
-- UpdateLatestLCT.sql
-- use: @UpdateLatestLCT WTChangeRequest2
-- ---------------------------------------------------------------------
-- ---------------------------------------------------------------------
-- Function to find latest Lifecycle Template
-- ---------------------------------------------------------------------
create or replace function latestLC(master_in IN number) RETURN number
IS maxida number;
BEGIN
SELECT max(ida2a2) into maxida from lifecycletemplate where
ida3masterreference = master_in;
RETURN maxida;
END latestLC;
/
DECLARE
CURSOR CHGLC IS
select unique a.ida3a2state, latestLC(b.ida3masterreference)
from &1 A, lifecycletemplate B where
a.ida3a2state = b.ida2a2;
chgstateoid number;
newstateoid number;
BEGIN
open CHGLC;
LOOP
fetch CHGLC into chgstateoid, newstateoid;
exit when (CHGLC%NOTFOUND);
update &1 set ida3a2state = newstateoid where ida3a2state =
chgstateoid;
END LOOP;
commit;
CLOSE CHGLC;
END;
/




Vaughn McDaniel <vaughn.mcdaniel@karcherna.com>
09/09/2011 07:24 AM
Please respond to
Vaughn McDaniel <vaughn.mcdaniel@karcherna.com>


To
-
cc

Subject
[solutions] - Adding states to lifecycle




Caterpillar: Confidential Green Retain Until: 10/09/2011



Gurus,
When adding additional states to my Lifecycle (no removal of existing
states), what should I expect to see as a result for existing objects: 1.
They will automatically adopt the latest changes/additions to the Life
Cycle OR 2. They will continue their life cycle as it was when initiated.

The reason I ask is that the ?Reassign Life Cycle? function includes a
?Use latest Iteration of current? insinuating that in order to reflect the
latest changes to the existing state this function would need to be
performed.



Thank you for your response,
Yay Friday!

Vaughn McDaniel III | CAD/PLM Administrator | Kärcher NA - Englewood
|m:720.216.3495 o:303.762.1800x187 | vaughn.mcdaniel@karcherNA.com

What is PLM?

Al,


Thanks for the great information, the sql approach seems like a good way to go to me!


Have you experienced any issues as a result of this update?


-----

Lewis




In Reply to Albert Anderson:


>> 2. They will continue their life cycle as it was when initiated.

Whenever we update a lifecycle template to do something like add a new
state, in order to ensure that all existing objects adopt that latest
lifecycle template when and if we go to change the state of one of those
existing objects, we always run a script like this one to point existing
objects to the new, updated lifecycle template. It is a simple SQL script
for any object with a LifeCycle.

-- ---------------------------------------------------------------------
-- UpdateLatestLCT.sql
-- use: @UpdateLatestLCT WTChangeRequest2
-- ---------------------------------------------------------------------
-- ---------------------------------------------------------------------
-- Function to find latest Lifecycle Template
-- ---------------------------------------------------------------------
create or replace function latestLC(master_in IN number) RETURN number
IS maxida number;
BEGIN
SELECT max(ida2a2) into maxida from lifecycletemplate where
ida3masterreference = master_in;
RETURN maxida;
END latestLC;
/
DECLARE
CURSOR CHGLC IS
select unique a.ida3a2state, latestLC(b.ida3masterreference)
from &1 A, lifecycletemplate B where
a.ida3a2state = b.ida2a2;
chgstateoid number;
newstateoid number;
BEGIN
open CHGLC;
LOOP
fetch CHGLC into chgstateoid, newstateoid;
exit when (CHGLC%NOTFOUND);
update &1 set ida3a2state = newstateoid where ida3a2state =
chgstateoid;
END LOOP;
commit;
CLOSE CHGLC;
END;
/




Vaughn McDaniel <vaughn.mcdaniel@karcherna.com>
09/09/2011 07:24 AM
Please respond to
Vaughn McDaniel <vaughn.mcdaniel@karcherna.com>


To
-
cc

Subject
[solutions] - Adding states to lifecycle




Caterpillar: Confidential Green Retain Until: 10/09/2011



Gurus,
When adding additional states to my Lifecycle (no removal of existing
states), what should I expect to see as a result for existing objects: 1.
They will automatically adopt the latest changes/additions to the Life
Cycle OR 2. They will continue their life cycle as it was when initiated.

The reason I ask is that the ?Reassign Life Cycle? function includes a
?Use latest Iteration of current? insinuating that in order to reflect the
latest changes to the existing state this function would need to be
performed.



Thank you for your response,
Yay Friday!

Vaughn McDaniel III | CAD/PLM Administrator | Kärcher NA - Englewood
|m:720.216.3495 o:303.762.1800x187 | vaughn.mcdaniel@karcherNA.com

What is PLM?

AL_ANDERSON
5-Regular Member
(To:vmcdaniel)

We have never experienced any negative issues resulting from pointing
existing objects to a new, latest iteration of its lifecycle template
after loading an update to that lifecycle template.

It is so basic, it should probably have some out of the box ability to do
that from the Lifecycle Administrator. But SQL works, too, in this case.

If you do this, make sure you understand what you are doing, and test it
first. We do this regularly, but I don't actually run the script. I got
the sample SQL from one of our programmers.

Al





Lewis Lawrence <lewis.lawrence@weatherford.com>
09/12/2011 11:30 AM
Please respond to
Lewis Lawrence <lewis.lawrence@weatherford.com>


To
-
cc

Subject
[solutions] - RE: Adding states to lifecycle




Caterpillar: Confidential Green Retain Until: 10/12/2011



Al,
Thanks for the great information, the sql approach seems like a good way
to go to me!
Have you experienced any issues as a result of this update?
-----

Lewis


In Reply to Albert Anderson:
>> 2. They will continue their life cycle as it was when initiated.

Whenever we update a lifecycle template to do something like add a new
state, in order to ensure that all existing objects adopt that latest
lifecycle template when and if we go to change the state of one of those
existing objects, we always run a script like this one to point existing
objects to the new, updated lifecycle template. It is a simple SQL script
for any object with a LifeCycle.

-- ---------------------------------------------------------------------
-- UpdateLatestLCT.sql
-- use: @UpdateLatestLCT WTChangeRequest2
-- ---------------------------------------------------------------------
-- ---------------------------------------------------------------------
-- Function to find latest Lifecycle Template
-- ---------------------------------------------------------------------
create or replace function latestLC(master_in IN number) RETURN number
IS maxida number;
BEGIN
SELECT max(ida2a2) into maxida from lifecycletemplate where
ida3masterreference = master_in;
RETURN maxida;
END latestLC;
/
DECLARE
CURSOR CHGLC IS
select unique a.ida3a2state, latestLC(b.ida3masterreference)
from &1 A, lifecycletemplate B where
a.ida3a2state = b.ida2a2;
chgstateoid number;
newstateoid number;
BEGIN
open CHGLC;
LOOP
fetch CHGLC into chgstateoid, newstateoid;
exit when (CHGLC%NOTFOUND);
update &1 set ida3a2state = newstateoid where ida3a2state =
chgstateoid;
END LOOP;
commit;
CLOSE CHGLC;
END;
/




Vaughn McDaniel <vaughn.mcdaniel@karcherna.com>
09/09/2011 07:24 AM
Please respond to
Vaughn McDaniel <vaughn.mcdaniel@karcherna.com>


To
-
cc

Subject
[solutions] - Adding states to lifecycle




Caterpillar: Confidential Green Retain Until: 10/09/2011



Gurus,
When adding additional states to my Lifecycle (no removal of existing
states), what should I expect to see as a result for existing objects: 1.
They will automatically adopt the latest changes/additions to the Life
Cycle OR 2. They will continue their life cycle as it was when initiated.

The reason I ask is that the ?Reassign Life Cycle? function includes a
?Use latest Iteration of current? insinuating that in order to reflect the

latest changes to the existing state this function would need to be
performed.



Thank you for your response,
Yay Friday!

Vaughn McDaniel III | CAD/PLM Administrator | Kärcher NA - Englewood
|m:720.216.3495 o:303.762.1800x187 | vaughn.mcdaniel@karcherNA.com

What is PLM?

Top Tags