i have the following issue and would like to ask for your help.
First of all, i am new to dxl and have never done that before.
I have 3 modules which are linked with each other.
Module 1 -> Module 2 -> Module 3
now we want to delete module 2 and do the direct link from module 1 to module 3.
How should i do this in dxl? We don't want to do it manually so i am trying to find out a way with dxl.
My idea is i will check for every objects in module 2 if each object in module 2 includes link 1 and 3 then connect 3 and 1 with eachother. But i don't know how the code look like. I have been searching it but there weren't so many infos about syntax and stuff :(
You can do it without DXL.
In Module 1 in exclusive edit mode, start the -> Analysis -> Wizard with the parameters:
Link direction: Out links
Link types: DOORS links
Select formal module: All modules
Select link module: All modules
attributes to display: Only Object Number
Width: any value is ok
Options: only one attribute per line
Recursive analysis: on
Multiple columns: on
depth of analysis: 2
Finish
You should now see two now columns. The column "Out-links at depth 2" shows the destination object that will be the link target of the new link to be created.
Start -> Tools -> Support Tools -> Convert Layout DXL to Attribute DXL, choose "Out-links at depth 2" -> Convert
Start -> Link -> Advanced -> Link by Attribute with the parameters:
Target Module: Module 3
Link Module: choose the Link module that you need
Existing attributes: choose "DXL for Out-links at depth 2"
Link direction: Source to target
Objects to be linked in target module: All Objects
OK
Now all links from Module 1 to Module 3 should be created. Check all created links thoroughly. Then delete Module 2
Good luck
Related
Can you select multiple link modules when running Analysis Wizard? I want to select three link modules from a list of about thirty link modules. I can run Analysis wizard 3x but it would be a better report if I could get all of this link information at once.
If you look at the code generated from the analysis wizard concerning a specific link module, you see the following code
Item linkModItem = itemFromID("52f965671e816bef-00055da2")
[…]
string linkModName = fullName(linkModItem)
for l in all(o->linkModName) do { […] }
You can easily expand this code with a for loop over all relevant link module items
my question is quite the same as this one :
How to Iterate over target objects of outgoing links in DXL, in Modules not previously loaded
but regarding incoming links.
I would like to use the source objects of incoming links but there are located in module that are not previsously loaded.
I don't want to open and close module each time because it would cost too much time. I would like to open them once and close them at the end.
Two solution for this :
be able to know if the module is already open or not so that I don't open it again (is there a "is_open" function in DXL + store the list of open module in a table and close them all at the end.
or better :
before start of loop, use a loop using the link module and the target module to find all module in the database that could be linked to the target module. And I load them all (even if there is no links between them. But my script would be simpler this way). How can I do this ? I tried something like :
ModName_ src_mod_linkset
for src_mod_linkset in "target_module"<-"linkmodulename" do
{
print "test"
}
but in this kind of loop, it doesn't work because "target_module" should be an object and not the complete module.
https://www.ibm.com/mysupport/s/forumshome has a lot of information on this. A query "Engineering Requirements Management DOORS" incoming links brings you some example scripts. I prefer this approach (load the ModuleVersion if its data is null): https://www.ibm.com/mysupport/s/forumsquestion?language=de&id=0D50z00006HIDztCAH
About "is_open": there is a loop for module in database, which gives you a list of all open modules. You might want to store all open modules at the star of your script in a Skip list and when iterating over the incoming modules check to see whether you have to close the module at the end of your script.
I would not use your second approach if you plan to run your script on baselines, it might happen that the link set in the link module has been deleted in the meantime, so you will not get all possible in links. Anyway, the link modules could be anywhere in your database, not necessarily near your incoming module.
Apparently, links are not supposed to connect objects of modules which reside in different projects. I failed trying to create some, both manually as well as DXL-based.
My script
Module modA = edit("/foo/foo", true, false)
Module modB = read("/bar/bar", false)
Object objA = object(1472, modA)
Object objB = object(781, modB)
objA -> objB
The script prints the error:
-R-E- DXL: <Line:78> A linkset pairing restriction prevents the creation of links
from /foo/foo to /bar/bar.
No link will be created.
-I- DXL: execution halted
Is there any trick to bypass that and create a link using magic or hidden features?
That is not a restriction for linking across Projects. This error is telling your two things:
There is no Linkset defined between the two documents specified.
The setting for Mandatory linksets is turned on in the document you are linking from.
I HIGHLY recommend leaving the Mandatory linksets turned on for all modules. Linksets give you the ability to organize the type of links that you are creating. If you turn this off, users can create linksets from anything to anything with any linkset they define on the fly. I have seen this cause big problems at different companies because you can't easily identify what links you want to analyze for traceability.
We have instead created a handful of link modules that we use for all links in our database. For Example:
Traceability Links
Reference Links
Glossary Links
etc...
This way, in any document we can reuse the same views and filters to view traceability across the Project or Projects. We then set up the linksets to use these link modules only.
Long story short, you need to create a linkset between Module A and Module B in Module A properties.
When I open up a build definition I can see the arguments are split into sections with a number prefix e.g. 1. Basic, 2. Misc etc.
However, when I edit the xaml there is no indication as to where these categories are defined.
Can someone provide some guidance as to where they are located within the arguments list?
Here is a similar question except the poster has inquired about a different parameter based off the build settings which I believe is a different case than regular parameters.
Missing ProcessParameterMetadata in TFS DefaultTemplate.xaml: where is for e.g. Items to Build in the Required category
You can open the build template and edit the Metadata argument as shown in the picture below:
Then you can edit the category:
In the XML there is no category as standalone. You can define the category in the Process.Metadata section:
<this:Process.Metadata>
<mtbw:ProcessParameterMetadataCollection>
<mtbw:ProcessParameterMetadata Category="#300 Advanced" Description="Enable MSBuid Multi-proc to build your solutions' projects in parallel, when possible, using all available processors on the build server." DisplayName="MSBuild Multi-Proc" ParameterName="MSBuildMultiProc" />
....
</mtbw:ProcessParameterMetadataCollection>
</this:Process.Metadata>
This is to add new categorys but i dont know where the standard categories are.
Hope that helped you.
Chears
I've got a class library project set up to do template editing and wanted to drop in another copy and customize it. However I get
The type 'TfsBuild.Process' already contains a definition for '_contentLoaded'
and 22 more of the same with the other _ names.
Also Type 'TfsBuild.Process' already defines a member called 'Process' with the same parameter types C:\Projects\MSBuild.Tasks\TechnicalDebtTaskLib\BuildProcessTemplate\obj\Release\CodeMetric.g.cs 62 16 BuildProcessTemplate
i've tried hand editing different parts of the xaml to try to find what key might need to be more unique, but no luck.
How do I work on multiple build process templates in the same solution or copy a process template that makes it unique?
Summary:
<activity mc:ignorable="sap" x:class="Tfs2008Template.Process" ... xmlns:this="clr-namespace:Tfs2008Template">
two tags must be changed for example:
<activity mc:ignorable="sap" x:class="Tfs2008Template2.Process" ... xmlns:this="clr-namespace:Tfs2008Template2">
For whatever reasoning the two tags that are related and need to be in sync are usually at the beginning and end of a very long list of attributes.
Full Article on my blog