Client Management Suite

 View Only
  • 1.  ASDK get assigned policy on a filter?

    Posted Apr 22, 2012 04:50 PM

    One way or the other, I need to find the assigned policies assigned to a filter/collection so I can update the policy targets.  I would like there to be a cool ASDK way to do it, but if I have to I'll go direct SQL.  I have scowered the ASDK in IIS and can't find any such function.  Did I miss it?  If not, any one know the SQL to find assigned policies? 

    This is all for doing software deliver via Workflow.

    Thanks in advance!
    -Jon



  • 2.  RE: ASDK get assigned policy on a filter?

    Posted Apr 22, 2012 07:57 PM

    Here's some sample SQL on obtaining the policy-target-filter relationships:

    SELECT DISTINCT
      vi1.Guid AS [Filter Guid],
      vi1.Name AS [Filter Name],
      vir.ParentItemGuid AS [Target Guid],
      vi2.Name AS [Target Name],
      rtu.ItemGuid AS [Policy Guid],
      vi3.Name AS [Policy Name]
    FROM
      Collection c
      INNER JOIN vItem vi1 ON vi1.Guid = c.Guid
      INNER JOIN vItemReference vir ON vir.ChildItemGuid = c.Guid
        AND Hint = N'resourcetargetfilter'
      INNER JOIN vResourceTargetUses rtu ON rtu.ResourceTargetGuid = vir.ParentItemGuid
      INNER JOIN vItem vi2 ON vi2.Guid = rtu.ResourceTargetGuid
      INNER JOIN vItem vi3 ON vi3.Guid = rtu.ItemGuid

    It should work in 7.0 and 7.1.



  • 3.  RE: ASDK get assigned policy on a filter?

    Posted Apr 23, 2012 08:48 AM

    To see all policies assigned to a filter, just go to the filter and click Referenced By.



  • 4.  RE: ASDK get assigned policy on a filter?

    Posted Apr 23, 2012 01:37 PM

    I see that, but I need to be able to do this from Workflow.  Thanks though



  • 5.  RE: ASDK get assigned policy on a filter?

    Posted Apr 23, 2012 01:38 PM

    That should get me what I need.  Thanks so much!