make cumulate addition with hierarchic structure

hello, 

I've an hierarchic structure in a file. For exemple (File 1) :
ID Father    ID child
00001        00002
00001        00003
00003        00005
00003        00006
00006        00007
00001        00009
In reality, i have more or less, 8 level Father/children

I've to make cumulate addition by use ID Father/Id child.

For exemple (File 2) with that file :  
ID           Value
00003    5
00005    2

At the end, i expect that king of result
ID        Cumulate addition
00001     7                  (=0+0+5+0+2+0 for 00001, 00002, 00003, 00005, 00006, 00007, 00009)
00002     0                  (=0 for 00002)
00003     7                  (=5+2+0+0 for  00003, 00005, 00006, 00007)
00006     0                  (=0+0 for 00006, 00007)
00007     0                  (=0 for 00007)
00009     0                  (=0 for 00009)
00005     2                  (=2 for 00005)

I don't know, if i have to use recursive "Group by" to make children list and after progam cumul ?
What do you think about the way to do that ?

Hello,

here is a solution to your request which uses KNIME's Network nodes. Have a look at it and let me know if it works as expected on your extended data set.

Cheers,
Marco.

Thank a lot Marco !

I'll try to insert you proposition into my workflow and better, try to understand all the nodes. Because, i'm a beginer in knime and a lot of node into you proposition are new for me :)

I'll come back with the answer !

Alex