0 votes
438 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 259 views
+1 vote
1 answer 229 views
0 votes
2 answers 590 views
0 votes
1 answer 124 views
0 votes
1 answer 65 views
+1 vote
1 answer 135 views
0 votes
1 answer 386 views
+1 vote
1 answer 320 views
0 votes
1 answer 171 views
0 votes
1 answer 424 views
0 votes
1 answer 25 views
+1 vote
1 answer 909 views
...