Drag a node from Palette and its value applied on leaf node of tree layout of diagram

i have expression title and executed value in my response of web service as shown in below image.

i have nodes in Palette layout where text of node is “expression title” and against every expression it has some “executed value” …now i want this that when i drag a node from palette onto my leaf node of tree layout diagram ,the node should not appear there, only the executed value of dragged node will apply on the leaf node and perform some kind of manipulation and the result will show in that leaf node and that result will affect its parent node and then his parent and so on… until it will reache the root node.

how can i achieve this functionality ? help me plz i have short running of time!!

Implement a https://gojs.net/latest/api/symbols/GraphObject.html#mouseDrop event handler on the template(s) of your leaf nodes.
The second argument will be the node upon which the drop occurred. e.diagram.selection will be the collection of dropped Parts.

Make whatever changes you want to the Node.data by calling Model.set. Then remove the newly dropped node(s): e.diagram.removeParts(e.diagram.selection).

Thank you walter!