IBM Support

How to change user type by DXL

Troubleshooting


Problem

How do you change the IBM Rational DOORS user type by DXL if the error "Access to this property is denied..." has been encountred?

Symptom

The following is failing example code to change user abc's user type to database manager, however it does not work properly. An error "Access to this property is denied..." occurs if the following is used:



    <DXL>

    User u = find("abc")

    setUser (u ,class , "databaseManager")

    saveUserRecord (u)

    </DXL>


The following will also fail using "set" instead of "setUser":


    <DXL>

    User u = find("abc")

    set (u ,"class" , "databaseManager")

    saveUserRecord (u)

    </DXL>

Resolving The Problem

Here is the correct sample code to change a user type by DXL:



    <DXL>

    User u
    UserClass uc
    string userName = "abc"
    string errMsg

    errMsg = loadDirectory
    u = find (userName)
    loadUserRecord (u)
    uc = u.class
    print stringOf uc "\n"

    uc = databaseManager
    print "trying to set to " stringOf uc "\n"
    u.class = uc
    saveUserRecord(u)
    errMsg = saveDirectory

    </DXL>

[{"Product":{"code":"SSKR2T","label":"IBM Engineering Requirements Management DOORS"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General Information","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"9.2.0.2;9.2.0.1;9.2","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
01 May 2020

UID

swg21423407