<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hi Oleg,</p>
<p>try to set <strength>strong</strength> for that
mapping. I did that.<br>
</p>
<p>Ivan<br>
</p>
<br>
<div class="moz-cite-prefix">On 12/06/2016 10:18 AM, oleg okunev
wrote:<br>
</div>
<blockquote cite="mid:1481015893.172582480@f161.i.mail.ru"
type="cite">
Thanks! it works<br>
<br>
and helps with my question.<br>
i think it will be helpfull for you <br>
<br>
for test i used this code<br>
<br>
<p><mapping><br>
<source><br>
<c:path>$user/description</c:path><br>
</source><br>
<expression><br>
<script><br>
<code><br>
tmp = basic.stringify(description)<br>
myru
=['Я','я','Ю','ю','Ч','ч','Ш','ш','Щ','щ','Ж','ж','А','а','Б','б','В','в','Г','г','Д','д','Е','е','Ё','ё','З','з','И','и','Й','й','К','к','Л','л','М','м','Н','н',
'О','о','П','п','Р','р','С','с','Т','т','У','у','Ф','ф','Х','х','Ц','ц','Ы','ы','Ь','ь','Ъ','ъ','Э','э']<br>
myen
=['Ya','ya','Yu','yu','Ch','ch','Sh','sh','Sh','sh','Zh','zh','A','a','B','b','V','v','G','g','D','d','E','e','E','e','Z','z','I','i','J','j','K','k','L','l','M','m','N','n',
'O','o','P','p','R','r','S','s','T','t','U','u','F','f','H','h','C','c','Y','y','`','`','\'','\'','E',
'e']<br>
for( i = 0; i < myru.size() ; i++)<br>
{<br>
tmp = tmp?.replace(myru[i],myen[i]);<br>
}<br>
return tmp<br>
</code><br>
</script><br>
</expression><br>
<target><br>
<c:path>$user/costCenter</c:path><br>
</target><br>
</mapping></p>
<br>
<br>
and<br>
description Иванов Иван Иванович<br>
became<br>
costCenter Ivanov Ivan Ivanovich<br>
<br>
<strong>But one more question - is it possible to rewrite some
attribute?<br>
</strong>first i test source and target the same and it get no
effect(<br>
<br>
<br>
<blockquote style="border-left:1px solid #0857A6; margin:10px;
padding:0 0 0 10px;"> Вторник, 6 декабря 2016, 11:26 +03:00 от
Ivan Noris <a class="moz-txt-link-rfc2396E" href="mailto:ivan.noris@evolveum.com"><ivan.noris@evolveum.com></a>:<br>
<br>
<div id="">
<div class="js-helper js-readmsg-msg">
<style type="text/css"></style>
<div> <base target="_self" href="https://e.mail.ru/">
<div id="style_14810130230000000276_BODY">
<p>Hi Oleg,</p>
<p>as Pavol already said, the main problem was the
"<" character which must be escaped. This was quite
invisible even for me.<br>
</p>
<p>I was able to rewrite your expression part to be more
"groovy":</p>
<p>(source and target are as before)</p>
<p><br>
</p>
<p>tmp = basic.stringify(description)<br>
ar1 = ['test1', 'test2']<br>
ar2 = ['replace1', 'replace2']<br>
for( i = 0; i < ar1.size() ; i++)<br>
{<br>
tmp = tmp?.replace(ar1[i],ar2[i]);<br>
}<br>
return tmp</p>
<p>And it seems to work:</p>
<p>before: abc test1 def test2</p>
<p>after: abc replace1 def replace2<br>
</p>
<p>Regards,</p>
<p>Ivan<br>
</p>
<br>
<div>On 12/06/2016 08:27 AM, oleg okunev wrote:<br>
</div>
<blockquote
cite="mid:1481009256.894536747@f186.i.mail.ru"
type="cite"> okey...<br>
may be you can help with loop in expression:<br>
<br>
<p><source><br>
<c:path>$user/description</c:path><br>
</source></p>
<p><expression><br>
<script><br>
<code><br>
ar1 = new ArrayList ('test1','test2')<br>
ar2 = new ArrayList ('replacetest1', 'replacetest2')<br>
<br>
for( i = 0; i < ar1.size() ; i++)<br>
{<br>
description= description.replace(ar1[i],ar2[i]);<br>
}<br>
return description<br>
<br>
</code><br>
</script><br>
</expression><br>
</p>
<p><target><br>
<c:path>$user/description</c:path><br>
</target></p>
<br>
But it show error <strong>element parse error: Error:
invalid tagName</strong><br>
<br>
Whats wrong?<br>
may be it helps me with translit<br>
<br>
<br>
<blockquote style="border-left:1px solid
#0857A6;margin:10px;padding:0 0 0 10px;"> Пятница, 2
декабря 2016, 11:39 +03:00 от Radovan Semancik <a
moz-do-not-send="true"
href="mailto:radovan.semancik@evolveum.com"><a class="moz-txt-link-rfc2396E" href="mailto:radovan.semancik@evolveum.com"><radovan.semancik@evolveum.com></a></a>:<br>
<br>
<div>
<div>
<div>
<div>
<div>Hi,<br>
<br>
There is no easy way.<br>
<br>
The normalization was originally intended
for international alphabet support. E.g.
it was expected that we could
transliterate cyrillic words to latin.
However, currently alphabets of all the
midpoint subscribers are latin-based.
Therefore current midPoint normalizer only
support conversion of latin-based national
characters and the cyrillic
transliteration was never implemented. And
currently we have other development
priorities. Our priorities are focused on
improving the life of midPoint
subscribers. Therefore unless we get any
substantial subscription from the
non-latin-based customer we have no plans
to change that. I'm sorry.<br>
<br>
<pre cols="72">--
Radovan Semancik
Software Architect
evolveum.com</pre>
<br>
<br>
On 12/02/2016 08:58 AM, oleg okunev wrote:<br>
</div>
<blockquote
cite="mid:1480665526.501852048@f372.i.mail.ru"
type="cite"> Morning!<br>
<br>
i have successefully test OrgSync Story
Test... with English names <br>
<br>
BUT<br>
when i begin test with russian names i get
problem!<br>
<br>
<p>Conflicting object already exists
(violated constraint
'uc_org_name')(orgType=PPV(String:replicated);
{<a moz-do-not-send="true"
href="http://midpoint.evolveum.com/xml/ns/story/orgsync/ext"
target="_blank">http://midpoint.evolveum.com/xml/ns/story/orgsync/ext</a>}orgpath=PPV(String:<strong><span
style="color: rgb(191, 0, 0);"
data-mce-style="color: #bf0000;">Фольклёр/Сказки</span></strong>);
) <br>
in expression in mapping 'Org-org
mapping' in
objectTemplate:10000000-0000-0000-0000-000000000231(Org
Template)<br>
<br>
midpoint save first org "<span
style="color: #bf0000;"
data-mce-style="color: #bf0000;"><strong>Сторонние
Организации</strong></span> " and
make name_norm only space or just empty <br>
so all next names trying to create get
same emty name_norm and fail to
create(((<br>
<br>
<strong>is any way to fix that?????</strong><br>
<br>
<br>
</p>
<p>costcenter | displayorder |
locality_norm | locality_orig
| name_norm |
name_orig | tenant | oid<br>
------------+--------------+------------------------------+-------------------------------+-----------+------------------------------------+--------+--------------------------------------<br>
| |
|
|
p0002 | P0002
| |
00000000-8888-6666-0000-200000000002<br>
black | |
|
<span
style="color: rgb(191, 0, 0);"
data-mce-style="color: #bf0000;"><strong>|
|</strong> <strong>Сторонние
Организации</strong></span> |
|
040346cb-88ce-4012-8d52-93eb1e1d2a4f<br>
black | |
|
|child
| CHILD
| f |
2681372b-3a8b-442d-861c-fc6fa0229471<br>
| |
|
|ibpm
test | IBPM Test
| |
828586f3-1444-42b9-b11a-e012c066099b<br>
| |
|
|abbwin | ABB-WIN
| |
f226c7be-dad5-4415-b4f7-d987fb3856bd<br>
| |
kazan | Kazan
|<span
style="color: rgb(191, 0, 0);"><strong>
fil </strong> </span> |
<span style="color: rgb(191, 0, 0);"><strong>Домен
FIL </strong> </span>
| |
e62d247f-bd94-425a-9d82-63927de5b569</p>
<p>------------+--------------+------------------------------+-------------------------------+-----------+-----------------------+--------+--------------------------------------</p>
P.S. "<strong style="color: #bf0000;"
data-mce-style="color: #bf0000;">Домен
FIL</strong>" became " fil". midpoint
erase all russian letters. <br>
<fieldset></fieldset>
<br>
<pre wrap="">_______________________________________________
midPoint mailing list
<a moz-do-not-send="true" href="//e.mail.ru/compose/?mailto=mailto%3amidPoint@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/mailman/listinfo/midpoint</a>
</pre>
</blockquote>
<br>
<br>
</div>
<div>_______________________________________________<br>
midPoint mailing list<br>
<a moz-do-not-send="true"
href="//e.mail.ru/compose/?mailto=mailto%3amidPoint@lists.evolveum.com"
target="_blank">midPoint@lists.evolveum.com</a><br>
<a moz-do-not-send="true"
href="http://lists.evolveum.com/mailman/listinfo/midpoint"
target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
</div>
</div>
</div>
</div>
</blockquote>
<br>
<br>
<fieldset></fieldset>
<br>
<pre wrap="">_______________________________________________
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" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
</blockquote>
<br>
<pre cols="72">--
Ivan Noris
Senior Identity Engineer
evolveum.com
</pre>
</div>
<div>_______________________________________________<br>
midPoint mailing list<br>
<a moz-do-not-send="true"
href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a><br>
<a moz-do-not-send="true"
href="http://lists.evolveum.com/mailman/listinfo/midpoint"
target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
</div>
<base target="_self" href="https://e.mail.ru/"> </div>
</div>
</div>
</blockquote>
<br>
<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>