Community Tip - You can change your system assigned username to something more personal in your community settings. X
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?