In UCMDB JAVA API can we add two relational node

Hi,
I am using UCMDB 8.0. And i am creating dynamic TQL by java API.I have added three querynode such as host ,ip and memory. Now my code is giving proper result for CIs but in case of Relations it is not giving any realtions.

 

TopologyQueryService queryService =    ucmdbService.getTopologyQueryService();    
   TopologyQueryFactory queryFactory = queryService.getFactory();      
    QueryDefinition queryDefinition = queryFactory.createQueryDefinition("Get hosts' neighbors");       
    QueryNode cisNode = queryDefinition.addNode("CIs").ofType("host").queryProperties("display_label");      
    QueryNode memoryNode = queryDefinition.addNode("Memory").ofType("memory").queryProperty("display_label");
    QueryNode ipNode2 = queryDefinition.addNode("IP").ofType("ip").queryProperty("display_label");
    Topology topology = queryService.executeQuery(queryDefinition);

    Collection<TopologyCI> hosts = topology.getAllCIs();

   Collection<TopologyRelation> hostRelations=topology.getAllRelations();

System.out.println("hostRelations size" hostRelations.size());

 

It is giving 0 for Host Relations.

 

Thanks in advanced.

Devesh

 

 

P.S. This thread has been moevd from Application Perf Mgmt (BAC / BSM) Support and News Forum to CMS and Discovery Support and News Forum. - Hp Forum MOderator