[midPoint] Mapping a date in outbound to database table

Eduard Stan eduard.stan at innovery.net
Thu Aug 6 01:06:57 CEST 2020


Hi,
I'm using the following expression for importing date from DATABASE to MIDPOINT, and it works:
<script xmlns:org="http://midpoint.evolveum.com/xml/ns/public/common/org-3">
    <code>
      import java.text.SimpleDateFormat;
      import java.text.DateFormat;

      DateFormat dtf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

      if (input!=null) {
        Date dt = dtf.parse(input);
        log.info("convertedValidFrom = " + dt);
        return com.evolveum.midpoint.util.MiscUtil.asXMLGregorianCalendar(dt);
      } else {
        return null;
      }
    </code>
</script>

Using the same expression for outbound throws the following error:

No such property: input for class: expression_in_mapping_in_inbound_expression_for_DATA _in_resource_67952a4d-218b-4b1d-952d-7e1fe1a9d58b(HR) in expression in mapping in outbound mapping for {.../resource/instance-3}DATA in resource:28d3861d-df87-494b-8c65-597ca787ba08(Users)(null (focus, user)=user:1056841c-1dc9-489b-bead-3054bfa1882a(); configuration=systemConfiguration:00000000-0000-0000-0000-000000000001(SystemConfiguration); resource=resource:28d3861d-df87-494b-8c65-597ca787ba08(Users); iterationToken=; actor=user:00000000-0000-0000-0000-000000000002(administrator); DATA =PPV(XMLGregorianCalendarImpl:1979-11-10T12:00:00.000+01:00); legal=true; iteration=0; assigned=true; projection (shadow, account)=null; operation=add; ) in expression in mapping in outbound mapping for {.../resource/instance-3}DATA in resource:28d3861d-df87-494b-8c65-597ca787ba08(Users)

Can anyone advise?
Thank you.

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


More information about the midPoint mailing list