<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Marco,</p>
<p>I think you could try condition in correlation expression like
this:</p>
<p> <correlation><br>
<q:equal><br>
<q:path>c:employeeNumber</q:path><br>
<expression><br>
<path>$account/attributes/ri:enumber</path><br>
</expression><br>
</q:equal><br>
<condition><br>
<script><br>
<code>basic.getAttributeValue(shadow, 'enumber') !=
null</code><br>
</script><br>
</condition><br>
</correlation><br>
<br>
</p>
<p>This is a fragment from my synchronization configuration; it will
correlate users by employee numbers, but only if the enumber
attribute is not null (e.g. technical users or whatever similar,
because otherwise they would be trying to be correlated with users
in midpoint with empty employeeNumber attribute.</p>
<p>Hope this helps,</p>
<p>regards,</p>
<p>Ivan<br>
</p>
<br>
<div class="moz-cite-prefix">On 22.09.2017 16:36, Marco Benucci
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:f5096595-a8b7-fa85-f52d-3ff3ac59101c@nsr.it">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<p><font face="Roboto">Hi,</font></p>
<p><font face="Roboto">I'd like to Link to my virtual identities
only accounts that are enabled.<br>
The resource is basically a database table but i need to use
the scriptedSqlConnector to assing entitlements.</font></p>
<p><font face="Roboto">My accounts on resource have an attribute
DISABLED = true / false.</font></p>
<p><font face="Roboto">Is there a way to use correlation
expression to look only for account that have the attribute
DISABLED = false? <br>
</font></p>
<p><font face="Roboto">something like this:<br>
</font></p>
<p><font face="Roboto"><correlation><br>
<q:and><br>
<q:equal><br>
<q:path>c:name</q:path><br>
<expression><br>
<c:path>$account/attributes/CODI_USER_ID</c:path><br>
</expression><br>
</q:equal><br>
<q:equal><br>
</font><font face="Roboto"><font face="Roboto"><expression><br>
<c:path>$account/attributes/CODI_USER_ID</c:path><br>
</expression></font><br>
<q:value>False</q:value><br>
</q:equal><br>
</q:and><br>
</correlation></font></p>
<p>When I try to save this correlation I obtain the error "Could
not convert query, because query does not contain item path".<br>
<br>
Any ideas?</p>
<p>Thank you,<br>
Marco</p>
<p><br>
</p>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<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>
<br>
<pre class="moz-signature" cols="72">--
Ivan Noris
Senior Identity Engineer
evolveum.com
</pre>
</body>
</html>