Hi Everyone,
Busy with a macro in ARIS10 SR11. The macro start on the event Close model, it checks the AT_STATE_1 attribute, and if the value corresponds with "Complete" it kicks of the QA script. If errors are found, the model can't be closed. I want to change the AT_STATE_1 attribute of the model to "In process" using the macro after the test have completed, but Designer.setAttribute(......) gives me an error and Designer.setAttributePersisitent return the error with the following "???". How do I change the model attribute with the macro?
Any ideas....
Thanks,
Willem
Hi Willem,
some attributes do not contain a simple text value. The attribute AT_STATE_1 is an attribute of type "values". In the macro interface of the Designer, the setter method does not accept the (localized) string value, but only the predefined constant for the new value. You can lookup these values via
Administration/Configuration/Method/Attribute types/Status (the one with API name AT_STATE_2): diplay its properties (context menu "Edit") and choose tab "Values and symbols". In the last column you see all valid value type numbers:
AVT_IN_PROC
AVT_COMPLETE
AVT_RELEASED
AVT_LAST_CHG
AVT_REENG
If you use these constants, setting the attribute works as expected:
Designer.setAttributePersistent(selection[0], Constants.AT_STATE_1, Constants.AVT_RELEASED /*"Released"*/, null )
BR, Torsten