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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Modifying Life Cycle Template and Change Workflows

DonSenchuk
12-Amethyst

Modifying Life Cycle Template and Change Workflows

Due to some users skirting the system -- which I should have forseen -- I have to make adjustments to our Change Notice & Change Activity workflows. This requires adding a new Life Cycle State and updating all the EPMDocs.


Of course we have a bunch of workflows currently running that are tied to the old Life Cycle template and use the previous version of the Change Notice workflow.


After I edit/check in the LC template and Change Notice workflow and I reassign life cycle of all the EPMDocs to the new LC template, any new Change Notices created should work fine.


The problem I run into is what do I do with the workflows in process. Is there a way to updating existing change notice workflows to use the latest template? While the changes aren't extensive, they're different enough that the new LC template will not work with the old CN workflow.


My initial thought was to update only the EPMDocs that are not associated with an active change workflow. The problem, of course, becomes how do I track those files in order to update them in the future to the new LC template. These are change notices that may take months to complete so it becomes much more difficult to track when they are finally closed and I can update their life cycle template.


If an EPMDoc is left with the old LC template and someone starts a new workflow I anticipate errors that may require manual intervention of setting them to the correct LC template. I'm okay with that as long as after that manual intervention the workflow continues on its merry way.

3 REPLIES 3

Call PTC tech support and ask for them to send you an SQL script to mass
update all objects that point to a Lifecycle Template by Name in order to
repoint them to the latest iteration of the same Lifecycle Template by
Name. Once you do that, all running workflows will just set the state of
their primary business object that will be pointing to the new template,
and causing that new template to fire whatever new states with new
workflows or rules without any actual update to the running WfProcess
objects.

If PTC tech support gives you the brick wall, then let me know and I will
get my programmers to give me the code snippet we use every time we change
a lifecycle template like this. We have used it in this way for years.

Al







[solutions] - Modifying Life Cycle Template and Change Workflows

Don Senchuk
to:
solutions
01/31/2014 07:55 AM

Please respond to Don Senchuk



Caterpillar: Confidential Green Retain Until: 03/02/2014



Due to some users skirting the system -- which I should have forseen -- I
have to make adjustments to our Change Notice & Change Activity workflows.
This requires adding a new Life Cycle State and updating all the EPMDocs.
Of course we have a bunch of workflows currently running that are tied to
the old Life Cycle template and use the previous version of the Change
Notice workflow.
After I edit/check in the LC template and Change Notice workflow and I
reassign life cycle of all the EPMDocs to the new LC template, any new
Change Notices created should work fine.
The problem I run into is what do I do with the workflows in process. Is
there a way to updating existing change notice workflows to use the latest
template? While the changes aren't extensive, they're different enough
that the new LC template will not work with the old CN workflow.
My initial thought was to update only the EPMDocs that are not associated
with an active change workflow. The problem, of course, becomes how do I
track those files in order to update them in the future to the new LC
template. These are change notices that may take months to complete so it
becomes much more difficult to track when they are finally closed and I
can update their life cycle template.
If an EPMDoc is left with the old LC template and someone starts a new
workflow I anticipate errors that may require manual intervention of
setting them to the correct LC template. I'm okay with that as long as
after that manual intervention the workflow continues on its merry way.

Site Links: View post online View mailing list online Start new thread
via email Unsubscribe from this mailing list Manage your subscription

Use of this email content is governed by the terms of service at:

Just FYI - We obtained such code from PTC and successfully executed twice for > 1 million objects.
But - We did this for product data (Parts, Documents, CAD Documents), not change objects. Could be much more complex with workflows involved.

We execute it on Change Objects that have running workflows regularly. The
WfProcess does not have any pointer to a Lifecycle Template. It is the
primary business object that has the pointer to the LC Template.
Therefore, when you change the PBO's template, any running WfProcess
object that changes the state of that PBO will have no choice but to use
the new LC Template, since that will the one linked to the PBO after
making the SQL change.

It works great.

Al







[solutions] - RE: Modifying Life Cycle Template and Change Workflows

Lockwood, Mike
Announcements


Top Tags