Skip to main content
4-Participant
September 25, 2025
Solved

Update workflow activity template

  • September 25, 2025
  • 2 replies
  • 895 views

Version: Windchill 12.1

 

Use Case: To update the workflow activity template on start transition


Description:

I am not able to find any api or workaround on ptc to assign the activity template programmatically on start transition.

SJ_11714880_0-1758801813896.png

 

Best answer by joe_morton

As another method, you could have the same task with the various templates, and then route the workflow to the correct task template.

2 replies

avillanueva
23-Emerald I
23-Emerald I
September 25, 2025

This task is to the user to create the change notice. No Change Notice should exist yet so its not possible to assign a template. Are you looking to automate the creation of a change notice for the user? If so, you would not need a template but rather you can create all the elements and fields via code. 

4-Participant
September 25, 2025

I am not looking to create the Change Notice Automatically, I receive this task to create the change notice and there is an action to do so.

SJ_11714880_0-1758804622266.png

But the specific task do not have the complete button, because of the wrong activity template. I cannot set it from the UI because it I need to check for certain validations on start  of the activity. Let me know if you need more clarity on it.

 

avillanueva
23-Emerald I
23-Emerald I
September 25, 2025

Right, at this point, your are outside of the workflow template. You can set defaults on what template comes up but any logic would need to be added to a data utility that influences the template drop down that appears preselected. 

joe_morton
18-Opal
18-Opal
September 25, 2025

As another method, you could have the same task with the various templates, and then route the workflow to the correct task template.

4-Participant
September 25, 2025

Yes, I have thought of this workaround but I have was looking for customization.

avillanueva
23-Emerald I
23-Emerald I
September 25, 2025

So we are clear, you are looking to have this drop down that selects the change notice template to default to a specific one based on some custom logic, correct? Where would be the source information for this decision maintained?

avillanueva_0-1758828483909.png

This is the information on that drop down:

avillanueva_1-1758828645109.png