# Program Node template with nested XMLRPCalls

**URL:** <https://forum.universal-robots.com/t/program-node-template-with-nested-xmlrpcalls/12217>\
**Category:** URCaps SDK\
**Created:** [February 8, 2021, 8:40am UTC](https://forum.universal-robots.com/t/program-node-template-with-nested-xmlrpcalls/12217 "2021-02-08T08:40:37Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![jbm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/jbm/32/614_2.png) [@jbm](https://forum.universal-robots.com/u/jbm)\
**Post date:** [February 8, 2021, 10:13am UTC](https://forum.universal-robots.com/t/program-node-template-with-nested-xmlrpcalls/12217/4 "2021-02-08T10:13:56Z")

</div>

Then you are likely required to have the nodes in the tree, to enable the XML-RPC triggers between the waypoints.  
The concern from a UX perspective I totally follow, and if it becomes to negative on the user experience side, I’d consider changing the state machine logic for a one-time fire.

To make the nodes unavailable to be added manually, you need to set the “UserInsertable” flag to false in the Service registration for the node.

To set the target ID to the child nodes, you should take a look at the “Custom API”. There is a sample here:

> [@URCap Sample: URCap CustomAPI](https://forum.universal-robots.com/t/urcap-sample-urcap-customapi/3022):
>
> URCap CustomAPI Description of functionality: This example demonstrated the usage of the URCap CustomAPI interface. Allowing a parent node to configure the configuration of its child node. In this example, this is covered by allowing the parent node to define the color of the child node. What topics are covered: Proprietary API, Custom API, parent node, child node, interfaces [Find it on Github!](https://github.com/BomMadsen/URCap-CustomAPI) Requirements: URCaps API 1.3 (Swing)

On the matter of boilerplate-reduction;  
You can make an **abstract implementation of the “XMLRPC Program Node Contribution”**.  
I assume the GUI and functionality of each node will be very much the same, so an alternative is to create an abstract class, which is extended by thin implementations that only care about the XML-RPC call, the node title and other small things that change - you could even set these in the constructor. For the View, you could re-use the same implementation and setup the differences from the Contribution. You can then do 3 Service registrations, calling the extending version of your Program Node Contributions.

---

_[View the full topic](https://forum.universal-robots.com/t/program-node-template-with-nested-xmlrpcalls/12217)._
