<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:small;"><div>Hello,</div><div><br></div><div>I imported a bunch of organizations as roles of roleType:'location' from a resource with OID:"Resource1".  Once the importing is completed, i have to keep these objects in sync with a different resource with OID: "Resource2" and I have to remove the reference to "Resource1".  To accomplish this, i am planning to create different tasks for 1. assign Resource2 to all those RoleType objects, 2. unassign Resource1 from all those RoleType objects, 3. reconcile all those RoleType objects.</div><div><br></div><div>Is there a way to accomplish this in a single task?</div><div><br></div><div>Created the first task as following:</div><div><br></div><div>   <s:search xmlns:s="http://midpoint.evolveum.com/xml/ns/public/model/scripting-3"<br>    xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"<br>    xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"><br>      <s:type>c:RoleType</s:type><br>      <s:searchFilter><br>         <q:ref><br>            <q:path>linkRef/@/resourceRef</q:path><br>            <q:value oid="Resource1"/><br>         </q:ref><br>      </s:searchFilter><br>      <s:action><br>         <s:type>assign</s:type><br>         <s:parameter><br>            <s:name>resource</s:name><br>            <c:value><br>                <type>ResourceType</type><br>                <oid>Resource2</oid><br>            </c:value><br>         </s:parameter><br>      </s:action><br>   </s:search><br></div><div><br></div><div>The task is failing with the following exception:</div><div><br></div><div><span style="color: rgb(51, 51, 51); font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px;">Couldn't execute script: Couldn't execute script: Raw value while evaluating parameter resource: PPV(null, raw element: XNode(map:2 entries)). Please specify type of the value.</span><br></div><div><span style="color: rgb(51, 51, 51); font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px;"><br></span></div><div><span style="color: rgb(51, 51, 51); font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px;">Please help to fix this task definition.</span></div><div><span style="color: rgb(51, 51, 51); font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px;"><br></span></div><div><span style="color: rgb(51, 51, 51); font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px;">Thanks,</span><br></div><div><font color="#333333" face="Source Sans Pro, Helvetica Neue, Helvetica, Arial, sans-serif"><span style="font-size: 14px;">Prabhakar.</span></font></div></div></body></html>