[midPoint] Correlation query problem
Brad Fardig
brad.fardig at cogitogroup.com.au
Tue Mar 14 00:07:32 CET 2017
Thanks Pavol,
It is now working. I also realised that it wasn’t matching because of an issue with the DOB script, once I removed the logging and the return statement it started working.
The script now looks like:
<q:equal>
<q:path>extension/dob</q:path>
<c:expression>
<script>
<language>http://midpoint.evolveum.com/xml/ns/public/expression/language#Groovy</language>
<code>
DoB = basic.getAttributeValue(shadow, 'http://midpoint.evolveum.com/xml/ns/public/resource/instance-3', 'DoB')
(d,m,y) = DoB?.tokenize('/')
y + '-' + m + '-' + d
</code>
</script>
</c:expression>
</q:equal>
Should I not use a return statement within a script?
Regards,
Brad
From: midPoint [mailto:midpoint-bounces at lists.evolveum.com] On Behalf Of Pavol Mederly
Sent: Monday, 13 March 2017 10:26 PM
To: midpoint at lists.evolveum.com
Subject: Re: [midPoint] Correlation query problem
Hello Brad,
normIgnoreCase is OK, because givenName and lastName are so called polystrings (polymorphic strings; they have original and normalized value). And these are to be compared using polyStringNorm, polyStringOrig, polyStringStrict, normIgnoreCase, origIgnoreCase, and strictIgnoreCase rules. (Just BTW, polyStringNorm comparison is already case-insensitive, so I'd suggest using it instead of normIgnoreCase. The latter is a bit of "hack". But nevertheless, it should work.)
Your query look right to me.
I would suggest you to enable logging: TRACE for com.evolveum.midpoint.model.impl.sync.CorrelationConfirmationEvaluator.
And then have a look for entry containing:
SYNCHRONIZATION: CORRELATION: expression for results in filter
If needed, you could post it here, we'll try to help you with that.
Best regards,
Pavol Mederly
Software developer
evolveum.com
On 13.03.2017 12:21, Brad Fardig wrote:
Having some issues with a correlation query on a csv resource with midpoint 3.4
The issue is I’m not getting any linking with existing user records i.e. all records read from the CSV file are unmatched.
I need to do case insensitive string matching. I’ve tried stringIgnoreCase but receive an error. I’ve also set the http://prism.evolveum.com/xml/ns/public/matching-rule-3 namespace as mr but receive an error for mr:stringIgnoreCase as well
I’ve tried various selection from the known matching rules here: https://wiki.evolveum.com/display/midPoint/Matching+Rules
If anybody can provide any insight into what I’m not seeing/doing it will be greatly appreciated.
The query is:
<correlation>
<q:description>
match on givenName == FirstName , familyName == LastName , DoB == dob
</q:description>
<q:and>
<q:equal>
<q:matching>normIgnoreCase</q:matching>
<q:path>familyName</q:path>
<c:expression>
<c:path>$c:account/c:attributes/ri:LastName</c:path>
</c:expression>
</q:equal>
<q:equal>
<q:matching>normIgnoreCase</q:matching>
<q:path>givenName</q:path>
<c:expression>
<c:path>$c:account/c:attributes/ri:FirstName</c:path>
</c:expression>
</q:equal>
<q:equal>
<q:path>extension/dob</q:path>
<c:expression>
<script>
<language>http://midpoint.evolveum.com/xml/ns/public/expression/language#Groovy</language>
<code>
DoB = basic.getAttributeValue(shadow, 'http://midpoint.evolveum.com/xml/ns/public/resource/instance-3', 'DoB')
(d,m,y) = DoB?.tokenize('/')
db = y + '-' + m + '-' + d
log.error('The date of birth is {}', db)
return db
</code>
</script>
</c:expression>
</q:equal>
</q:and>
</correlation>
Regards
Brad
_______________________________________________
midPoint mailing list
midPoint at lists.evolveum.com <mailto:midPoint at lists.evolveum.com>
http://lists.evolveum.com/mailman/listinfo/midpoint
This email, and any attachment, is confidential and also privileged. If you have received it in error, please notify me immediately and delete it from your system along with any attachments. You should not copy or use it for any purpose, nor disclose its contents to any other person.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20170313/0a5d70a5/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4802 bytes
Desc: not available
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20170313/0a5d70a5/attachment.bin>
More information about the midPoint
mailing list