title: WF 4 different IDs on the same activities
body: <p>Due to a strange behavior in my application, i am forced to reload the designer before calling WorkflowInvoker.Invoke on it. </p>
  
  <pre><code>wd.Flush();
  SaveXamlFile(currentXamlPath, wd.Text);
  </code></pre>
  
  <p>I just flush the content, and write the wd.Text to a file. </p>
  
  <pre><code>//cleanup the previous designer
  if (wd != null)
  {
      wd.ModelChanged -= new EventHandler(Designer_ModelChanged);
  }
  
  //designer
  wd = new WorkflowDesigner();
  designerArea.Child = wd.View;
  this.DebuggerService = this.wd.DebugManagerView;
  
  //property grid
  propertiesArea.Child = wd.PropertyInspectorView;
  
  //event handler
  wd.ModelChanged += new EventHandler(Designer_ModelChanged);
  
  //error service
  wd.Context.Services.Publish&lt;IValidationErrorService&gt;(errorService);
  
  
  wd.Context.Items.Subscribe&lt;Selection&gt;(OnItemSelected);
  </code></pre>
  
  <p>I then recreate a new instance of the WorkflowDesigner and load the previously saved file.</p>
  
  <pre><code>wd.Load(currentXamlPath);
  </code></pre>
  
  <p>I call WorkflowInvoker.Invoke and inside my custom activity which derives from CodeActivity i am taking it's name:<img src="https://i.stack.imgur.com/tKJoN.jpg" alt="enter image description here">
  OK, fine until now, i have a 1.2 Id there.</p>
  
  <p>I want to update some of the fields of this Activity via its ModelItem in order to display them in the GUI right away. </p>
  
  <pre><code>IEnumerable&lt;ModelItem&gt; activityCollection = currentWorkflow.Find(currentWorkflow.Root, typeof(Activity));
  </code></pre>
  
  <p>But here comes the issue:<img src="https://i.stack.imgur.com/pPMbW.png" alt="enter image description here"></p>
  
  <p>I can't find that my Activity id there. Is now transformed from 1.2 to 2. Why is this happening?</p>
  
  <p>I've tried to send a this reference from my Activity Execute method and  searched it by ref but all i get is nulls. </p>
  
  <pre><code>ModelItem temp = activityCollection.FirstOrDefault((m) =&gt; (m.GetCurrentValue() == a));
  </code></pre>
  
  <p>I am sure i am missing something here, but i can't figure out what is it. </p>