Nodes get created twice

Jan 16, 2010 at 7:43 PM
Edited Jan 16, 2010 at 7:58 PM

Hello,

I have read the tutorial and follwed it while creating my own test program. I would like to explain what I did:

  • In start.html I pass the id of one node ("Company|XYZ")
  • In CreateDataFile I habe a conditional split
    • If the node is a company node I create it (XYZ) and load its children (A1, A2, A3, etc.). I also create the links between the company and the person nodes. The result is a company node in the center (XYZ) surrounded by person nodes (P1-P6). This is what I expect.
    • If the node is a person node I create company nodes and set up the links between them. During debugging I see, that for every person node I just created, the CreateDataFile-Method gets called ("Person|P1", "Person|P2", ...). So for every Person the reverse link gets created. The result is still the same. 
  • When I hit + to load the next links, I experience the following:
    •  P9 works also in another company. So the company node UVW gets created. Now, for P4 the company XYZ gets created a second time, and for this second instance all person nodes are also linked.
    • I cannot attach a screenshot but it looks somewhat like this. All Pn-Nodes are linked to both XYZ-Nodes.
                    P6 P5              
      XYZ ----  P1 P3----XYZ
                   P2 P4              
                        |
                     UVW

Can you help me find the error in my logic? I have spent some time now, but cannot find the solution.

Kind Regards
Benno

Coordinator
Jan 17, 2010 at 1:57 PM

Hello,

First thing of all, ICE cannot create the same node or link twice.

So the doubled XYZ node in your example are two different nodes (with a distinct ID) but with the same information to draw (in this case the XYZ title). 

You should see this difference between the two XYZ node in the xml for P4 and the xml for XYZ.

 

The same way, if you use 2 different ID for the same link you might not be able to see it because of the superposition, but you will have two link instead of one, so be careful.

 

I hope this answer will help you.

Best regards.

Clement.

Jan 18, 2010 at 7:34 AM

Hello Clement,

that makes sense and I'm sure the fault is on my side. But I'm not able to find the error. I have set the title of the node to the node id. That way I can see the node id in the silverlight app. What can I say: they are the same. I also write them to the debug output ans compared them - also the same.

I'm clueless. Since my data resides in a webservice I cannot easily prepare a demo app. But I will convert it to static data and post it here. It would be great if you could take a quick look at it.

Kind regards
Benno

Coordinator
Jan 18, 2010 at 8:55 AM

Intriguing,

Please, give us an example.

Best regards

Clément

Jan 18, 2010 at 10:17 AM
Edited Jan 22, 2010 at 7:48 AM

Hi Clément,

I have modifed my demo and user dummy service classes. It should be free of any dependecies. I have created a issue so I can attach the code to it. The issue has the same title as this thread.

 

Kind regards

Benno

 

Jan 22, 2010 at 7:51 AM

Hello Clément,

any chance that you can take a look at my code? I need to decide which way I should continue with my development.

Kind regards

Benno

Coordinator
Jan 25, 2010 at 6:57 PM

Sorry but I have to work on something for now.

I think I can take a look at it on  Wednesday but I don't now if I will have enough time to resolve you problem.

Best regards.

Clément

Jan 25, 2010 at 8:12 PM

Hello Clément,

I understand and I appreciate any time you can invest into this issue.

Kind regards

Benno

Coordinator
Jan 30, 2010 at 5:11 PM

Hi,

Benno, It took me some time to find any evidence but there is indeed 2 different ID for the same company. 

XYZ

 

"Company|475d90f4-6acd-42d8-9ca7-d5dF7c867b1f"
"Company|475d90f4-6acd-42d8-9ca7-d5df7c867b1f"

"Company|475d90f4-6acd-42d8-9ca7-d5dF7c867b1f"

"Company|475d90f4-6acd-42d8-9ca7-d5df7c867b1f"

 

I cannot help you more on this, but I hope it will help you find out the problem with you GUID generator. 

Best regards.

Clément.

 

Jan 30, 2010 at 10:23 PM
Edited Jan 30, 2010 at 10:24 PM

Hello Clément,

thank you very much for your help and time. I am deeply ashamed for not having found the error myself. Everything is working perfectly now. I will continue exploring the possibillities of ICE.

Kind regards

Benno