Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
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.
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.
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.
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.
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.