[midPoint] Problem with Russian Names in ORG
Ivan Noris
ivan.noris at evolveum.com
Tue Dec 6 10:38:20 CET 2016
Hi Oleg,
try to set <strength>strong</strength> for that mapping. I did that.
Ivan
On 12/06/2016 10:18 AM, oleg okunev wrote:
> Thanks! it works
>
> and helps with my question.
> i think it will be helpfull for you
>
> for test i used this code
>
> <mapping>
> <source>
> <c:path>$user/description</c:path>
> </source>
> <expression>
> <script>
> <code>
> tmp = basic.stringify(description)
> myru
> =['Я','я','Ю','ю','Ч','ч','Ш','ш','Щ','щ','Ж','ж','А','а','Б','б','В','в','Г','г','Д','д','Е','е','Ё','ё','З','з','И','и','Й','й','К','к','Л','л','М','м','Н','н',
> 'О','о','П','п','Р','р','С','с','Т','т','У','у','Ф','ф','Х','х','Ц','ц','Ы','ы','Ь','ь','Ъ','ъ','Э','э']
> 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']
> for( i = 0; i < myru.size() ; i++)
> {
> tmp = tmp?.replace(myru[i],myen[i]);
> }
> return tmp
> </code>
> </script>
> </expression>
> <target>
> <c:path>$user/costCenter</c:path>
> </target>
> </mapping>
>
>
>
> and
> description Иванов Иван Иванович
> became
> costCenter Ivanov Ivan Ivanovich
>
> *But one more question - is it possible to rewrite some attribute?
> *first i test source and target the same and it get no effect(
>
>
> Вторник, 6 декабря 2016, 11:26 +03:00 от Ivan Noris
> <ivan.noris at evolveum.com>:
>
> Hi Oleg,
>
> as Pavol already said, the main problem was the "<" character
> which must be escaped. This was quite invisible even for me.
>
> I was able to rewrite your expression part to be more "groovy":
>
> (source and target are as before)
>
>
> tmp = basic.stringify(description)
> ar1 = ['test1', 'test2']
> ar2 = ['replace1', 'replace2']
> for( i = 0; i < ar1.size() ; i++)
> {
> tmp = tmp?.replace(ar1[i],ar2[i]);
> }
> return tmp
>
> And it seems to work:
>
> before: abc test1 def test2
>
> after: abc replace1 def replace2
>
> Regards,
>
> Ivan
>
>
> On 12/06/2016 08:27 AM, oleg okunev wrote:
>> okey...
>> may be you can help with loop in expression:
>>
>> <source>
>> <c:path>$user/description</c:path>
>> </source>
>>
>> <expression>
>> <script>
>> <code>
>> ar1 = new ArrayList ('test1','test2')
>> ar2 = new ArrayList ('replacetest1', 'replacetest2')
>>
>> for( i = 0; i < ar1.size() ; i++)
>> {
>> description= description.replace(ar1[i],ar2[i]);
>> }
>> return description
>>
>> </code>
>> </script>
>> </expression>
>>
>> <target>
>> <c:path>$user/description</c:path>
>> </target>
>>
>>
>> But it show error *element parse error: Error: invalid tagName*
>>
>> Whats wrong?
>> may be it helps me with translit
>>
>>
>> Пятница, 2 декабря 2016, 11:39 +03:00 от Radovan Semancik
>> <radovan.semancik at evolveum.com>
>> <mailto:radovan.semancik at evolveum.com>:
>>
>> Hi,
>>
>> There is no easy way.
>>
>> 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.
>>
>> --
>> Radovan Semancik
>> Software Architect
>> evolveum.com
>>
>>
>>
>> On 12/02/2016 08:58 AM, oleg okunev wrote:
>>> Morning!
>>>
>>> i have successefully test OrgSync Story Test... with English
>>> names
>>>
>>> BUT
>>> when i begin test with russian names i get problem!
>>>
>>> Conflicting object already exists (violated constraint
>>> 'uc_org_name')(orgType=PPV(String:replicated);
>>> {http://midpoint.evolveum.com/xml/ns/story/orgsync/ext}orgpath=PPV(String:*Фольклёр/Сказки*);
>>> )
>>> in expression in mapping 'Org-org mapping' in
>>> objectTemplate:10000000-0000-0000-0000-000000000231(Org
>>> Template)
>>>
>>> midpoint save first org "*Сторонние Организации* " and make
>>> name_norm only space or just empty
>>> so all next names trying to create get same emty name_norm
>>> and fail to create(((
>>>
>>> *is any way to fix that?????*
>>>
>>>
>>> costcenter | displayorder | locality_norm |
>>> locality_orig | name_norm | name_orig
>>> | tenant | oid
>>> ------------+--------------+------------------------------+-------------------------------+-----------+------------------------------------+--------+--------------------------------------
>>> | |
>>> | |
>>> p0002 | P0002 |
>>> | 00000000-8888-6666-0000-200000000002
>>> black | |
>>> | *|
>>> |* *Сторонние Организации* | |
>>> 040346cb-88ce-4012-8d52-93eb1e1d2a4f
>>> black | |
>>> | |child
>>> | CHILD | f |
>>> 2681372b-3a8b-442d-861c-fc6fa0229471
>>> | |
>>> | |ibpm
>>> test | IBPM Test | |
>>> 828586f3-1444-42b9-b11a-e012c066099b
>>> | |
>>> |
>>> |abbwin | ABB-WIN |
>>> | f226c7be-dad5-4415-b4f7-d987fb3856bd
>>> | | kazan
>>> | Kazan |*fil *
>>> | *Домен FIL * | |
>>> e62d247f-bd94-425a-9d82-63927de5b569
>>>
>>> ------------+--------------+------------------------------+-------------------------------+-----------+-----------------------+--------+--------------------------------------
>>>
>>> P.S. "*Домен FIL*" became " fil". midpoint erase all russian
>>> letters.
>>>
>>>
>>> _______________________________________________
>>> midPoint mailing list
>>> midPoint at lists.evolveum.com
>>> <//e.mail.ru/compose/?mailto=mailto%3amidPoint at lists.evolveum.com>
>>> http://lists.evolveum.com/mailman/listinfo/midpoint
>>
>>
>> _______________________________________________
>> midPoint mailing list
>> midPoint at lists.evolveum.com
>> <//e.mail.ru/compose/?mailto=mailto%3amidPoint at lists.evolveum.com>
>> http://lists.evolveum.com/mailman/listinfo/midpoint
>>
>>
>>
>>
>> _______________________________________________
>> midPoint mailing list
>> midPoint at lists.evolveum.com <mailto:midPoint at lists.evolveum.com>
>> http://lists.evolveum.com/mailman/listinfo/midpoint
>
> --
> Ivan Noris
> Senior Identity Engineer
> evolveum.com
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com <mailto:midPoint at lists.evolveum.com>
> http://lists.evolveum.com/mailman/listinfo/midpoint
>
>
>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
--
Ivan Noris
Senior Identity Engineer
evolveum.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20161206/9cd93a33/attachment.htm>
More information about the midPoint
mailing list