[midPoint] Assigning a different resource during the import of accounts from external resource.

Prabhakara Rao Doddapaneni dp_rao at yahoo.com
Wed Feb 22 12:36:17 CET 2017


I configured two resources; one inbound and second both-ways.  For the inbound resource, configured unmatched situation to add user with the following template:
   <mapping>      <description>                Property mapping.                Defines how properties of user object are set up.                This specific definition sets a full name as a concatenation                of givenName and familyName. </description>      <strength>weak</strength>      <source>         <c:path>$user/givenName</c:path>      </source>      <source>         <c:path>$user/familyName</c:path>      </source>      <expression>         <script>            <language>http://midpoint.evolveum.com/xml/ns/public/expression/language#Groovy</language>            <code> givenName + ' ' + familyName </code>         </script>      </expression>      <target>         <c:path>fullName</c:path>      </target>   </mapping>   <mapping>      <name>Default Role</name>      <strength>strong</strength>      <expression>         <assignmentTargetSearch>            <targetType>c:RoleType</targetType>            <oid>00000000-0000-0000-0000-000000000008</oid>         </assignmentTargetSearch>      </expression>      <target>         <c:path>assignment</c:path>      </target>   </mapping>   <mapping>      <name>Default Resource</name>      <strength>strong</strength>      <expression>         <assignmentTargetSearch>            <targetType>c:ResourceType</targetType>            <oid>ef2bc95b-76e0-48e2-86d6-3d4f02d3eeee</oid>         </assignmentTargetSearch>      </expression>      <target>         <c:path>assignment</c:path>      </target>   </mapping>

My intention was to assign the above role and resource to the new user imported.  It is failing to add the resource with the cause: Caused by: java.lang.ClassCastException: com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType cannot be cast to com.evolveum.midpoint.xml.ns._public.common.common_3.FocusType at com.evolveum.midpoint.model.impl.lens.AssignmentEvaluator.evaluateAssignmentWithResolvedTarget(AssignmentEvaluator.java:368) ~[model-impl-3.5.jar:na]

When I tried with the following mapping to assign the resource:  <mapping>
       <strength>strong</strength>
       <expression>
          <value>
           <assignment>
               <construction>
                    <resourceRef oid="ef2bc95b-76e0-48e2-86d6-3d4f02d3eeee" type="ResourceType"/>
               </construction>
          </assignment>
         </value>     
   </expression>
   <target>
    <path>assignment</path>
   </target>
  </mapping>I get the following exception:
2017-02-22 06:31:17,086 [] [midPointScheduler_Worker-6] ERROR (com.evolveum.midpoint.model.impl.util.AbstractSearchIterativeResultHandler): Import of object shadow:07c95824-ee5f-40b1-abba-1935c578b632(************) from resource:ef2bc95b-76e0-48e2-86d6-3d4f02d3ffff(Demo CAS DBTable) failed: Item {http://midpoint.evolveum.com/xml/ns/public/common/common-3}assignment has no definition (in container value CTD ({.../common/common-3}AssignmentType))while parsing (
  {...common/common-3}assignment =>
    (
      {...common/common-3}construction =>
        (
          {...common/common-3}resourceRef =>
            (
              oid =>
                parser ValueParser(DOMa, oid: ef2bc95b-76e0-48e2-86d6-3d4f02d3eeee)
              type =>
                parser ValueParser(DOMa, type: ResourceType)
            )
        )
    )
)
Please help me know the mistake i am doing.Thanks,Prabhakar.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20170222/e4238363/attachment.htm>


More information about the midPoint mailing list