[midPoint] Assigning a new resource in bulk action failing.

Prabhakara Rao Doddapaneni dp_rao at yahoo.com
Wed Jun 28 16:19:51 CEST 2017


Hello,
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.
Is there a way to accomplish this in a single task?
Created the first task as following:
   <s:search xmlns:s="http://midpoint.evolveum.com/xml/ns/public/model/scripting-3"
    xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
    xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3">
      <s:type>c:RoleType</s:type>
      <s:searchFilter>
         <q:ref>
            <q:path>linkRef/@/resourceRef</q:path>
            <q:value oid="Resource1"/>
         </q:ref>
      </s:searchFilter>
      <s:action>
         <s:type>assign</s:type>
         <s:parameter>
            <s:name>resource</s:name>
            <c:value>
                <type>ResourceType</type>
                <oid>Resource2</oid>
            </c:value>
         </s:parameter>
      </s:action>
   </s:search>

The task is failing with the following exception:
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.

Please help to fix this task definition.
Thanks,
Prabhakar.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20170628/88543d40/attachment.htm>


More information about the midPoint mailing list