cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding the functionality of WDCopyService.copySubtree

Former Member
0 Kudos

Dear All,

I have context structure of model node as depicted below with the cardinality:

Response_Find (0..1)

--FindXYZResponse (0..1)

-


Response_Find_RF (1..1)

-


XYZPersonnel_FindRF (0..1)

-


XYZAddress_FindRF (0..1)

-


XYZ_ABC_Find (0..1)

-


XYZ_ABC_child (0..n)

-


XYZ_ABC_child_1 (0..1) -


> NOT COPIED

-


XYZ_ABC_child_child_1 (0..n) -


> NOT COPIED

-


XYZ_ABC_child_2 (0..1) -


> NOT COPIED

-


XYZ_DEF_Find (0..1)

-


XYZ_DEF_child (0..n)

-


XYZ_DEF_child_1 (0..1) -


> NOT COPIED

-


XYZ_DEF_child_child_1 (0..n) -


> NOT COPIED

-


XYZ_DEF_child_2 (0..1) -


> NOT COPIED

-


XYZ_FGH_Find (0..1)

I have similar value node structure with same cardinality. Even the all the attributes of each model node are present in the value node. But its not copying the values for the nodes as shown. Rest of the nodes are getting copied.

Is it the limitation with WDCopyService.copySubtree

Any help??

thanks & regards,

Manoj

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Have you tried the following method

  • <code>target</code>. This is done by applying
  • {@link #copyElements(IWDNode, IWDNode, boolean)} to the nodes and then
  • searching for equally named subnodes and recursively applying
  • <code>copySubtree</code> to them.
  • @param source The source node
  • @param target The target node
  • @param full See
  • <code>{@link #copyElements(IWDNode, IWDNode, boolean)}</code>
  • @throws WDRuntimeException if {@link #copyElements(IWDNode, IWDNode)} fails
  • for a node in the subtree.
Copies all elements from to complete subtree of <code>source</code> to */ public static void copySubtree(IWDNode source, IWDNode target, boolean full)

Regards

Ayyapparaj

Former Member
0 Kudos

Hi Ayapparaj,

Thanks for your reply.

But sorry to say i am not clear with you what you have replied.

Where is the copyElements(IWDNode, IWDNode, boolean) method available?

For my scenario every node is getting copied except those node as mentioned as NOT COPIED. But the WDCopyService.copySubtree(IWDNode, IWDNode) is supposed to copy the entire node structure. Then why its not copying these nodes.

I want to know is it the limitation with this method. I am working on NW04s, SP 13.

Please explain your solution once again.

thanks & regards,

Manoj

Former Member
0 Kudos

Hi,

Use copyelements for u r scenario..and also watch the follwing thread for reference...

GS

Former Member
0 Kudos

Hi,

The copyElements is also not working for me.

thanks & regards,

Manoj

Former Member
0 Kudos

Hi Manoj,

While using the copyelements, Have u copied the root node.?

GS

Former Member
0 Kudos

Hi,

Yes offcourse.

thanks & regards,

Manoj

Answers (0)