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

Ivan Noris ivan.noris at evolveum.com
Wed Feb 22 13:04:27 CET 2017


Unfortunately, I have never assigned resource accounts (without roles).

So maybe someone else knows if this should work (and how).

What is the resource which you are trying to assign? The source or
something else? (You can use roles as a workaround.)

Ivan


On 02/22/2017 12:48 PM, Prabhakara Rao Doddapaneni wrote:
> 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.
>
>
>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint

-- 
Ivan Noris
Senior Identity Engineer
evolveum.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20170222/c1b0aec8/attachment.htm>


More information about the midPoint mailing list