<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Simple way would be to use dateTime and
just set the time part to 00:00:00. That's what we usually do. If
you use dataTime instead of string then midPoint GUI should
provide convenient date/time picker widget instead of just text
field.<br>
<br>
The XMLGregorianCalendar is a slight inconvenience. But the
XMLGregorianCalendar is Java representation of the xsd:dateTime.
This is probably caused by the really bad support that the Java
platform has for data types related to dates and times. There are
many data types and it is difficult to work with them, there are
also some libraries, but these are not yet generally accepted as a
replacement. So, there is great deal of confusion here. We have
decided not to contribute to the chaos and reuse
XMLGregorianCalendar - even if it is not perfect.<br>
<br>
Maybe you can use basic.formatDateTime(...) and
basic.parseDateTime(...) methods?<br>
<br>
See
<a class="moz-txt-link-freetext" href="https://www.evolveum.com/downloads/midpoint/3.4/midpoint-3.4-javadoc/com/evolveum/midpoint/model/common/expression/functions/BasicExpressionFunctions.html">https://www.evolveum.com/downloads/midpoint/3.4/midpoint-3.4-javadoc/com/evolveum/midpoint/model/common/expression/functions/BasicExpressionFunctions.html</a><br>
(and
<a class="moz-txt-link-freetext" href="https://wiki.evolveum.com/display/midPoint/Script+Expression+Functions">https://wiki.evolveum.com/display/midPoint/Script+Expression+Functions</a>)<br>
<br>
<pre class="moz-signature" cols="72">--
Radovan Semancik
Software Architect
evolveum.com
</pre>
<br>
<br>
<br>
On 08/23/2016 10:05 PM, Mencel, Matt wrote:<br>
</div>
<blockquote
cite="mid:CABpVbHK94FXAP0K45fqa2mtKwYS+pMawHvtVsk9-SpFk1Z4syA@mail.gmail.com"
type="cite">
<div dir="ltr">Since it's a birthday and time is not needed, I'm
just going to store it as a string for now. If Midpoint adds
support for the xsd:date type someday I'll look at this again.
<div><br>
</div>
<div>Thanks for the suggestions.</div>
<div><br>
</div>
<div>Matt</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Aug 23, 2016 at 2:50 PM, Ivan
Noris <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:Ivan.Noris@evolveum.com" target="_blank">Ivan.Noris@evolveum.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="font-family:times new roman,new
york,times,serif;font-size:12pt;color:#000000">
<div>Hi Matt,<br>
</div>
<div><br>
</div>
<div>this is a fragment from my mapping for date (from
Oracle DB I guess)<br>
</div>
<div>...<br>
</div>
<div> <inbound><br>
<target><br>
<c:path>$focus/activation/<wbr>validFrom</c:path><br>
</target><br>
<expression><br>
<script><br>
<code><br>
<wbr> import
java.text.SimpleDateFormat;<br>
<wbr> import
java.text.DateFormat;<br>
<br>
<wbr> DateFormat df =
new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");<br>
<br>
<wbr> if (input!=null)
{<br>
<wbr> Date
convertedValidFrom = df.parse(input);<br>
<wbr> <a
moz-do-not-send="true" href="http://log.info"
target="_blank">log.info</a>("convertedValidFrom = "
+ convertedValidFrom);<br>
<br>
<wbr> return
com.evolveum.midpoint.util.<wbr>MiscUtil.<wbr>asXMLGregorianCalendar(<wbr>convertedValidFrom);<br>
<wbr> }<br>
<wbr> else {<br>
<wbr> return null;<br>
<wbr> }<br>
<br>
</code><br>
</script><br>
</expression><br>
</inbound><br>
...<br>
</div>
<div><br>
</div>
<div>Hope this helps,<br>
</div>
<div>Ivan<br>
</div>
<div><br>
</div>
<hr>
<blockquote style="border-left:2px solid
#1010ff;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><b>From:
</b>"Matt Mencel" <<a moz-do-not-send="true"
href="mailto:mr-mencel@wiu.edu" target="_blank">mr-mencel@wiu.edu</a>><br>
<b>To: </b>"midPoint General Discussion" <<a
moz-do-not-send="true"
href="mailto:midpoint@lists.evolveum.com"
target="_blank">midpoint@lists.evolveum.com</a>><br>
<b>Sent: </b>Tuesday, August 23, 2016 9:26:33 PM<br>
<b>Subject: </b>Re: [midPoint] Parsing Dates in
Inbound Mapping
<div>
<div class="h5"><br>
<div><br>
</div>
<div dir="ltr">I tried it like this....
<div><br>
</div>
<div>
<div><span
style="font-family:monospace,monospace"
face="monospace, monospace">
<inbound></span></div>
<div><span
style="font-family:monospace,monospace"
face="monospace, monospace">
<target></span></div>
<div><span
style="font-family:monospace,monospace"
face="monospace, monospace">
<path>$user/extension/<wbr>birthDate</path></span></div>
<div><span
style="font-family:monospace,monospace"
face="monospace, monospace">
</target></span></div>
<div><span
style="font-family:monospace,monospace"
face="monospace, monospace">
<expression></span></div>
<div><span
style="font-family:monospace,monospace"
face="monospace, monospace">
<script></span></div>
<div><span
style="font-family:monospace,monospace"
face="monospace, monospace">
<language><a
moz-do-not-send="true"
href="http://midpoint.evolveum.com/xml/ns/public/expression/language#Groovy"
target="_blank">http://midpoint.<wbr>evolveum.com/xml/ns/public/<wbr>expression/language#Groovy</a></<wbr>language></span></div>
<div><span
style="font-family:monospace,monospace"
face="monospace, monospace">
<code></span></div>
<div><span
style="font-family:monospace,monospace"
face="monospace, monospace"><span style="white-space:pre-wrap"> </span>XMLGregorianCalendar(Date.<wbr>parse('yyyymmdd',
input))</span></div>
<div><span
style="font-family:monospace,monospace"
face="monospace, monospace"><span style="white-space:pre-wrap"> </span></code></span></div>
<div><span
style="font-family:monospace,monospace"
face="monospace, monospace">
</script></span></div>
<div><span
style="font-family:monospace,monospace"
face="monospace, monospace">
</expression></span></div>
<div><span
style="font-family:monospace,monospace"
face="monospace, monospace">
</inbound></span></div>
<div><span
style="font-family:monospace,monospace"
face="monospace, monospace">
</attribute></span></div>
</div>
<div><span
style="font-family:monospace,monospace"
face="monospace, monospace"><br>
</span></div>
<div><span
style="font-family:arial,helvetica,sans-serif"
face="arial, helvetica, sans-serif">I'm
still getting Java errors (see below). I'll
can just switch it back to a string type and
not worry about it.</span></div>
<div><br>
</div>
<div><span
style="font-family:arial,helvetica,sans-serif"
face="arial, helvetica, sans-serif">Thanks,</span></div>
<div><span
style="font-family:arial,helvetica,sans-serif"
face="arial, helvetica, sans-serif">Matt</span></div>
<div><span
style="font-family:arial,helvetica,sans-serif"
face="arial, helvetica, sans-serif"><br>
</span></div>
<div><span
style="font-family:arial,helvetica,sans-serif"
face="arial, helvetica, sans-serif"><br>
</span></div>
<div><span
style="font-family:arial,helvetica,sans-serif"
face="arial, helvetica, sans-serif"><br>
</span></div>
<div><span
style="font-family:arial,helvetica,sans-serif"
face="arial, helvetica, sans-serif"><br>
</span></div>
<div><span
style="font-family:arial,helvetica,sans-serif"
face="arial, helvetica, sans-serif">
<div>2016-08-23 13:21:42,247 []
[midPointScheduler_Worker-8] ERROR
(com.evolveum.midpoint.model.<wbr>impl.sync.<wbr>SynchronizationServiceImpl):
SYNCHRONIZATION: Error in synchronization
on <a class="moz-txt-link-freetext" href="resource:0d6babea-6896-11e6">resource:0d6babea-6896-11e6</a>-<wbr>9d38-0050569aa9d2(CSV
TEADVS) for situation LINKED:
ExpressionEvaluationException:
groovy.lang.<wbr>MissingMethodException:
No signature of method:
org.codehaus.groovy.jsr223.<wbr>GroovyScriptEngineImpl.<wbr>XMLGregorianCalendar()
is applicable for argument types:
(java.util.Date) values: [Sat Jan 05
00:04:00 CST 1985] expression in mapping
in inbound expression for {<a
moz-do-not-send="true"
href="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3%7Dbirthdate"
target="_blank">http://midpoint.evolveum.com/<wbr>xml/ns/public/resource/<wbr>instance-3}birthdate</a>
in <a class="moz-txt-link-freetext" href="resource:0d6babea-6896-11e6">resource:0d6babea-6896-11e6</a>-<wbr>9d38-0050569aa9d2(CSV
TEADVS)({.../common/common-3}<wbr>input=PPV(String:19850405);
) in expression in mapping in inbound
expression for {<a moz-do-not-send="true"
href="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3%7Dbirthdate"
target="_blank">http://midpoint.evolveum.com/<wbr>xml/ns/public/resource/<wbr>instance-3}birthdate</a>
in <a class="moz-txt-link-freetext" href="resource:0d6babea-6896-11e6">resource:0d6babea-6896-11e6</a>-<wbr>9d38-0050569aa9d2(CSV
TEADVS). Change was
ResourceObjectShadowChangeDesc<wbr>ription(objectDelta=<wbr>ObjectDelta(ShadowType:<wbr>4c7c2ce9-9041-46da-b8c3-<wbr>a57be022ce18,ADD:
shadow:4c7c2ce9-9041-46da-<wbr>b8c3-a57be022ce18(902073705)),
currentShadow=shadow:4c7c2ce9-<wbr>9041-46da-b8c3-a57be022ce18(<wbr>902073705),
oldShadow=null, sourceChannel=<a
moz-do-not-send="true"
href="http://midpoint.evolveum.com/xml/ns/public/provisioning/channels-3#import"
target="_blank">http://midpoint.<wbr>evolveum.com/xml/ns/public/<wbr>provisioning/channels-3#import</a><wbr>,
resource=<a class="moz-txt-link-freetext" href="resource:0d6babea">resource:0d6babea</a>-<wbr>6896-11e6-9d38-0050569aa9d2(<wbr>CSV
TEADVS))</div>
<div>com.evolveum.midpoint.util.<wbr>exception.<wbr>ExpressionEvaluationException:
groovy.lang.<wbr>MissingMethodException:
No signature of method:
org.codehaus.groovy.jsr223.<wbr>GroovyScriptEngineImpl.<wbr>XMLGregorianCalendar()
is applicable for argument types:
(java.util.Date) values: [Sat Jan 05
00:04:00 CST 1985] expression in mapping
in inbound expression for {<a
moz-do-not-send="true"
href="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3%7Dbirthdate"
target="_blank">http://midpoint.evolveum.com/<wbr>xml/ns/public/resource/<wbr>instance-3}birthdate</a>
in <a class="moz-txt-link-freetext" href="resource:0d6babea-6896-11e6">resource:0d6babea-6896-11e6</a>-<wbr>9d38-0050569aa9d2(CSV
TEADVS)({.../common/common-3}<wbr>input=PPV(String:19850405);
) in expression in mapping in inbound
expression for {<a moz-do-not-send="true"
href="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3%7Dbirthdate"
target="_blank">http://midpoint.evolveum.com/<wbr>xml/ns/public/resource/<wbr>instance-3}birthdate</a>
in <a class="moz-txt-link-freetext" href="resource:0d6babea-6896-11e6">resource:0d6babea-6896-11e6</a>-<wbr>9d38-0050569aa9d2(CSV
TEADVS)</div>
<div> at com.evolveum.midpoint.model.<wbr>common.expression.evaluator.<wbr>AbstractValueTransformationExp<wbr>ressionEvaluator$1.process(<wbr>AbstractValueTransformationExp<wbr>ressionEvaluator.java:425)
~[model-common-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.model.<wbr>common.expression.evaluator.<wbr>AbstractValueTransformationExp<wbr>ressionEvaluator$1.process(<wbr>AbstractValueTransformationExp<wbr>ressionEvaluator.java:352)
~[model-common-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.util.<wbr>MiscUtil.carthesian(MiscUtil.<wbr>java:367)
~[util-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.util.<wbr>MiscUtil.carthesian(MiscUtil.<wbr>java:357)
~[util-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.model.<wbr>common.expression.evaluator.<wbr>AbstractValueTransformationExp<wbr>ressionEvaluator.<wbr>evaluateRelativeExpression(<wbr>AbstractValueTransformationExp<wbr>ressionEvaluator.java:442)
~[model-common-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.model.<wbr>common.expression.evaluator.<wbr>AbstractValueTransformationExp<wbr>ressionEvaluator.evaluate(<wbr>AbstractValueTransformationExp<wbr>ressionEvaluator.java:114)
~[model-common-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.model.<wbr>common.expression.Expression.<wbr>evaluate(Expression.java:133)
~[model-common-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.model.<wbr>common.mapping.Mapping.<wbr>evaluateExpression(Mapping.<wbr>java:985)
~[model-common-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.model.<wbr>common.mapping.Mapping.<wbr>evaluate(Mapping.java:520)
~[model-common-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.model.<wbr>impl.lens.projector.<wbr>MappingEvaluator.<wbr>evaluateMapping(<wbr>MappingEvaluator.java:95)
~[model-impl-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.model.<wbr>impl.lens.projector.<wbr>InboundProcessor.<wbr>evaluateInboundMapping(<wbr>InboundProcessor.java:490)
~[model-impl-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.model.<wbr>impl.lens.projector.<wbr>InboundProcessor.<wbr>processInboundExpressionsForPr<wbr>ojection(InboundProcessor.<wbr>java:319)
~[model-impl-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.model.<wbr>impl.lens.projector.<wbr>InboundProcessor.<wbr>processInboundFocal(<wbr>InboundProcessor.java:186)
~[model-impl-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.model.<wbr>impl.lens.projector.<wbr>InboundProcessor.<wbr>processInbound(<wbr>InboundProcessor.java:128)
~[model-impl-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.model.<wbr>impl.lens.projector.<wbr>FocusProcessor.<wbr>processFocusFocus(<wbr>FocusProcessor.java:212)
~[model-impl-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.model.<wbr>impl.lens.projector.<wbr>FocusProcessor.processFocus(<wbr>FocusProcessor.java:146)
~[model-impl-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.model.<wbr>impl.lens.projector.Projector.<wbr>projectInternal(Projector.<wbr>java:208)
~[model-impl-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.model.<wbr>impl.lens.projector.Projector.<wbr>project(Projector.java:106)
~[model-impl-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.model.<wbr>impl.lens.Clockwork.click(<wbr>Clockwork.java:302)
~[model-impl-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.model.<wbr>impl.lens.Clockwork.run(<wbr>Clockwork.java:214)
~[model-impl-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.model.<wbr>impl.sync.<wbr>SynchronizationServiceImpl.<wbr>reactToChange(<wbr>SynchronizationServiceImpl.<wbr>java:766)
[model-impl-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.model.<wbr>impl.sync.<wbr>SynchronizationServiceImpl.<wbr>notifyChange(<wbr>SynchronizationServiceImpl.<wbr>java:299)
[model-impl-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.<wbr>provisioning.impl.<wbr>ChangeNotificationDispatcherIm<wbr>pl.notifyChange(<wbr>ChangeNotificationDispatcherIm<wbr>pl.java:148)
[provisioning-impl-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.model.<wbr>impl.sync.<wbr>SynchronizeAccountResultHandle<wbr>r.handleObjectInternal(<wbr>SynchronizeAccountResultHandle<wbr>r.java:203)
[model-impl-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.model.<wbr>impl.sync.<wbr>SynchronizeAccountResultHandle<wbr>r.handleObject(<wbr>SynchronizeAccountResultHandle<wbr>r.java:128)
[model-impl-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.model.<wbr>impl.util.<wbr>AbstractSearchIterativeResultH<wbr>andler.processRequest(<wbr>AbstractSearchIterativeResultH<wbr>andler.java:327)
[model-impl-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.model.<wbr>impl.util.<wbr>AbstractSearchIterativeResultH<wbr>andler.handle(<wbr>AbstractSearchIterativeResultH<wbr>andler.java:189)
[model-impl-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.<wbr>provisioning.impl.<wbr>ProvisioningServiceImpl$4.<wbr>handle(<wbr>ProvisioningServiceImpl.java:<wbr>1184)
[provisioning-impl-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.<wbr>provisioning.impl.ShadowCache$<wbr>2.handle(ShadowCache.java:831)
[provisioning-impl-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.<wbr>provisioning.impl.<wbr>ResourceObjectConverter$3.<wbr>handle(<wbr>ResourceObjectConverter.java:<wbr>1102)
[provisioning-impl-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.<wbr>provisioning.ucf.impl.<wbr>ConnectorInstanceIcfImpl$2.<wbr>handle(<wbr>ConnectorInstanceIcfImpl.java:<wbr>2316)
[provisioning-impl-3.4.jar:na]</div>
<div> at org.identityconnectors.<wbr>framework.impl.api.<wbr>SearchResultsHandlerLoggingPro<wbr>xy.handle(<wbr>SearchResultsHandlerLoggingPro<wbr>xy.java:64)
[connector-framework-internal-<wbr>1.4.3.0-SNAPSHOT.jar:na]</div>
<div> at org.identityconnectors.<wbr>framework.impl.api.<wbr>StreamHandlerUtil$<wbr>ObjectStreamHandlerAdapter.<wbr>handle(StreamHandlerUtil.java:<wbr>101)
[connector-framework-internal-<wbr>1.4.3.0-SNAPSHOT.jar:na]</div>
<div> at org.identityconnectors.<wbr>framework.impl.api.<wbr>BufferedResultsProxy.invoke(<wbr>BufferedResultsProxy.java:262)
[connector-framework-internal-<wbr>1.4.3.0-SNAPSHOT.jar:na]</div>
<div> at org.identityconnectors.<wbr>framework.impl.api.<wbr>DelegatingTimeoutProxy.invoke(<wbr>DelegatingTimeoutProxy.java:<wbr>94)
[connector-framework-internal-<wbr>1.4.3.0-SNAPSHOT.jar:na]</div>
<div> at com.sun.proxy.$Proxy169.<wbr>search(Unknown
Source) [na:na]</div>
<div> at sun.reflect.<wbr>NativeMethodAccessorImpl.<wbr>invoke0(Native
Method) ~[na:1.8.0_101]</div>
<div> at sun.reflect.<wbr>NativeMethodAccessorImpl.<wbr>invoke(<wbr>NativeMethodAccessorImpl.java:<wbr>62)
~[na:1.8.0_101]</div>
<div> at sun.reflect.<wbr>DelegatingMethodAccessorImpl.<wbr>invoke(<wbr>DelegatingMethodAccessorImpl.<wbr>java:43)
~[na:1.8.0_101]</div>
<div> at java.lang.reflect.Method.<wbr>invoke(Method.java:498)
~[na:1.8.0_101]</div>
<div> at org.identityconnectors.<wbr>framework.impl.api.<wbr>LoggingProxy.invoke(<wbr>LoggingProxy.java:83)
[connector-framework-internal-<wbr>1.4.3.0-SNAPSHOT.jar:na]</div>
<div> at com.sun.proxy.$Proxy169.<wbr>search(Unknown
Source) [na:na]</div>
<div> at org.identityconnectors.<wbr>framework.impl.api.<wbr>AbstractConnectorFacade.<wbr>search(<wbr>AbstractConnectorFacade.java:<wbr>177)
[connector-framework-internal-<wbr>1.4.3.0-SNAPSHOT.jar:na]</div>
<div> at com.evolveum.midpoint.<wbr>provisioning.ucf.impl.<wbr>ConnectorInstanceIcfImpl.<wbr>search(<wbr>ConnectorInstanceIcfImpl.java:<wbr>2412)
[provisioning-impl-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.<wbr>provisioning.impl.<wbr>ResourceObjectConverter.<wbr>searchResourceObjects(<wbr>ResourceObjectConverter.java:<wbr>1112)
[provisioning-impl-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.<wbr>provisioning.impl.ShadowCache.<wbr>searchObjectsIterative(<wbr>ShadowCache.java:838)
[provisioning-impl-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.<wbr>provisioning.impl.ShadowCache.<wbr>searchObjectsIterative(<wbr>ShadowCache.java:763)
[provisioning-impl-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.<wbr>provisioning.impl.<wbr>ProvisioningServiceImpl.<wbr>searchObjectsIterative(<wbr>ProvisioningServiceImpl.java:<wbr>1232)
[provisioning-impl-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.model.<wbr>impl.ModelObjectResolver.<wbr>searchIterative(<wbr>ModelObjectResolver.java:224)
[model-impl-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.model.<wbr>impl.util.<wbr>AbstractSearchIterativeTaskHan<wbr>dler.runInternal(<wbr>AbstractSearchIterativeTaskHan<wbr>dler.java:239)
[model-impl-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.model.<wbr>impl.util.<wbr>AbstractSearchIterativeTaskHan<wbr>dler.run(<wbr>AbstractSearchIterativeTaskHan<wbr>dler.java:155)
[model-impl-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.task.<wbr>quartzimpl.execution.<wbr>JobExecutor.executeHandler(<wbr>JobExecutor.java:479)
[task-quartz-impl-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.task.<wbr>quartzimpl.execution.<wbr>JobExecutor.executeSingleTask(<wbr>JobExecutor.java:300)
[task-quartz-impl-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.task.<wbr>quartzimpl.execution.<wbr>JobExecutor.execute(<wbr>JobExecutor.java:164)
[task-quartz-impl-3.4.jar:na]</div>
<div> at org.quartz.core.JobRunShell.<wbr>run(JobRunShell.java:213)
[quartz-2.1.3.jar:na]</div>
<div> at org.quartz.simpl.<wbr>SimpleThreadPool$WorkerThread.<wbr>run(SimpleThreadPool.java:557)
[quartz-2.1.3.jar:na]</div>
<div>Caused by: com.evolveum.midpoint.util.<wbr>exception.<wbr>ExpressionEvaluationException:
groovy.lang.<wbr>MissingMethodException:
No signature of method:
org.codehaus.groovy.jsr223.<wbr>GroovyScriptEngineImpl.<wbr>XMLGregorianCalendar()
is applicable for argument types:
(java.util.Date) values: [Sat Jan 05
00:04:00 CST 1985] expression in mapping
in inbound expression for {<a
moz-do-not-send="true"
href="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3%7Dbirthdate"
target="_blank">http://midpoint.evolveum.com/<wbr>xml/ns/public/resource/<wbr>instance-3}birthdate</a>
in <a class="moz-txt-link-freetext" href="resource:0d6babea-6896-11e6">resource:0d6babea-6896-11e6</a>-<wbr>9d38-0050569aa9d2(CSV
TEADVS)</div>
<div> at com.evolveum.midpoint.model.<wbr>common.expression.script.<wbr>jsr223.Jsr223ScriptEvaluator.<wbr>evaluate(<wbr>Jsr223ScriptEvaluator.java:<wbr>119)
~[model-common-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.model.<wbr>common.expression.script.<wbr>ScriptExpression.evaluate(<wbr>ScriptExpression.java:111)
~[model-common-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.model.<wbr>common.expression.script.<wbr>ScriptExpressionEvaluator.<wbr>transformSingleValue(<wbr>ScriptExpressionEvaluator.<wbr>java:60)
~[model-common-3.4.jar:na]</div>
<div> at com.evolveum.midpoint.model.<wbr>common.expression.evaluator.<wbr>AbstractValueTransformationExp<wbr>ressionEvaluator$1.process(<wbr>AbstractValueTransformationExp<wbr>ressionEvaluator.java:422)
~[model-common-3.4.jar:na]</div>
<div> ... 55 common frames omitted</div>
<div>Caused by:
javax.script.ScriptException: groovy.lang.<wbr>MissingMethodException:
No signature of method:
org.codehaus.groovy.jsr223.<wbr>GroovyScriptEngineImpl.<wbr>XMLGregorianCalendar()
is applicable for argument types:
(java.util.Date) values: [Sat Jan 05
00:04:00 CST 1985]</div>
<div> at org.codehaus.groovy.jsr223.<wbr>GroovyScriptEngineImpl.eval(<wbr>GroovyScriptEngineImpl.java:<wbr>347)
~[groovy-all-2.4.0.jar:2.4.0]</div>
<div> at org.codehaus.groovy.jsr223.<wbr>GroovyCompiledScript.eval(<wbr>GroovyCompiledScript.java:41)
~[groovy-all-2.4.0.jar:2.4.0]</div>
<div> at javax.script.CompiledScript.<wbr>eval(CompiledScript.java:92)
~[na:1.8.0_101]</div>
<div> at com.evolveum.midpoint.model.<wbr>common.expression.script.<wbr>jsr223.Jsr223ScriptEvaluator.<wbr>evaluate(<wbr>Jsr223ScriptEvaluator.java:<wbr>117)
~[model-common-3.4.jar:na]</div>
<div> ... 58 common frames omitted</div>
<div>Caused by: groovy.lang.<wbr>MissingMethodException:
No signature of method:
org.codehaus.groovy.jsr223.<wbr>GroovyScriptEngineImpl.<wbr>XMLGregorianCalendar()
is applicable for argument types:
(java.util.Date) values: [Sat Jan 05
00:04:00 CST 1985]</div>
<div> at org.codehaus.groovy.jsr223.<wbr>GroovyScriptEngineImpl.<wbr>callGlobal(<wbr>GroovyScriptEngineImpl.java:<wbr>418)
~[groovy-all-2.4.0.jar:2.4.0]</div>
<div> at org.codehaus.groovy.jsr223.<wbr>GroovyScriptEngineImpl.access$<wbr>000(GroovyScriptEngineImpl.<wbr>java:89)
~[groovy-all-2.4.0.jar:2.4.0]</div>
<div> at org.codehaus.groovy.jsr223.<wbr>GroovyScriptEngineImpl$2.<wbr>invokeMethod(<wbr>GroovyScriptEngineImpl.java:<wbr>330)
~[groovy-all-2.4.0.jar:2.4.0]</div>
<div> at org.codehaus.groovy.runtime.<wbr>callsite.PogoMetaClassSite.<wbr>callCurrent(PogoMetaClassSite.<wbr>java:66)
~[groovy-all-2.4.0.jar:2.4.0]</div>
<div> at org.codehaus.groovy.runtime.<wbr>callsite.CallSiteArray.<wbr>defaultCallCurrent(<wbr>CallSiteArray.java:49)
~[groovy-all-2.4.0.jar:2.4.0]</div>
<div> at org.codehaus.groovy.runtime.<wbr>callsite.PogoMetaClassSite.<wbr>callCurrent(PogoMetaClassSite.<wbr>java:81)
~[groovy-all-2.4.0.jar:2.4.0]</div>
<div> at org.codehaus.groovy.runtime.<wbr>callsite.AbstractCallSite.<wbr>callCurrent(AbstractCallSite.<wbr>java:161)
~[groovy-all-2.4.0.jar:2.4.0]</div>
<div> at
Script23.run(Script23.groovy:<wbr>2)
~[na:na]</div>
<div> at org.codehaus.groovy.jsr223.<wbr>GroovyScriptEngineImpl.eval(<wbr>GroovyScriptEngineImpl.java:<wbr>344)
~[groovy-all-2.4.0.jar:2.4.0]</div>
<div> ... 61 common frames omitted</div>
</span></div>
<div><span
style="font-family:arial,helvetica,sans-serif"
face="arial, helvetica, sans-serif"><br>
</span></div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Aug 23, 2016 at
1:08 PM, Pavol Mederly <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:mederly@evolveum.com"
target="_blank">mederly@evolveum.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px
#ccc solid;padding-left:1ex">
<div>
<p>Matt,</p>
<p>maybe you could try this:</p>
<p>com.evolveum.midpoint.prism.<wbr>xml.<wbr>createXMLGregorianCalendar(d)</p>
<p>where d is a java.util.Date object.</p>
<p>See <a moz-do-not-send="true"
href="https://github.com/Evolveum/midpoint/blob/master/infra/prism/src/main/java/com/evolveum/midpoint/prism/xml/XmlTypeConverter.java#L450"
target="_blank">https://github.com/Evolveum/<wbr>midpoint/blob/master/infra/<wbr>prism/src/main/java/com/<wbr>evolveum/midpoint/prism/xml/<wbr>XmlTypeConverter.java#L450</a><br>
</p>
<span>
<pre>Pavol Mederly
Software developer
<a moz-do-not-send="true" href="http://evolveum.com" target="_blank">evolveum.com</a>
</pre>
</span>
<div>
<div>
<div>On 23.08.2016 19:52, Mencel, Matt
wrote:<br>
</div>
<blockquote>
<div dir="ltr">Ah so now it's
getting a bit crazy. Apparently I
have to convert it to an
XMLGregorianCalendar type to put
something in a dateTime attribute.
<div><br>
</div>
<div>This is probably not the
right way, but when I tried this
Groovy couldn't find the
XMLGregorianCalendar class.</div>
<div><br>
</div>
<attribute><br>
<ref>ri:birthdate</ref><br>
<displayName>DOB</displayName><br>
<inbound><br>
<target><br>
<path>$user/extension/<wbr>birthDate</path><br>
</target><br>
<expression><br>
<script><br>
<language><a
moz-do-not-send="true"
href="http://midpoint.evolveum.com/xml/ns/public/expression/language#Groovy"
target="_blank">http://midpoint.<wbr>evolveum.com/xml/ns/public/<wbr>expression/language#Groovy</a></<wbr>language><br>
<code><br>
<!--
Date.parse('yyyymmdd', input)
--><br>
GregorianCalendar c = new
GregorianCalendar();
c.setTime(input);
XMLGregorianCalendar date2 =
DatatypeFactory.newInstance().<wbr>newXMLGregorianCalendar(c);<br>
</code><br>
</script><br>
</expression><br>
</inbound><br>
</attribute>
<div><br>
</div>
<div>So is everyone just storing
dates as strings in Midpoint?</div>
<div><br>
</div>
<div>Matt</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue,
Aug 23, 2016 at 12:24 PM, Pavol
Mederly <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:mederly@evolveum.com"
target="_blank">mederly@evolveum.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote">
<div>
<p>That's the usual process
;)</p>
<p>It seems that midPoint
doesn't support xsd:date,
only xsd:dateTime.</p>
<span>
<p>Best regards,</p>
<pre>Pavol Mederly
Software developer
<a moz-do-not-send="true" href="http://evolveum.com" target="_blank">evolveum.com</a>
</pre>
</span>
<div>
<div>
<div>On 23.08.2016
19:20, Mencel, Matt
wrote:<br>
</div>
<blockquote>
<div dir="ltr">OK,
that changed the
error at least. :)
<div><br>
</div>
<div>2016-08-23
12:17:19,231 []
[midPointScheduler_Worker-6]
ERROR
(com.evolveum.midpoint.model.<wbr>impl.util.<wbr>AbstractSearchIterativeResultH<wbr>andler):
Import of object
shadow:4c7c2ce9-9041-46da-<wbr>b8c3-a57be022ce18(902073705)
from <a
moz-do-not-send="true">resource:0d6babea-6896-11e6-<wbr>9d38-0050569aa9d2(CSV</a>
TEADVS) failed:
java.lang.RuntimeException:
No type mapping
for XSD type {<a
moz-do-not-send="true"
href="http://www.w3.org/2001/XMLSchema%7Ddate%28%7B.../common/common-3%7Dinput=PPV%28String:19850405%29"
target="_blank">http://www.w3.org/2001/<wbr>XMLSchema}date({.../common/<wbr>common-3}input=PPV(String:<wbr>19850405)</a>;
) in expression in
mapping in inbound
expression for {<a
moz-do-not-send="true"
href="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3%7Dbirthdate"
target="_blank">http://midpoint.evolveum.com/<wbr>xml/ns/public/resource/<wbr>instance-3}birthdate</a>
in <a
moz-do-not-send="true">resource:0d6babea-6896-11e6-<wbr>9d38-0050569aa9d2(CSV</a>
TEADVS)</div>
<div>com.evolveum.midpoint.util.<wbr>exception.SystemException:
java.lang.RuntimeException: No type mapping for XSD type {<a
moz-do-not-send="true"
href="http://www.w3.org/2001/XMLSchema%7Ddate%28%7B.../common/common-3%7Dinput=PPV%28String:19850405%29"
target="_blank">http://www.w3.org/2001/<wbr>XMLSchema}date({.../common/<wbr>common-3}input=PPV(String:<wbr>19850405)</a>;
) in expression in
mapping in inbound
expression for {<a
moz-do-not-send="true"
href="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3%7Dbirthdate"
target="_blank">http://midpoint.evolveum.com/<wbr>xml/ns/public/resource/<wbr>instance-3}birthdate</a>
in <a
moz-do-not-send="true">resource:0d6babea-6896-11e6-<wbr>9d38-0050569aa9d2(CSV</a>
TEADVS)</div>
<div> at <a
moz-do-not-send="true" href="http://com.evolveum.midpoint.model.im"
target="_blank">com.evolveum.midpoint.model.im</a><wbr>pl.sync.<wbr>SynchronizationServiceImpl.<wbr>notifyChange(<wbr>SynchronizationServiceImpl.<wbr>java:316)
~[model-impl-3.4.jar:na]</div>
<div> at
com.evolveum.midpoint.<wbr>provisioning.impl.<wbr>ChangeNotificationDispatcherIm<wbr>pl.notifyChange(<wbr>ChangeNotificationDispatcherIm<wbr>pl.java:148)
~[provisioning-impl-3.4.jar:<wbr>na]</div>
<div> at <a
moz-do-not-send="true" href="http://com.evolveum.midpoint.model.im"
target="_blank">com.evolveum.midpoint.model.im</a><wbr>pl.sync.<wbr>SynchronizeAccountResultHandle<wbr>r.handleObjectInternal(<wbr>SynchronizeAccountResultHandle<wbr>r.java:203)
~[model-impl-3.4.jar:na]</div>
<div> at <a
moz-do-not-send="true" href="http://com.evolveum.midpoint.model.im"
target="_blank">com.evolveum.midpoint.model.im</a><wbr>pl.sync.<wbr>SynchronizeAccountResultHandle<wbr>r.handleObject(<wbr>SynchronizeAccountResultHandle<wbr>r.java:128)
~[model-impl-3.4.jar:na]</div>
<div> at <a
moz-do-not-send="true" href="http://com.evolveum.midpoint.model.im"
target="_blank">com.evolveum.midpoint.model.im</a><wbr>pl.util.<wbr>AbstractSearchIterativeResultH<wbr>andler.processRequest(<wbr>AbstractSearchIterativeResultH<wbr>andler.java:327)
[model-impl-3.4.jar:na]</div>
<div> at <a
moz-do-not-send="true" href="http://com.evolveum.midpoint.model.im"
target="_blank">com.evolveum.midpoint.model.im</a><wbr>pl.util.<wbr>AbstractSearchIterativeResultH<wbr>andler.handle(<wbr>AbstractSearchIterativeResultH<wbr>andler.java:189)
[model-impl-3.4.jar:na]</div>
<div> at
com.evolveum.midpoint.<wbr>provisioning.impl.<wbr>ProvisioningServiceImpl$4.<wbr>handle(<wbr>ProvisioningServiceImpl.java:<wbr>1184)
[provisioning-impl-3.4.jar:na]</div>
<div> at
com.evolveum.midpoint.<wbr>provisioning.impl.ShadowCache$<wbr>2.handle(ShadowCache.java:831)
[provisioning-impl-3.4.jar:na]</div>
<div> at
com.evolveum.midpoint.<wbr>provisioning.impl.<wbr>ResourceObjectConverter$3.<wbr>handle(<wbr>ResourceObjectConverter.java:<wbr>1102)
[provisioning-impl-3.4.jar:na]</div>
<div> at
com.evolveum.midpoint.<wbr>provisioning.ucf.impl.<wbr>ConnectorInstanceIcfImpl$2.<wbr>handle(<wbr>ConnectorInstanceIcfImpl.java:<wbr>2316)
[provisioning-impl-3.4.jar:na]</div>
<div> at
org.identityconnectors.<wbr>framework.impl.api.<wbr>SearchResultsHandlerLoggingPro<wbr>xy.handle(<wbr>SearchResultsHandlerLoggingPro<wbr>xy.java:64)
[connector-framework-internal-<wbr>1.4.3.0-SNAPSHOT.jar:na]</div>
<div> at
org.identityconnectors.<wbr>framework.impl.api.<wbr>StreamHandlerUtil$<wbr>ObjectStreamHandlerAdapter.<wbr>handle(StreamHandlerUtil.java:<wbr>101)
[connector-framework-internal-<wbr>1.4.3.0-SNAPSHOT.jar:na]</div>
<div> at
org.identityconnectors.<wbr>framework.impl.api.<wbr>BufferedResultsProxy.invoke(<wbr>BufferedResultsProxy.java:262)
[connector-framework-internal-<wbr>1.4.3.0-SNAPSHOT.jar:na]</div>
<div> at
org.identityconnectors.<wbr>framework.impl.api.<wbr>DelegatingTimeoutProxy.invoke(<wbr>DelegatingTimeoutProxy.java:<wbr>94)
[connector-framework-internal-<wbr>1.4.3.0-SNAPSHOT.jar:na]</div>
<div> at
com.sun.proxy.$Proxy170.<wbr>search(Unknown
Source) [na:na]</div>
<div> at
sun.reflect.<wbr>NativeMethodAccessorImpl.<wbr>invoke0(Native
Method)
~[na:1.8.0_101]</div>
<div> at
sun.reflect.<wbr>NativeMethodAccessorImpl.<wbr>invoke(<wbr>NativeMethodAccessorImpl.java:<wbr>62)
~[na:1.8.0_101]</div>
<div> at
sun.reflect.<wbr>DelegatingMethodAccessorImpl.<wbr>invoke(<wbr>DelegatingMethodAccessorImpl.<wbr>java:43)
~[na:1.8.0_101]</div>
<div> at
java.lang.reflect.Method.<wbr>invoke(Method.java:498)
~[na:1.8.0_101]</div>
<div> at
org.identityconnectors.<wbr>framework.impl.api.<wbr>LoggingProxy.invoke(<wbr>LoggingProxy.java:83)
[connector-framework-internal-<wbr>1.4.3.0-SNAPSHOT.jar:na]</div>
<div> at
com.sun.proxy.$Proxy170.<wbr>search(Unknown
Source) [na:na]</div>
<div> at
org.identityconnectors.<wbr>framework.impl.api.<wbr>AbstractConnectorFacade.<wbr>search(<wbr>AbstractConnectorFacade.java:<wbr>177)
[connector-framework-internal-<wbr>1.4.3.0-SNAPSHOT.jar:na]</div>
<div> at
com.evolveum.midpoint.<wbr>provisioning.ucf.impl.<wbr>ConnectorInstanceIcfImpl.<wbr>search(<wbr>ConnectorInstanceIcfImpl.java:<wbr>2412)
[provisioning-impl-3.4.jar:na]</div>
<div> at
com.evolveum.midpoint.<wbr>provisioning.impl.<wbr>ResourceObjectConverter.<wbr>searchResourceObjects(<wbr>ResourceObjectConverter.java:<wbr>1112)
[provisioning-impl-3.4.jar:na]</div>
<div> at
com.evolveum.midpoint.<wbr>provisioning.impl.ShadowCache.<wbr>searchObjectsIterative(<wbr>ShadowCache.java:838)
[provisioning-impl-3.4.jar:na]</div>
<div> at
com.evolveum.midpoint.<wbr>provisioning.impl.ShadowCache.<wbr>searchObjectsIterative(<wbr>ShadowCache.java:763)
[provisioning-impl-3.4.jar:na]</div>
<div> at
com.evolveum.midpoint.<wbr>provisioning.impl.<wbr>ProvisioningServiceImpl.<wbr>searchObjectsIterative(<wbr>ProvisioningServiceImpl.java:<wbr>1232)
[provisioning-impl-3.4.jar:na]</div>
<div> at <a
moz-do-not-send="true" href="http://com.evolveum.midpoint.model.im"
target="_blank">com.evolveum.midpoint.model.im</a><wbr>pl.ModelObjectResolver.<wbr>searchIterative(<wbr>ModelObjectResolver.java:224)
[model-impl-3.4.jar:na]</div>
<div> at <a
moz-do-not-send="true" href="http://com.evolveum.midpoint.model.im"
target="_blank">com.evolveum.midpoint.model.im</a><wbr>pl.util.<wbr>AbstractSearchIterativeTaskHan<wbr>dler.runInternal(<wbr>AbstractSearchIterativeTaskHan<wbr>dler.java:239)
[model-impl-3.4.jar:na]</div>
<div> at <a
moz-do-not-send="true" href="http://com.evolveum.midpoint.model.im"
target="_blank">com.evolveum.midpoint.model.im</a><wbr>pl.util.<wbr>AbstractSearchIterativeTaskHan<wbr>dler.run(<wbr>AbstractSearchIterativeTaskHan<wbr>dler.java:155)
[model-impl-3.4.jar:na]</div>
<div> at
com.evolveum.midpoint.task.<wbr>quartzimpl.execution.<wbr>JobExecutor.executeHandler(<wbr>JobExecutor.java:479)
[task-quartz-impl-3.4.jar:na]</div>
<div> at
com.evolveum.midpoint.task.<wbr>quartzimpl.execution.<wbr>JobExecutor.executeSingleTask(<wbr>JobExecutor.java:300)
[task-quartz-impl-3.4.jar:na]</div>
<div> at
com.evolveum.midpoint.task.<wbr>quartzimpl.execution.<wbr>JobExecutor.execute(<wbr>JobExecutor.java:164)
[task-quartz-impl-3.4.jar:na]</div>
<div> at <a
moz-do-not-send="true" href="http://org.quartz.core.JobRunShell.ru"
target="_blank">org.quartz.core.JobRunShell.ru</a><wbr>n(JobRunShell.java:213)
[quartz-2.1.3.jar:na]</div>
<div> at
org.quartz.simpl.<wbr>SimpleThreadPool$WorkerThread.<wbr>run(SimpleThreadPool.java:557)
[quartz-2.1.3.jar:na]</div>
<div>Caused by:
java.lang.RuntimeException:
No type mapping
for XSD type {<a
moz-do-not-send="true"
href="http://www.w3.org/2001/XMLSchema%7Ddate%28%7B.../common/common-3%7Dinput=PPV%28String:19850405%29"
target="_blank">http://www.w3.org/2001/<wbr>XMLSchema}date({.../common/<wbr>common-3}input=PPV(String:<wbr>19850405)</a>;
) in expression in
mapping in inbound
expression for {<a
moz-do-not-send="true"
href="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3%7Dbirthdate"
target="_blank">http://midpoint.evolveum.com/<wbr>xml/ns/public/resource/<wbr>instance-3}birthdate</a>
in <a
moz-do-not-send="true">resource:0d6babea-6896-11e6-<wbr>9d38-0050569aa9d2(CSV</a>
TEADVS)</div>
<div> at <a
moz-do-not-send="true" href="http://com.evolveum.midpoint.model.co"
target="_blank">com.evolveum.midpoint.model.co</a><wbr>mmon.expression.evaluator.<wbr>AbstractValueTransformationExp<wbr>ressionEvaluator$1.process(<wbr>AbstractValueTransformationExp<wbr>ressionEvaluator.java:434)
~[model-common-3.4.jar:na]</div>
<div> at <a
moz-do-not-send="true" href="http://com.evolveum.midpoint.model.co"
target="_blank">com.evolveum.midpoint.model.co</a><wbr>mmon.expression.evaluator.<wbr>AbstractValueTransformationExp<wbr>ressionEvaluator$1.process(<wbr>AbstractValueTransformationExp<wbr>ressionEvaluator.java:352)
~[model-common-3.4.jar:na]</div>
<div> at
com.evolveum.midpoint.util.<wbr>MiscUtil.carthesian(MiscUtil.<wbr>java:367)
~[util-3.4.jar:na]</div>
<div> at
com.evolveum.midpoint.util.<wbr>MiscUtil.carthesian(MiscUtil.<wbr>java:357)
~[util-3.4.jar:na]</div>
<div> at <a
moz-do-not-send="true" href="http://com.evolveum.midpoint.model.co"
target="_blank">com.evolveum.midpoint.model.co</a><wbr>mmon.expression.evaluator.<wbr>AbstractValueTransformationExp<wbr>ressionEvaluator.<wbr>evaluateRelativeExpression(<wbr>AbstractValueTransformationExp<wbr>ressionEvaluator.java:442)
~[model-common-3.4.jar:na]</div>
<div> at <a
moz-do-not-send="true" href="http://com.evolveum.midpoint.model.co"
target="_blank">com.evolveum.midpoint.model.co</a><wbr>mmon.expression.evaluator.<wbr>AbstractValueTransformationExp<wbr>ressionEvaluator.evaluate(<wbr>AbstractValueTransformationExp<wbr>ressionEvaluator.java:114)
~[model-common-3.4.jar:na]</div>
<div> at <a
moz-do-not-send="true" href="http://com.evolveum.midpoint.model.co"
target="_blank">com.evolveum.midpoint.model.co</a><wbr>mmon.expression.Expression.<wbr>evaluate(Expression.java:133)
~[model-common-3.4.jar:na]</div>
<div> at <a
moz-do-not-send="true" href="http://com.evolveum.midpoint.model.co"
target="_blank">com.evolveum.midpoint.model.co</a><wbr>mmon.mapping.Mapping.<wbr>evaluateExpression(Mapping.<wbr>java:985)
~[model-common-3.4.jar:na]</div>
<div> at <a
moz-do-not-send="true" href="http://com.evolveum.midpoint.model.co"
target="_blank">com.evolveum.midpoint.model.co</a><wbr>mmon.mapping.Mapping.evaluate(<wbr>Mapping.java:520)
~[model-common-3.4.jar:na]</div>
<div> at <a
moz-do-not-send="true" href="http://com.evolveum.midpoint.model.im"
target="_blank">com.evolveum.midpoint.model.im</a><wbr>pl.lens.projector.<wbr>MappingEvaluator.<wbr>evaluateMapping(<wbr>MappingEvaluator.java:95)
~[model-impl-3.4.jar:na]</div>
<div> at <a
moz-do-not-send="true" href="http://com.evolveum.midpoint.model.im"
target="_blank">com.evolveum.midpoint.model.im</a><wbr>pl.lens.projector.<wbr>InboundProcessor.<wbr>evaluateInboundMapping(<wbr>InboundProcessor.java:490)
~[model-impl-3.4.jar:na]</div>
<div> at <a
moz-do-not-send="true" href="http://com.evolveum.midpoint.model.im"
target="_blank">com.evolveum.midpoint.model.im</a><wbr>pl.lens.projector.<wbr>InboundProcessor.<wbr>processInboundExpressionsForPr<wbr>ojection(InboundProcessor.<wbr>java:319)
~[model-impl-3.4.jar:na]</div>
<div> at <a
moz-do-not-send="true" href="http://com.evolveum.midpoint.model.im"
target="_blank">com.evolveum.midpoint.model.im</a><wbr>pl.lens.projector.<wbr>InboundProcessor.<wbr>processInboundFocal(<wbr>InboundProcessor.java:186)
~[model-impl-3.4.jar:na]</div>
<div> at <a
moz-do-not-send="true" href="http://com.evolveum.midpoint.model.im"
target="_blank">com.evolveum.midpoint.model.im</a><wbr>pl.lens.projector.<wbr>InboundProcessor.<wbr>processInbound(<wbr>InboundProcessor.java:128)
~[model-impl-3.4.jar:na]</div>
<div> at <a
moz-do-not-send="true" href="http://com.evolveum.midpoint.model.im"
target="_blank">com.evolveum.midpoint.model.im</a><wbr>pl.lens.projector.<wbr>FocusProcessor.<wbr>processFocusFocus(<wbr>FocusProcessor.java:212)
~[model-impl-3.4.jar:na]</div>
<div> at <a
moz-do-not-send="true" href="http://com.evolveum.midpoint.model.im"
target="_blank">com.evolveum.midpoint.model.im</a><wbr>pl.lens.projector.<wbr>FocusProcessor.processFocus(<wbr>FocusProcessor.java:146)
~[model-impl-3.4.jar:na]</div>
<div> at <a
moz-do-not-send="true" href="http://com.evolveum.midpoint.model.im"
target="_blank">com.evolveum.midpoint.model.im</a><a
moz-do-not-send="true" href="http://pl.lens.projector.Projector.pr"
target="_blank"><wbr>pl.lens.projector.Projector.pr</a><wbr>ojectInternal(Projector.java:<wbr>208)
~[model-impl-3.4.jar:na]</div>
<div> at <a
moz-do-not-send="true" href="http://com.evolveum.midpoint.model.im"
target="_blank">com.evolveum.midpoint.model.im</a><a
moz-do-not-send="true" href="http://pl.lens.projector.Projector.pr"
target="_blank"><wbr>pl.lens.projector.Projector.pr</a><wbr>oject(Projector.java:106)
~[model-impl-3.4.jar:na]</div>
<div> at <a
moz-do-not-send="true" href="http://com.evolveum.midpoint.model.im"
target="_blank">com.evolveum.midpoint.model.im</a><wbr>pl.lens.Clockwork.click(<wbr>Clockwork.java:302)
~[model-impl-3.4.jar:na]</div>
<div> at <a
moz-do-not-send="true" href="http://com.evolveum.midpoint.model.im"
target="_blank">com.evolveum.midpoint.model.im</a><wbr>pl.lens.Clockwork.run(<wbr>Clockwork.java:214)
~[model-impl-3.4.jar:na]</div>
<div> at <a
moz-do-not-send="true" href="http://com.evolveum.midpoint.model.im"
target="_blank">com.evolveum.midpoint.model.im</a><wbr>pl.sync.<wbr>SynchronizationServiceImpl.<wbr>reactToChange(<wbr>SynchronizationServiceImpl.<wbr>java:766)
~[model-impl-3.4.jar:na]</div>
<div> at <a
moz-do-not-send="true" href="http://com.evolveum.midpoint.model.im"
target="_blank">com.evolveum.midpoint.model.im</a><wbr>pl.sync.<wbr>SynchronizationServiceImpl.<wbr>notifyChange(<wbr>SynchronizationServiceImpl.<wbr>java:299)
~[model-impl-3.4.jar:na]</div>
<div> ... 34
common frames
omitted</div>
<div>Caused by:
java.lang.<wbr>IllegalArgumentException:
No type mapping
for XSD type {<a
moz-do-not-send="true"
href="http://www.w3.org/2001/XMLSchema%7Ddate" target="_blank">http://www.w3.org/2001/<wbr>XMLSchema}date</a><br>
</div>
<div> at
com.evolveum.midpoint.prism.<wbr>xml.XsdTypeMapper.toJavaType(<wbr>XsdTypeMapper.java:184)
~[prism-3.4.jar:na]</div>
<div> at
com.evolveum.midpoint.prism.<wbr>xml.XsdTypeMapper.toJavaType(<wbr>XsdTypeMapper.java:173)
~[prism-3.4.jar:na]</div>
<div> at <a
moz-do-not-send="true" href="http://com.evolveum.midpoint.model.co"
target="_blank">com.evolveum.midpoint.model.co</a><wbr>mmon.expression.script.jsr223.<wbr>Jsr223ScriptEvaluator.<wbr>evaluate(<wbr>Jsr223ScriptEvaluator.java:<wbr>129)
~[model-common-3.4.jar:na]</div>
<div> at <a
moz-do-not-send="true" href="http://com.evolveum.midpoint.model.co"
target="_blank">com.evolveum.midpoint.model.co</a><wbr>mmon.expression.script.<wbr>ScriptExpression.evaluate(<wbr>ScriptExpression.java:111)
~[model-common-3.4.jar:na]</div>
<div> at <a
moz-do-not-send="true" href="http://com.evolveum.midpoint.model.co"
target="_blank">com.evolveum.midpoint.model.co</a><wbr>mmon.expression.script.<wbr>ScriptExpressionEvaluator.<wbr>transformSingleValue(<wbr>ScriptExpressionEvaluator.<wbr>java:60)
~[model-common-3.4.jar:na]</div>
<div> at <a
moz-do-not-send="true" href="http://com.evolveum.midpoint.model.co"
target="_blank">com.evolveum.midpoint.model.co</a><wbr>mmon.expression.evaluator.<wbr>AbstractValueTransformationExp<wbr>ressionEvaluator$1.process(<wbr>AbstractValueTransformationExp<wbr>ressionEvaluator.java:422)
~[model-common-3.4.jar:na]</div>
<div> ... 55
common frames
omitted</div>
</div>
<div
class="gmail_extra"><br>
<div
class="gmail_quote">On
Tue, Aug 23, 2016
at 12:14 PM, Pavol
Mederly <span
dir="ltr"><<a
moz-do-not-send="true" href="mailto:mederly@evolveum.com"
target="_blank">mederly@evolveum.com</a>></span>
wrote:<br>
<blockquote
class="gmail_quote">
<div>
<p>Hello Matt,</p>
<p>I assume
you get
something like
"unknown
variable
'birthdate'"
exception.
When creating
inbound
mappings, you
refer to the
incoming value
(from the
resource) via
"input"
variable.</p>
<p>So your
line should be
something like
Date.parse(..., input).</p>
<p>Best
regards,<br>
</p>
<pre>Pavol Mederly
Software developer
<a moz-do-not-send="true" href="http://evolveum.com" target="_blank">evolveum.com</a>
</pre>
<div>
<div>
<div>On
23.08.2016
19:10, Mencel,
Matt wrote:<br>
</div>
</div>
</div>
<blockquote>
<div>
<div>
<div dir="ltr">So
in my CSV I
have a
birthday field
stored as a
string value
like so...
'20160822'.
I've created a
DOB field in
my custom
schema of type
date...
<div><br>
</div>
<div>
<div>
<xsd:element
name="birthDate" type="xsd:date" minOccurs="0" maxOccurs="1"></div>
<div>
<xsd:annotation></div>
<div>
<xsd:appinfo></div>
<div>
<a:indexed>false</a:indexed></div>
<div>
<a:displayName>DOB</a:<wbr>displayName></div>
<div>
<a:displayOrder>130</a:<wbr>displayOrder></div>
<div>
</xsd:appinfo></div>
<div>
</xsd:annotation></div>
<div>
</xsd:element></div>
</div>
<div><br>
</div>
<div>and am
trying to
parse the
string to the
date field
using the
following in
my
mapping...which
doesn't work
at the moment.</div>
<div><br>
</div>
<attribute><br>
<ref>ri:birthdate</ref><br>
<displayName>DOB</displayName><br>
<inbound><br>
<target><br>
<path>$user/extension/<wbr>birthDate</path><br>
</target><br>
<expression><br>
<script><br>
<language><a moz-do-not-send="true"
href="http://midpoint.evolveum.com/xml/ns/public/expression/language#Groovy"
target="_blank">http://midpoint.<wbr>evolveum.com/xml/ns/public/<wbr>expression/language#Groovy</a></<wbr>language><br>
<code><br>
Date.parse('yyyymmdd',
birthdate)<br>
</code><br>
</script><br>
</expression><br>
</inbound><br>
</attribute>
<div><br>
</div>
<div>Do I need
to do the
script in the
user object
template
instead?</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Matt</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div>
</div>
<pre>______________________________<wbr>_________________
midPoint mailing list
<a moz-do-not-send="true" href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>
<a moz-do-not-send="true" href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">http://lists.evolveum.com/<wbr>mailman/listinfo/midpoint</a>
</pre>
</blockquote>
</div>
______________________________<wbr>_________________
midPoint mailing list
<a moz-do-not-send="true" href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>
<a moz-do-not-send="true" href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">http://lists.evolveum.com/<wbr>mailman/listinfo/midpoint</a>
</blockquote></div>
</div>
<fieldset></fieldset>
<pre>______________________________<wbr>_________________
midPoint mailing list
<a moz-do-not-send="true" href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>
<a moz-do-not-send="true" href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">http://lists.evolveum.com/<wbr>mailman/listinfo/midpoint</a>
</pre>
</blockquote>
</div></div></div>
______________________________<wbr>_________________
midPoint mailing list
<a moz-do-not-send="true" href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>
<a moz-do-not-send="true" href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">http://lists.evolveum.com/<wbr>mailman/listinfo/midpoint</a>
</blockquote></div>
</div>
<fieldset></fieldset>
<pre>______________________________<wbr>_________________
midPoint mailing list
<a moz-do-not-send="true" href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>
<a moz-do-not-send="true" href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">http://lists.evolveum.com/<wbr>mailman/listinfo/midpoint</a>
</pre>
</blockquote>
</div></div></div>
______________________________<wbr>_________________
midPoint mailing list
<a moz-do-not-send="true" href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>
<a moz-do-not-send="true" href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">http://lists.evolveum.com/<wbr>mailman/listinfo/midpoint</a>
</blockquote></div>
</div>
______________________________<wbr>_________________
midPoint mailing list
<a moz-do-not-send="true" href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>
<a moz-do-not-send="true" href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">http://lists.evolveum.com/<wbr>mailman/listinfo/midpoint</a>
</div></div></blockquote><span class="HOEnZb"><font color="#888888"><div>
</div><div>
</div><div>--
</div><div><span name="x"></span>Ivan Noris
Senior Identity Engineer
<a moz-do-not-send="true" href="http://evolveum.com" target="_blank">evolveum.com</a><span name="x"></span>
</div></font></span></div></div>
______________________________<wbr>_________________
midPoint mailing list
<a moz-do-not-send="true" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a moz-do-not-send="true" href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">http://lists.evolveum.com/<wbr>mailman/listinfo/midpoint</a>
</blockquote></div>
</div>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre wrap="">_______________________________________________
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>
</body></html>