Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Change the status of a workitem approval using the Rational Team Concer REST services

 Hi All:

Is it possible to change the status of a workitem approval using the  Rational Team Concert REST services? If it's possible, Anyone could help me with command syntax required to query and modify the states of approvals of a workitem in specific?


Thanks in Advance

0 votes



One answer

Permanent link
sure look the source below:


private void atualizarIncidenteVoltarInvestigacao(MSG008TO msg008to,String incidenteRecuperadoXML, String idNovoIncidente) {
    try{
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document doc=builder.parse(new InputSource(new StringReader(incidenteRecuperadoXML)));
Node elementIsUsd = doc.getElementsByTagName("dcterms:description").item(0);
elementIsUsd.setTextContent(""+elementIsUsd.getTextContent()+""+msg008to.getDescription());
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer transformer = transformerFactory.newTransformer();
   transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
DOMSource source = new DOMSource(doc);
StringWriter stringWriter = new StringWriter();
StreamResult result = new StreamResult(stringWriter);
transformer.transform(source, result);
String xml = stringWriter.toString();
String putQuery = "https://"+host+"/ccm/oslc/workitems/"+idNovoIncidente+".xml?_action=FluxoIncidentes.action.a9";        
HttpResponse responsePut = BNBRestUtil.getPutResponseRdfXmlOslc(putQuery, cookieStore, xml);
int statusCode = responsePut.getStatusLine().getStatusCode();
if (statusCode != 200) {
throw new RuntimeException("Falha ao realizar chamada de atualizacao do wi incidente.");
}
}catch(Exception e){
throw new RuntimeException(e.getMessage(),e);
}
}

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 240
× 137
× 16

Question asked: Nov 25 '13, 7:56 p.m.

Question was seen: 5,562 times

Last updated: Jan 23 '14, 1:45 p.m.

Confirmation Cancel Confirm