Count relationships using erichment
I'm trying to use an integration between uCMDB and SM to push the number of CPUs related to any given Node. My thought was that I would create a new attribute for Node and use enrichment to count the number of related CPUs, but I'm not quite sure how to count relationships in enrichment.
Anyone know how I can accomplish that? Or an alternate solution?
Attached, an example of what I am trying to count.
First of all using enrichment you cannot accomplish to populate the number of CPUs for a node attribute so another approach should be used.
First ideea which comes in my mind is create a java program which uses JAVA API to return the results of a query of type NODE -containment- CPU , then count the CPUs per Node and store this value inside a Node's new attrbute.