<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"></head><body
 bgcolor="#FFFFFF" text="#000000">
  <br>
Hi Everyone -<br>
  <br>
I have extended my Midpoint schema with a  custom multi-valued property 
like so :<br>
  <br>
            <xsd:element name="foo" type="xsd:string" minOccurs="0" 
maxOccurs="unbounded"><br>
                <xsd:annotation><br>
                    <xsd:appinfo><br>
                        <a:indexed>true</a:indexed><br>
                    </xsd:appinfo><br>
                </xsd:annotation><br>
            </xsd:element><br>
  <br>
How do I populate this from with an inbound mapping?<br>
  <br>
When I do :<br>
  <br>
                <attribute><br>
                    <ref>ri:resourceFoo</ref><br>
                    <inbound><br>
                        <expression><br>
                            <script><br>
                                <code><br>
                                        return resourceFoo.split(',')<br>
                                </code><br>
                            </script><br>
                        </expression><br>
                        <target><br>
                            
<path>$user/extension/apos:foo</path><br>
                        </target><br>
                    </inbound><br>
                </attribute><br>
  <br>
I get the error :<br>
  <span style="font-weight: bold;">Caused by: 
java.lang.IllegalArgumentException: Expected class java.lang.String 
type, but got class [Ljava.lang.String;</span><br>
        at 
com.evolveum.midpoint.prism.util.JavaTypeConverter.convert(JavaTypeConverter.java:240)
 ~[prism-2.3-SNAPSHOT.jar:na]<br>
        at 
com.evolveum.midpoint.model.common.expression.ExpressionUtil.convertValue(ExpressionUtil.java:178)
 ~[model-common-2.3-SNAPSHOT.jar:na]<br>
        at 
com.evolveum.midpoint.model.common.expression.script.jsr223.Jsr223ScriptEvaluator.convertScalarResult(Jsr223ScriptEvaluator.java:184)
 ~[model-common-2.3-SNAPSHOT.jar:na]<br>
        ... 54 common frames omitted<br>
  <br>
I have tested my groovy snipped and I'm assuming if it returns a List 
(as indicated in the stack trace), it would be handled by Midpoint. I 
couldn't find an example (maybe I missed this..)<br>
  <br>
Thank you!<br>
  <br>
BR/<br>
  <div class="moz-signature">-- <br>Deepak Natarajan<br>


<br>


<br>


  </div>
</body>
</html>