Suspect Links

I need to develop a dxl script that will clear suspect links. I am unfamiliar with the inner workings of suspect links. I can run several suspect link scripts from a module in DOORS found on the tool bar "Analysis->Suspect Link->", but I do not know how the script works. When I look at the source code, found in "$DOORSHOME\lib\dxl\standard\suspect\...)", it is either encrypted or compiled. How do these scripts identify whether a link is suspect? I am assuming that it checks the date the link was created and compare that with the "Last Modified" attribute, but am unsure. I would appreciate all the details that you could give me concerning how the suspect link scripts work.

Thanks in advance,

Jeff
SystemAdmin - Wed Aug 12 10:48:43 EDT 2009

Re: Suspect Links
llandale - Wed Aug 12 13:46:38 EDT 2009

I figured this out exactly once (but don't recall exactly the details); there is no magic and there are no basic 'DXL' command dealing with Suspect Links.

After clearing suspect links in a source and also in the target formal modules, I see that the Link module now contains two additional attributes, "Suspicion Cleared Backwards" and "Suspicion Cleared Forwards". No doubt the Suspect Links code compares the dates of these link attributes with the Last Modified Dates of the corresponding objects associated with the link: a link is 'Suspect' when the Object was modified more recently than the corresponding link attribute.

If I were doing this, I'd clear Suspect links by modifying the values of these attributes, where no doubt 'Forwards' means clearing suspition for outgoing links and 'Backwards' means clearing for incoming links.

Here's a snippette that might work:

void   ClearOutgoingSuspicions(Object obj)
{
    Link lnk
    for lnk in obj ->"*" do
    {  string Previous = lnk."Suspicion Cleared Forwards" ""
       print "Previous Suspicion date = " Previous "\n"
       lnk."Suspicion Cleared Forwards" = today()
    }
}

 


No doubt you can cause suspicion by clearing the correct Link Attribute, or setting it to some old date like "1 Jan 1970". You can of course also cause suspicion by, no surprise, modifying a source/target object-attr value and thus changing the Last Modified Date of the object.

Give it a whirl and post your results.

 

 

 

  • Louie

 

 

Re: Suspect Links
SystemAdmin - Mon Aug 17 15:50:17 EDT 2009

llandale - Wed Aug 12 13:46:38 EDT 2009

I figured this out exactly once (but don't recall exactly the details); there is no magic and there are no basic 'DXL' command dealing with Suspect Links.

After clearing suspect links in a source and also in the target formal modules, I see that the Link module now contains two additional attributes, "Suspicion Cleared Backwards" and "Suspicion Cleared Forwards". No doubt the Suspect Links code compares the dates of these link attributes with the Last Modified Dates of the corresponding objects associated with the link: a link is 'Suspect' when the Object was modified more recently than the corresponding link attribute.

If I were doing this, I'd clear Suspect links by modifying the values of these attributes, where no doubt 'Forwards' means clearing suspition for outgoing links and 'Backwards' means clearing for incoming links.

Here's a snippette that might work:

void   ClearOutgoingSuspicions(Object obj)
{
    Link lnk
    for lnk in obj ->"*" do
    {  string Previous = lnk."Suspicion Cleared Forwards" ""
       print "Previous Suspicion date = " Previous "\n"
       lnk."Suspicion Cleared Forwards" = today()
    }
}

 


No doubt you can cause suspicion by clearing the correct Link Attribute, or setting it to some old date like "1 Jan 1970". You can of course also cause suspicion by, no surprise, modifying a source/target object-attr value and thus changing the Last Modified Date of the object.

Give it a whirl and post your results.

 

 

 

  • Louie

 

 

You were correct with your post. After you clear out-links that are suspect, an attribute called "Suspicion Cleared Backwards" is created in that Link module. After you clear in-links that are suspect, an attribute called "Suspicion Cleared Forward" is created in that Link module. When you clear the suspicion, it will put the date and time inside the appropriate attribute. To populate the attribute I used

lnk."Suspicion Cleared Backward" = dateAndTime( today() )

so that the current time is also placed in the attribute.

This also leads me to my next question. When you right click on an object and click "Clear Suspicion..." a GUI appears that allows the user to determine which suspect link to clear. When you click on the "Details.." button for a suspect link, another GUI will appear that will allow the user to see each modification made to the attribute(s) of that object. You can view the changes as a "redlining". My question is: Where does the module store the original and intermediate changes of the attribute to allow the user to see the redlining changes?

Re: Suspect Links
llandale - Mon Aug 17 18:08:25 EDT 2009

SystemAdmin - Mon Aug 17 15:50:17 EDT 2009
You were correct with your post. After you clear out-links that are suspect, an attribute called "Suspicion Cleared Backwards" is created in that Link module. After you clear in-links that are suspect, an attribute called "Suspicion Cleared Forward" is created in that Link module. When you clear the suspicion, it will put the date and time inside the appropriate attribute. To populate the attribute I used

lnk."Suspicion Cleared Backward" = dateAndTime( today() )

so that the current time is also placed in the attribute.

This also leads me to my next question. When you right click on an object and click "Clear Suspicion..." a GUI appears that allows the user to determine which suspect link to clear. When you click on the "Details.." button for a suspect link, another GUI will appear that will allow the user to see each modification made to the attribute(s) of that object. You can view the changes as a "redlining". My question is: Where does the module store the original and intermediate changes of the attribute to allow the user to see the redlining changes?

Don't know. Its very unlikely they store that anywhere.

My guess is that it searches through History finding the one after the previous Cleared Suspicion date, and use the hst.oldRawValue to determine what it must have looked like on that date. You could probably verify that by modifying an obj-attr value of an attribute that doesn't Generate History but does indeed Affect Change Dates. My guess is that the link will be suspicious but you won't get any red-lining.

  • Louie