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

DXL DOORS Retrieve Redlines from Specific History Version

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

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

伪代码可能如下所示:

// 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"
            }
        }

    }

}

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

让我确保我理解你的问题 - 你想看看用户是否在特定版本的模块中添加或删除了链接 - 我假设 'specific history version' 你的意思是与基线相当的东西 and/or 模块的当前版本。

这可能吗 - 绝对可以。

我会怎么做:

// 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-links(in-link创建的历史记录将在各自的源模块中找到)

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

有帮助吗?