Search code examples
baselineibm-doors

Is it possible to create a baseline for each module in a Folder using a dxl script (DOORS)?


I need to create a "First Release" baseline for each module in a Folder, but I dont know if it is possible. Is, at least, possible to create a baseline for a one module each time?

Thank you in advance


Solution

  • yes, it is quite straight forward. I assume that you basically know how to write DXL scripts, so here are just the main parts. Details and examples can always be found in the DXL manual or in the developerWorks forum for DXL (http://www.ibm.com/developerworks/community/forums/html/forum?id=11111111-0000-0000-0000-000000001527)

    Your program will mainly consist of a loop that traverses all modules in a folder. Your starting point will be

    Folder fStart = folder "/project/myfolder/mysubfolder"
    

    You did not write whether your modules are in one folder only or whether you have to recursively traverse the folder. Assuming no recursion. So, now your code will loop through the folder. This is done via

    Itam iCurrent
    for iCurrent in fStart do {
        if (type iCurrent == "Formal") {
            myCreateBaselineForModule(module iCurrent)
        }
    }
    

    Finally you will need to create a baseline. Assuming you want to create a major version without suffix you are sure that no module is currently open or has unsaved changes and you have enough access rights, the code would simply be

    void myCreateBaselineForModule (Module mod) {
        create (mod, nextMajor(), "")
    }