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());
}