Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic SYNERGY (steve huntington)
Decrease font size
Increase font size
Topic Title: ->getXMLData() does not show modified attribute value?
Topic Summary: ->getXMLData() does not show modified attribute value?
Created On: 16-Nov-2006 11:36
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 16-Nov-2006 11:36
User is offline View Users Profile Print this message


Coman Wakefield

Posts: 18
Joined: 1-Jun-2005

I'm new to the perl api and am attempting to make use of CR modification functions. 

I am wondering why, when I change the value of a Change Request attribute, the getXMLData() method for the ObjectVector contaning the CR attributes does not return XML which contains the modified field value?

I thought the ->getXMLData() method when called would return the XML used to create an instance of the object. So I thought If I changed the object (using ->SetValue) and then called ->getXMLData() I would see modified XML. This is not the case.

However, if I call ->toSubmitXML I get XML which shows the field has been changed.

I don't want to call SubmitCR to write the changes to the synergy server at this point - I simply want to modify the field and then get the latest XML back because I am passing the XML to another script so I can later re-instantiate the object using New ObjectVector(XMLData).

Sample code:

my $objectVector = new ChangeSynergy::apiObjectVector($xmlData);

my $objectName = 'problem_description';
my $objectValue = 'a_new_value';

$objectVector->getDataObjectByName($objectName)->setValue($objectValue);

# this should return the object vector XML with the description field changed?
print $objectVector->getXmlData();

# This does returns XML to indicate that it knows the description has changed?
print $objectVector->toSubmitXml();

Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic SYNERGY forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 15:34.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.