Forum Discussion

Nathan_H_'s avatar
Nathan_H_
Ideator I
5 years ago
Solved

Workflow Process Get Change ItemType

Good day all.  I have a Method to dynamically assign a drafter to the activity.  Currently I have to specify the ItemType of the change I am using for this method to work, meaning I would have to rec...
  • AngelaIp's avatar
    AngelaIp
    5 years ago

    Happy to see that there are also other users that offer rework possibilities in their Change Management processes. 

    Regarding your questions: The easiest way to get the top ItemType would be to use the 'labs_GetControlledItemCSharp' Method. With this Method you don´t have to go through all the Workflow and Assignment relationships by yourself and it´s highly reusable:

    Item controlledItem = this.newItem(this.getAttribute("type"), "labs_GetControlledItemCSharp");
    controlledItem.setID(this.getID());
    controlledItem = controlledItem.apply();
    string cmType = controlledItem.getAttribute("type");

    Of course the Method is also a good reference when you want to do the query by yourself. You should find it somewhere in the Aras Labs github website.