title: Retrieve Components Required by Workflow Process
body: <p>I have been trying to retrieve the list of "required components" of a specific Workflow process using the CRM SDK.  I can retrieve the desired workflow entity, but the required components are not referenced in that object to my knowledge.</p>
  
  <p>Using that same id with a <code>RetrieveRequiredComponentsRequest</code> does run, but it returns an <code>EntityCollection</code> with 0 records as a result.  That is totally incorrect as there actually are required components.</p>
  
  <pre class="lang-cs prettyprint-override"><code>Guid workflowId = WORKFLOW_GUID;
  RetrieveRequiredComponentsRequest request = new RetrieveRequiredComponentsRequest();
  request.ObjectId = workflowId; // confirmed correct id as the correct entity can be retrieved
  RetrieveRequiredComponentsResponse response = (RetrieveRequiredComponentsResponse)service.Execute(request);
  EntityCollection results = (EntityCollection)response.Results["EntityCollection"]; // the only key in Results was "EntityCollection"
  foreach (var item in results.Entities) // okay, then what are their names?
  {    
      Console.WriteLine("LogicalName: {0}", item.LogicalName); // prints nothing at all! wat?
  }
  Console.WriteLine("Results count: {0}", results.Entities.Count); // is 0...
  </code></pre>
  
  <p>I am confused because I <em>know</em> I have the ID for the workflow as I can properly fetch it with <code>service.Retrieve</code>.  Is <code>RetrieveRequiredComponents[Request|Response]</code> <strong>not</strong> the right thing to use to get workflow process dependencies?  It certainly works for other CRM objects.</p>
  
  <p>EDIT(for part of the reason why the above code is wrong): <code>RetrieveRequiredComponents</code> looks for <strong>solution</strong> components such as entities, option sets, and web resources, not individual attributes of a solution component like fields of an entity.  That explains why I don't get my desired results, but it does not explain why the request yields no results at all.  I expect a couple entities to be returned.</p>