[midPoint] Issue with simple inbound mapping.

Deepak Natarajan dnataraj at trilobytesystems.com
Tue Aug 26 21:14:22 CEST 2014


Ahhhh!! $account/attributes/icfs:name worked!

Previously I had "uid" instead of "id" everywhere. i.e my csv  field was
called "uid" and I was using

$account/attributes/ri:uid in my mapping and this was failing with the
same error (i.e null value) - so I suppose uid and id are off-limits for
such purposes....

Thank you!
> Ivan Noris <mailto:ivan.noris at evolveum.com>
> August 26, 2014 at 7:17 PM
> Hi Deepak,
>
> Errrrr... Now I have a feeling, that to address your "id" property, you
> need to use "icfs:name". The CSV connector is masking that attribute as
> the icfs:name attribute. (Because it is configured as the unique key in
> configurationProperties.)
>
> So please to get your "id" try to use the path:
> <path>$account/attributes/icfs:name</path>
>
> Regards,
> Ivan
>
> Ivan Noris <mailto:ivan.noris at evolveum.com>
> August 26, 2014 at 4:51 PM
> Hi Deepak,
>
> I've just checked one of my customer objects for 3.0.x
>
> I'm using this:
>
>             <attribute>
>                     <ref>ri:P0000_ATTR1</ref>
>                     <displayName>Attr1</displayName>
>                     <inbound>
>                            <source>
>                                     <name>ATTRX</name>
>                                    
> <path>$account/attributes/P0001_ATTRX</path>
>                             </source>
>                             <source>
>                                     <name>ATTRY</name>
>                                     <path>$account/attributes/ATTRY</path>
>                             </source>
>                             <expression>
> . . .
>
> But it should also work with "ri:" prefixes, if the "ri" namespace is
> defined and correct
> (xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"
> - I define it usually at the resource level).
>
> How are you referencing your "input" implicit variable?
> In my expression (Groovy) it is:
>
> if (*input* == '0') return 'FormerEmployee'
>
> Are you perhaps referencing it as "$input" instead of "input"... ?
> Also, the source attributes in my sample would be referenced as
> "ATTRX" / "ATTRY" in the Groovy expressions.
>
>
> Regards,
> Ivan
>
>
> On 08/26/2014 11:35 AM, Deepak Natarajan wrote:
>
> -- 
> Ing. Ivan Noris
> Senior Identity Management Engineer
> evolveum.com
> ___________________________________________
> "Idem per idem - semper idem Vix."
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
> Deepak Natarajan <mailto:dnataraj at trilobytesystems.com>
> August 26, 2014 at 11:35 AM
> Hi -
>
> I find some simple inbound mapping behaving inconsistently (I'm
> obviously doing something wrong)
>
> My source feed (CSV) :
>
> <icfccsvfile:encoding>utf-8</icfccsvfile:encoding>
> <icfccsvfile:valueQualifier>"</icfccsvfile:valueQualifier>
> <icfccsvfile:fieldDelimiter>;</icfccsvfile:fieldDelimiter>
>
> <icfccsvfile:multivalueDelimiter>,</icfccsvfile:multivalueDelimiter>
>
> <icfccsvfile:usingMultivalue>false</icfccsvfile:usingMultivalue>
>
> <icfccsvfile:uniqueAttribute>id</icfccsvfile:uniqueAttribute>
>
> "id";"encoded-attributes"
> "foo";"3AARpkJyaXR0YalSYXNtdXN"
>
> and my mappings :
>
> <attribute>
> <ref>icfs:uid</ref>
> <limitations>
> <access>
> <read>true</read>
> </access>
> </limitations>
> </attribute>
>
> <attribute>
> <ref>icfs:name</ref>
> <inbound>
> <c:expression>
> <c:script>
> <c:code>
> input + '-suffix'
> </c:code>
> </c:script>
> </c:expression>
> <target>
> <path>$user/name</path>
> </target>
> </inbound>
> </attribute>
>
> <attribute>
> <ref>ri:encoded-attributes</ref>
> <inbound>
> <source>
> <name>encodedAttrs</name>
>
> <path>$account/attributes/ri:encoded-attributes</path>
> </source>
> <source>
> <name>id</name>
> <path>$account/attributes/ri:id</path>
> </source>
> ....
> ....
> </inbound>
>
> Is this incorrect?
>
> The thing is, I have used this configuration before, without any
> changes, and it used to work. Today it fails (my VCS system shows my
> working version had these mappings)
>
> Caused by:
> com.evolveum.midpoint.util.exception.ExpressionEvaluationException:
> java.lang.NullPointerException expression in mapping in inbound
> expression for
> {http://midpoint.evolveum.com/xml/ns/public/resource/instance-3}encoded-attributes
> in resource:036f0100-2fe8-49e1-a8fd-5548374f8703(APOS CSV Feeder
> Resource Definition)({.../common/common-3}input=null;
> {.../common/common-3}id=null;
> {.../common/common-3}encodedAttrs=PPV(String:3AARpkJyaXR0YalSYXNtdXN );
> ) in expression in mapping in inbound expression for
> {http://midpoint.evolveum.com/xml/ns/public/resource/instance-3}encoded-attributes
> in resource:036f0100-2fe8-49e1-a8fd-5548374f8703(APOS CSV Feeder
> Resource Definition)
>
> Why is "input" implicit variable and id both null?
>
> Thanks for any help!
>
> -
> Deepak Natarajan
>

-- 
Deepak Natarajan
Director

Trilobyte Systems ApS

Falkoner Alle 1, 3            Fredrikinkatu 61A, 6th Floor
2000 Frederiksberg         Business Center Papula
Denmark                          00100 Helsinki
                                        Finland

Tel : +45 29375068
http://www.trilobytesystems.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20140826/efcdb3ec/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compose-unknown-contact.jpg
Type: image/jpeg
Size: 770 bytes
Desc: not available
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20140826/efcdb3ec/attachment.jpg>


More information about the midPoint mailing list