It's all about the answers!

Ask a question

How to get the display names of custom workflow states

Andreas Hensel (514) | asked Jan 04 '21, 2:04 p.m.
edited Jan 05 '21, 5:17 a.m.

I want to generate a document using RPE that contains the states of RQM test cases.

Custom testcase workflows are used.
RQM's REST API returns values like "". 
Probably other values will be s2, s3 etc.
I need the corresponding display name like "Externally approved".
Are these values unique or do they reoccur in other custom workflows?
If yes, I could use a fix mapping between the internal values and displayed names.
Otherwise I would need to fetch the display names at runtime, but how?

Accepted answer

permanent link
Subramanya Prasad Pilar (4.6k14) | answered Jan 05 '21, 7:17 a.m.

 You need to do a GET request on feed/entry/content/testcase/state/resource which returns the state titles (ex. Externally approved) along with their identifiers (ex. You can store these titles and identifiers in a map (_stateMap) and then print the value corresponding to the feed/entry/content/testcase/state/_value (_stateMap[_value]).

Andreas Hensel selected this answer as the correct answer

Andreas Hensel commented Jan 05 '21, 1:26 p.m.

Thank you! 

Andreas Hensel commented Jan 07 '21, 3:34 a.m. | edited Jan 07 '21, 4:15 a.m.

<comment deleted>

Your answer

Register or to post your answer.