0 votes
1.2k views
in Javascript API by

1 Answer

0 votes
by
edited by anonymous

There is a simple way to compare two business objects for equality, the string representation of xml of two complex variables or list of complex variables will exactly be same if their contents are same 

make a copy by value before editing

tw.local.savedcopy = tw.system.serializer.fromXml(tw.system.serializer.toXml(tw.local.originalvariable))

compare as

if (tw.system.serializer.toXml(tw.local.savedcopy).toString(true) == tw.system.serializer.toXml(tw.local.originalvariable).toString(true)){

;

}

Related questions

0 votes
0 answers 834 views
0 votes
0 answers 390 views
0 votes
0 answers 246 views
0 votes
1 answer 638 views
0 votes
0 answers 251 views
0 votes
1 answer 1.1k views
0 votes
0 answers 804 views
0 votes
1 answer 2.0k views
0 votes
0 answers 615 views
0 votes
1 answer 836 views

634 questions

495 answers

97 comments

2.7k users

Join BPM Community Discord Channel

Welcome to BPM Tips Q&A, Community wiki/forum where you can ask questions and receive answers from other IBM BPM experts and members of the community. Users with 2000 points will automatically be promoted to expert level.
Created by Dosvak LLC
Our Youtube Channel
...