objectmodulehyperlinksystemibm-doors

How to know if an object has IN-LINKS in DXL


I'm trying to make a DXL program that looks the IN-LINKS of a given object.

I will explain myself better: in my system, the links goes from SW to SYS modules, and for the SW modules I need to see some things about the SYS attributes linked to software. But for the SYS modules I need to see diferent things from these attributes.

Besides, due to requirements I need to differentiate the two cases (SW and SYS), so I connot check what I need only with the software OUT-LINKS (in other words, I have to enter systems, look at some things, say that I m in systems and check the IN-LINKS.

I have tried to do something like I would do in SW, but nothing.

In SW, i check the OUT-LINKS with:

for SW_object in SW_module do {
    
  for OUT_link in SW_object -> "*" do {
    
    /* TODO: make the comprobations */
    
  }

}

and this works, but for SYS:

for SYS_object in SYS_module do {
    
  for IN_link in SYS_object <- "*" do {
    
     /* TODO: make the comprobations */
    
  }

}

This code only works if the SW module linked is previously opened. But I can't open this module previously because I don't known which is this module.

Is there a better way or does anyone have any ideas how to do this?

Thanks )


Solution

  • You are looking for link references (type LinkRef). Check the DXL manual at https://www.ibm.com/support/knowledgecenter/SSYQBZ_9.6.1/com.ibm.doors.requirements.doc/topics/dxl_reference_manual.pdf, chapter "Links"->"Finding Links"->"for each incoming link". Syntax:

    for LinkRef in Object tgtObject<-(string linkModuleName) do {
     ...
    }
    

    Perhaps you should read the complete chapter "Finding Links" to be aware of more specific cases like links from baselines, information about echoed links etc.