I need to use workflow to assign a computer to a Manage Delivery Policy. I am succesfully getting the Policy information in the workflow but it looks like you can't assign a computer directly to the policy. You have to create a resource target first and then assign that to the policy. When I try to create the Resource target I bomb out but can't tell why. Here I am using in my XML:
<resourceTarget>
<name>Client Build Wizard - UsersComputer.Name</name>
<description>This target was create by the Client Buid Wizard</description>
<baseOrganizationalGroupGuid>91c68fcb-1822-e793-b59c-2684e99a64cd</baseOrganizationalGroupGuid>
<targetFilters>
<targetFilter>
<type>Individual Resources</type>
<operation>Intersect</operation>
<resourceGuids>
<resourceGuid>UsersComputer.Id</resourceGuid>
</resourceGuids>
</targetFilter>
</targetFilters>
</resourceTarget>
This is what the ASDK says:
The "name" value is the name of the new Resource Target. The "description" contains a description of the Resource Target (this "description" element is optional). The "baseOrganizationalGroupGuid" value should be given the value of the GUID of the Organizational Group item that defines the base or beginning set of resources against which any filters will be applied. If no value is given for the "baseOrganizationalGroupGuid" element, the base organizational group will be set to "All Discovered Resources." (NOTE: Some policies may impose an additional restriction on the starting Group to apply only to Computer or User resources.)
Zero or more filters may be added under the "targetFilters" element. Each "targetFilter" element defines a different filter to apply. The "type" of the filter must be one of "Organizational Group," "Resource Collection," or "Individual Resources." If the type is given as "Organizational Group," then there must be a sibling element "organizationalGroupGuid" whose value is the GUID of the existing Organizational Group item to be used as the filter. If the type is "Resource Collection," there must be a sibling element "resourceCollectionGuid" with the value of either (1) the GUID of the old-style (NS 6.x) collection, or (2) the Guid of an NS 7 Resource Collection, containing the resources to be used as the filter. (Note: An NS 7 Resource Collection is referred to as a "filter" in the NS Console.) If the type is given as "Individual Resources," there must be a sibling element "resourceGuids" which in turn contains one or more "resourceGuid" elements, each of which contains the GUID of an individual resource to be included in that filter.
There can be zero or more of each of the three types of filters, in any combination. NOTE: The order in which you place the filters in the XML is important. When the Resource Target is created, each filter will be evaluated in the order it appears in the XML, starting at the topmost filter element and moving downward.
The "operation" element in each Target Filter defines the logical operation that will be performed between the resources contained in the the filter and base organizational group (in the case of the first filter), or between the filter's resources and the resource set derived from the previous filter opertation (in the case of the second and subsequent filters). Only three values are allowed: "Intersect," "Union," and "Except."
For more information, see the NS7 documentation regarding Resource Targets and Target Filters.