门 - 可追溯性列

  • 本文关键字:可追溯 ibm-doors
  • 更新时间 :
  • 英文 :


我需要在DOORS中添加一个可追溯性列,可以显示来自三个不同对象的结果。

我的模块有两列用作参考列:BPMN 对象类型和 BPMN 对象文本。 三种 BPMN 对象类型是数据对象、活动和事件。
有三个模块已经设置好,分别包含每个模块的详细信息。 BPMN 对象文本既存在于源模块中,也存在于目标模块中,我需要引入源模块的列,即元素描述,存在于目标模块中。 我可以创建 DXL 可追溯性列来拉入每个列,但它们被拉入三个单独的列中。

以下是我的一位前任创建的工作示例中的 DXL(注意:这是由 DOORS 中的可追溯性向导自动生成的(:

// DXL generated by DOORS traceability wizard on 14 July 2015.
// Wizard version 2.0, DOORS version 9.5.2.1
pragma runLim, 0
void showOut(Object o, int depth) {
Link l
LinkRef lr
ModName_ otherMod = null
Module linkMod = null
ModuleVersion otherVersion = null
Object othero
string disp = null
string s = null
string plain, plainDisp
int plainTextLen
int count
bool doneOne = false
//Auto Translated:     Item linkModItem = itemFromID("446ca74a57b60977-00031da0")
//Auto Translated:     Item linkModItem = itemFromID("446ca74a57b60977-00031f80")
Item linkModItem = itemFromID("446ca74a57b60977-00032080")
if (null linkModItem) {
displayRich("\pard " "<<Link module not found>>")
} else if (type(linkModItem) != "Link") {
displayRich("\pard " "<<Invalid link module index for this database>>")
} else {
string linkModName = fullName(linkModItem)
for l in all(o->linkModName) do {
otherVersion = targetVersion l
otherMod = module(otherVersion)
if (null otherMod || isDeleted otherMod) continue
othero = target l
if (null othero) {
load(otherVersion,false)
}
othero = target l
if (null othero) continue
if (isDeleted othero) continue
doneOne = true
if (depth == 1) {
disp = ""
s = name(otherMod)
if (isBaseline(otherVersion)) {
s = s " [" versionString(otherVersion) "]"
}
s = probeRichAttr_(othero,"Element Description", true)
disp = disp  s
displayRich("\pard " disp)
}
}
}
}
showOut(obj,1)

我需要可追溯性列的内容来显示基于 BPMN 对象类型的 BPMN 对象文本的元素描述。

假设指向不同linkModItem的三行意味着链接到三种不同的模块类型。在这种情况下,您需要在所有linkModItem上创建一个循环,并为每个链接模块执行Item linkModItem =...行和以下行。

这样的事情应该有效:

string linkModuleIDs[] = {"446ca74a57b60977-00031da0", "446ca74a57b60977-00031f80", "446ca74a57b60977-00032080"}
int i
for (i=0 ; i < sizeof linkModuleIDs ; i++) {
Item linkModItem = itemFromID(linkModuleIDs[i])
if (null linkModItem) .... the rest like above
}
// DXL generated by DOORS traceability wizard on 16 September 2019.
// Wizard version 2.0, DOORS version 9.6.1.11
pragma runLim, 0
string limitModules[] = {"446ca74a57b60977-0002ac00", "446ca74a57b60977-000320a0", "446ca74a57b60977-0002ac02"}
void showOut(Object o, int depth) {
int i
Link l
LinkRef lr
ModName_ otherMod = null
Module linkMod = null
ModuleVersion otherVersion = null
Object othero
string disp = null
string s = null
string plain, plainDisp
int plainTextLen
int count
bool doneOne = false
Item linkModItem = itemFromID("446ca74a57b60977-00020b09")
for (i=0 ; i < sizeof limitModules ; i++) {
if (null linkModItem) {
displayRich("\pard " "<<Link module not found>>")
} else if (type(linkModItem) != "Link") {
displayRich("\pard " "<<Invalid link module index for this database>>")
} else {
string linkModName = fullName(linkModItem)
for l in all(o->linkModName) do {
otherVersion = targetVersion l
otherMod = module(otherVersion)
if (null otherMod || isDeleted otherMod) continue
if (!equal(getItem otherMod, (itemFromID limitModules[i]))) continue
othero = target l
if (null othero) {
load(otherVersion,false)
}
othero = target l
if (null othero) continue
if (isDeleted othero) continue
doneOne = true
if (depth == 1) {
s = probeRichAttr_(othero,"Element Description", true)
if (s == "") 
displayRich("\pard " " ")
else
displayRich("\pard " s)
}
}
}
}
}
showOut(obj,1)

最新更新