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

Unable to update the Resource title in Design management

Hi,

I am able to update the Description but unable to update the title and label of a Resource in Design management. Please find the code snippet attached.



        DmClient dmClient=null;
       
        try {
            dmClient= new DmClient(user, password, url);
        } catch (DmClientException e) {
            e.printStackTrace();
        }
       
        DmProject dmProject= dmClient.getProject("ae.playground (DM external)");
       
        DmConfiguration dmConfiguration= dmClient.getDefaultConfiguration(dmProject);
       
        try{
            DmResource dmResource= dmClient.getResource("https://rb-alm-11-p.de.bosch.com/dm/models/504", dmConfiguration);
           
            if( dmResource != null )
            {
                dmResource.setDescription("Description is updated.");
                dmResource.setLabel("Label is updated.");
                dmResource.setTitle("Title is updated.");
               
                DmEditingSession editingSession = dmClient.createEditingSession(dmConfiguration);
               
                dmClient.putResource(dmResource, editingSession);
               
                dmClient.commitEditingSession(editingSession);
                       
            } else {
                System.out.println( "Resource not found");
            }
        } catch( DmClientException ce ) {
            System.out.println( "DM Client Exception: " + ce.getMessage());
        } catch (DmResourceException e) {
            System.out.println( "DM Resource Exception: " + e.getMessage());
        }

0 votes


Be the first one to answer this question!

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
× 1,221

Question asked: Mar 21 '17, 7:47 a.m.

Question was seen: 1,060 times

Last updated: Mar 21 '17, 7:47 a.m.

Confirmation Cancel Confirm