Module DXL DOORS从特定历史版本检索红线

Module DXL DOORS从特定历史版本检索红线,module,baseline,ibm-doors,Module,Baseline,Ibm Doors,我想知道是否可以使用DXL仅检索DOORS中特定历史版本中特定修改的红线 具体来说,我需要一个脚本来检索当前用户添加或删除的最新一组out链接 Psuedo代码可能如下所示: // Loop through all displayed objects in the current module for o in m do { // Loop through all baseline histories (no need to display baseline) for curr

我想知道是否可以使用DXL仅检索DOORS中特定历史版本中特定修改的红线

具体来说,我需要一个脚本来检索当前用户添加或删除的最新一组out链接

Psuedo代码可能如下所示:

// Loop through all displayed objects in the current module
for o in m do {

    // Loop through all baseline histories (no need to display baseline)
    for currHistory in o do {

        // If out-links were added/removed in this history version
        // break the loop because we only want the most recent version
        if ( Out-Links Were Added/Removed )  break loop

    }

    // Loop through all modifications in the current history verision
    for modification in currHistory do {

        // True if this modification was made by the current user
        if (modification.Author == Current User) {

            // True if Out-Link was added
            if (modification == Added Out-Link) {
                print "Link Added: "  The_Link "\n"
            }

            // True if Out-Link was removed
            elseif (modification == Removed Out-Link) {
                print "Link Removed: "  The_Link "\n"
            }
        }

    }

}

这样的事情可能吗?如果是这样,我该怎么做?

让我确保我理解您的问题-您想知道用户是否在特定版本的模块中添加或删除了链接-我假设“特定历史版本”是指与基线和/或当前版本的模块相类似的内容

这是可能的——绝对可能

我会怎么做:

// Loop Through Objects
Object o
Module m = current
User u = find()
string uName = u.name
for o in m do {
    // Loop through history records
    History hr
    for hr in o do {
        HistoryType ht = hr.type
        // Check if link creation / deletion and history record author matches current user
        if ( ( ( ht == createLink ) || ( ht == deleteLink ) ) && ( uName == hr.author ) ) {
            print goodStringOf ( ht ) ":\n"
            print "Source Object: " hr.sourceAbsNo "\n"
        }
    }
}
注意!这将只处理out链接(在相应的源模块中可以找到in-link创建的历史记录)

如果需要,还可以获取其他历史记录(hr)属性,如日期


这有帮助吗?

你太棒了。我删除了以前的评论,因为我找到了“hr.targetAbsNo”属性。这真是太棒了,接近我想要做的。只需要找出如何通过基线循环,并找到最新的基线,在那里我们的链接被修改,我应该有我需要的一切。谢谢