Is there a way to get the name of workflow associated with a type of workitem?
One answer
I use the resource shape for the work item type to reach the workflow but I suspect there might be a direct/cleaner way to do it...
To reach the resource shape : Root Services > Work Items Catalog > Services.xml > Creation Factory Node > Resource Shape
<oslc:ResourceShape rdf:about="https://localhost:403/ccm/oslc/context/_wfwAEu_QEeKkTY2J0oMbXw/shapes/workitems/defect">
Now from the response to the POST on Resource Shape, look for allowed values for some state:
<oslc:name rdf:datatype="http://www.w3.org/2001/XMLSchema#string">state</oslc:name>
<oslc:defaultValue/>
<oslc:allowedValues>
<oslc:AllowedValues rdf:about="https://localhost:403/ccm/oslc/context/_wfwAEu_QEeKkTY2J0oMbXw/shapes/workitems/defect/property/internalState/allowedValues">
<oslc:allowedValue rdf:resource="https://localhost:403/ccm/oslc/workflows/_wfwAEu_QEeKkTY2J0oMbXw/states/com.ibm.team.workitem.defectWorkflow/4"/>
If this answers, please mark this as answered.
To reach the resource shape : Root Services > Work Items Catalog > Services.xml > Creation Factory Node > Resource Shape
<oslc:ResourceShape rdf:about="https://localhost:403/ccm/oslc/context/_wfwAEu_QEeKkTY2J0oMbXw/shapes/workitems/defect">
Now from the response to the POST on Resource Shape, look for allowed values for some state:
<oslc:name rdf:datatype="http://www.w3.org/2001/XMLSchema#string">state</oslc:name>
<oslc:defaultValue/>
<oslc:allowedValues>
<oslc:AllowedValues rdf:about="https://localhost:403/ccm/oslc/context/_wfwAEu_QEeKkTY2J0oMbXw/shapes/workitems/defect/property/internalState/allowedValues">
<oslc:allowedValue rdf:resource="https://localhost:403/ccm/oslc/workflows/_wfwAEu_QEeKkTY2J0oMbXw/states/com.ibm.team.workitem.defectWorkflow/4"/>
If this answers, please mark this as answered.