<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Deepak,<br>
    <br>
    I've just checked one of my customer objects for 3.0.x<br>
    <br>
    I'm using this:<br>
    <br>
                <attribute><br>
                        <ref>ri:P0000_ATTR1</ref><br>
                        <displayName>Attr1</displayName><br>
                        <inbound><br>
                               <source><br>
                                        <name>ATTRX</name><br>
                                       
    <path>$account/attributes/P0001_ATTRX</path><br>
                                </source><br>
                                <source><br>
                                        <name>ATTRY</name><br>
                                       
    <path>$account/attributes/ATTRY</path><br>
                                </source><br>
                                <expression><br>
    . . .<br>
    <br>
    But it should also work with "ri:" prefixes, if the "ri" namespace
    is defined and correct (xmlns:ri=<a class="moz-txt-link-rfc2396E" href="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3">"http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"</a>
    - I define it usually at the resource level).<br>
    <br>
    How are you referencing your "input" implicit variable?<br>
    In my expression (Groovy) it is:<br>
    <br>
    if (<b>input</b> == '0') return 'FormerEmployee'<br>
    <br>
    Are you perhaps referencing it as "$input" instead of "input"... ?<br>
    Also, the source attributes in my sample would be referenced as
    "ATTRX" / "ATTRY" in the Groovy expressions.<br>
    <br>
    <br>
    Regards,<br>
    Ivan<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 08/26/2014 11:35 AM, Deepak
      Natarajan wrote:<br>
    </div>
    <blockquote cite="mid:53FC54E3.4000608@trilobytesystems.com"
      type="cite">
      <pre wrap="">
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
{<a class="moz-txt-link-freetext" href="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3">http://midpoint.evolveum.com/xml/ns/public/resource/instance-3</a>}encoded-attributes
in <a class="moz-txt-link-freetext" href="resource:036f0100-2fe8-49e1-a8fd-5548374f8703(APOS">resource:036f0100-2fe8-49e1-a8fd-5548374f8703(APOS</a> 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
{<a class="moz-txt-link-freetext" href="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3">http://midpoint.evolveum.com/xml/ns/public/resource/instance-3</a>}encoded-attributes
in <a class="moz-txt-link-freetext" href="resource:036f0100-2fe8-49e1-a8fd-5548374f8703(APOS">resource:036f0100-2fe8-49e1-a8fd-5548374f8703(APOS</a> CSV Feeder
Resource Definition)

Why is "input" implicit variable and id both null?

Thanks for any help!

-
Deepak Natarajan

_______________________________________________
midPoint mailing list
<a class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
  Ing. Ivan Noris
  Senior Identity Management Engineer
  evolveum.com
  ___________________________________________
           "Idem per idem - semper idem Vix."
</pre>
  </body>
</html>