![]() |
Telelogic DOORS (steve huntington) | ![]() |
Topic Title: Linking problem - certain links get skipped despite the existent of the target object Topic Summary: Created On: 19-May-2008 15:33 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hi All,
As the subject suggests, this post is with regard to a "linking" problem I am currently experiencing. Every night, I run a DXL script as a scheduled task. The goal of the script is to establish links based on the value of a "linking attribute". Ordinarily, if the script cannot find a "target link ID", I would expect it to fail. Interestingly enough, the script skips some links and does NOT fail. I have included a mechanism that captures the run date/time of the last successful execution of the script. Objects corresponding to the value of the "linking attribute" exist in the target modules for linking. Yet, some links do not get established. Is there a DXL scripting mechanism by which I can capture the list of links that were NOT established? Any input would be appreciated. Thank you in advance. Regards, Pranav |
|
![]() |
|
![]() |
|
Possible cause of the problem is:
Target modules have default view that has filtered objects. |
|
![]() |
|
![]() |
|
You need to get a complete list of undeleted target objects along with their ObjIDs, and store them in a Skip list. Search this Skip list when creating the links. Don't use the search function Object = object(TargetID) command, since it only finds currently displayed objects. Your target loop needs to be of the form "for oTarget in entire mTarget do", then ignore the object if its deleted. Don't use the "for oTarget in mTarget do" loop since likewise, it only finds currently displayed objects.
- Louie |
|
![]() |
|
![]() |
|
Hi Louie and Ron,
Thank you for for your prompt and helpful responses. I have modified my linking scripts to check the "entire" module as opposed to only the selected objects in the default view. I am a little unsure of why I need to store undeleted target objects in a skip list though. Any input with regard to this would be much appreciated. Thank you. Regards, Pranav |
|
![]() |
|
![]() |
|
Louie suggestion of storing in skip list is one of many possible solutions to the problem -- your approach works as well.
|
|
![]() |
|
![]() |
|
If you initially store target objects in a Skip list, then finding a particular target in the Skip is dramatically faster than searching the the target module for the object with the correct ID each time. That is you search the 'entire' target module once and store the ID, then simply issue a'find(skip, TargetID, oTarget)' commands when you want to link to a particular TargetID.
- Louie |
|
![]() |
|
![]() |
|
So far, the "entire module" "for" loop seems to have addressed the issue. I will try and implement the skip list method if this continues to be an issue. As always, thank you for your helpful input.
Regards, Pranav |
|
![]() |
|
![]() |
|
Pranav,
I was wondering if you would be willing to share this script? |
|
![]() |
|
![]() |
|
Clyde,
Sure. I can share the script with you. Please send me an e-mail address that I can send it to. Thank you. Regards, Pranav |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.