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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Create Custom node in Workflow Template

prescient_rohit
7-Bedrock

Create Custom node in Workflow Template

I am using Windchill PDMLink Release 11.2 and Datecode with CPS 11.2.0.0

We want to create the new custom node on the Workflow Template Edit dialog. It could be just like the "Execute Expression" node.
How to create and Display that custom node on UI?
7 REPLIES 7

Can you describe your requirement? What kind of node would you want to create that is not satisfied by the existing types? This would be a very difficult thing to do.

We want to create the node the same as the "Execute Expression" node. 

 

We have some Java expression code that can be used every time in the "Execute Expression" node while creating workflow templates. So we think it is better to have a custom node that includes the pre-existing Java code.

Hi @prescient_rohit 

 

So use the existing type Execute expression node. Put there your code and that's all. 

You don't need any special new type node. Just add the existing type as a new one. 

HelesicPetr_0-1689144406569.png

 

PetrH

While this will create more workflow objects in your system you could consider setting that function up as a separate workflow template and just call that template each time. It'll be a little like creating your own functions while programming. If you need to change the code in it you'll just have to update it one place and not hunt around all workflows using it.

 

We have used such an approach that among other things handles publishing during workflows. Every workflow that needs to perfom publishing will call that workflow template, and if we need to make changes to how it works we only need to implement that code change one place.

buenosroas
13-Aquamarine
(To:buenosroas)

Found a suitable example for how it would look. As an additional benefit you can do more with nested workflow templates than a custom node (if this is at all possible) while at the same time not overloading your system with customizations. 

2023-07-13_15-10-23.jpg

If it’s “just like the Execution Expression node” why do you need a new node? 🤷‍♂️

We have some Java expression code that can be used every time in the "Execution Expression" node while creating workflow templates. So we think it is better to have a custom node that includes the pre-existing Java code.

Announcements


Top Tags