Created By Dosvak LLC (WWW.DOSVAK.COM)

0 votes
384 views
in Interview Questions by

1 Answer

+3 votes
by
selected by anonymous
 
Best answer

Deep Copy is a built in operation on which Lombardi Teamworks/IBM BPM relies heavily in an automated manner, whenever a pass by value takes place a deep copy operation is done by the process server. it basically serializes the object and then deserializes to get a non referenced exact copy of the object. Deep copy is a resource intensive process that is why it is recommended to skinny down your complex large BOs especially when pass by value happens, or to nullify the not needed BOs.

The syntax in JSApis as follows

tw.local.newVariable = tw.system.serializer.fromXml ( tw.system.serializer.toXml ( tw.local.somevariable ) );

after this operation the newVariable will hold an exact copy of somevariable but ther will be no linkage by reference and the two objects will be disassociated

by (100 points)
Hi ,

we can directly copy one BO to other BO (of same type) also , what is the difference apart from u mentioned above like resource intensive process.
by (700 points)
I do agree that we can copy one BO to other BO, but it will copy the reference. A deep copy is required when you do not want the original variable with the complex business object not to be tweaked.

Related questions

0 votes
1 answer 250 views
+1 vote
1 answer 213 views
0 votes
2 answers 503 views
0 votes
1 answer 112 views
0 votes
1 answer 56 views
+1 vote
1 answer 130 views
0 votes
1 answer 357 views
...