# Communication between different ProgramNodeContribution Classes

**URL:** <https://forum.universal-robots.com/t/communication-between-different-programnodecontribution-classes/3148>\
**Category:** Java\
**Created:** [November 21, 2018, 11:04am UTC](https://forum.universal-robots.com/t/communication-between-different-programnodecontribution-classes/3148 "2018-11-21T11:04:48Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [November 21, 2018, 1:00pm UTC](https://forum.universal-robots.com/t/communication-between-different-programnodecontribution-classes/3148/2 "2018-11-21T13:00:44Z")

</div>

Generally speaking, the parent node can access the child nodes.  
But the child nodes cannot get or modify parents or siblings.

In order for the parent node to get the child nodes, you should use the `ProgramNodeVisitor` to visit any URCap program node child.  
Then, each of these children should implement a URCap proprietary API.  
And if the parent `canGetAs()` on these child URCap nodes, they are an instance of the desired child node type.  
The nodes can then be configured using the methods provided by this proprietary API.

An example of this implementation can be found in this example:

> [@URCap Sample: URCap CustomAPI](https://forum.universal-robots.com/t/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)

Btw, I am a bit in doubt of the usage of your `ContributionProvider` in the child node contribution.  
The purpose of the ContributionProvider, is to provide access to an active contribution from the View-class.  
And the usage displayed here, is probably not supported.

---

_[View the full topic](https://forum.universal-robots.com/t/communication-between-different-programnodecontribution-classes/3148)._
