Our vBulletin migration is complete.
Welcome vBulletin users! All content and user information from the Micro Focus Forums (vBulletin) site has been migrated to this site. READ MORE.
Anonymous_User Absent Member.
Absent Member.
179 views

Roleservice - setResourceLocalizedStrings - How does it work?

Hello,

I am using integration activitites in a workflow, to try to set
displaynames and descriptions for roles.

I am using setResourceLocalizedStrings from the roleservice.

I am able to set "en" locales, by using 2 integration activities

The first where I specify

'en' = Envelope/Body/setRoleLocalizedStringsRequest/locStrings/
localizedvalue/locale
'my string' = Envelope/Body/setRoleLocalizedStringsRequest/locStrings/
localizedvalue/value
'2' = Envelope/Body/setRoleLocalizedStringsRequest/type

And the second one

'en' = Envelope/Body/setRoleLocalizedStringsRequest/locStrings/
localizedvalue/locale
'my string' = Envelope/Body/setRoleLocalizedStringsRequest/locStrings/
localizedvalue/value
'2' = Envelope/Body/setRoleLocalizedStringsRequest/type

This gives me Display name and Description set to 'my string'

Now, I wanted to do the same, and add 'da' as locale for the 2 settings
(as well as english). I have tried chaining 2 extra integration activies,
and that does not work, it fails, and removes the 'en' localization, and
replaces it with a 'da' localization, and since the role now no longer
have an 'en' localization, it is invalid.

What would be the correct method to set more than one locale on a role?
Labels (1)
0 Likes
3 Replies
Knowledge Partner
Knowledge Partner

Re: Roleservice - setResourceLocalizedStrings - How does it work?

I opened SoapUI, looked at the WSDL and as you suggest, it looks
something like this snippet:

<ser:locStrings>
<!--Zero or more repetitions:-->
<ser:localizedvalue>
<ser:locale>?</ser:locale>
<ser:value>?</ser:value>
</ser:localizedvalue>
</ser:locStrings>

Note the zero or more repetitions.

Ah! Now I remember, in D4.01 AU2, in the Integration Activity, click on
it in Workflow tab.

Then right click, Show Data Item Mappings.

Then click on the mappings button

Then on the locStrings item, right click, and there is a number of
instances option. Or the like. I.e. You can say 1, 3, or 17 I suppose.

Now I cannot recall how you send the data in the Pre-Activity mapping.
I.e. How do you pass the data into the first, second, third, seventeenth
instance? Probably [1] style notation in the destination I imagine.
maybe if you define it as 2 instances, Designer does it for you? Dunno,
should be somewhat easier if you know where to look.



On 5/9/2012 7:36 AM, Nicolai Jensen wrote:
> Hello,
>
> I am using integration activitites in a workflow, to try to set
> displaynames and descriptions for roles.
>
> I am using setResourceLocalizedStrings from the roleservice.
>
> I am able to set "en" locales, by using 2 integration activities
>
> The first where I specify
>
> 'en' = Envelope/Body/setRoleLocalizedStringsRequest/locStrings/
> localizedvalue/locale
> 'my string' = Envelope/Body/setRoleLocalizedStringsRequest/locStrings/
> localizedvalue/value
> '2' = Envelope/Body/setRoleLocalizedStringsRequest/type
>
> And the second one
>
> 'en' = Envelope/Body/setRoleLocalizedStringsRequest/locStrings/
> localizedvalue/locale
> 'my string' = Envelope/Body/setRoleLocalizedStringsRequest/locStrings/
> localizedvalue/value
> '2' = Envelope/Body/setRoleLocalizedStringsRequest/type
>
> This gives me Display name and Description set to 'my string'
>
> Now, I wanted to do the same, and add 'da' as locale for the 2 settings
> (as well as english). I have tried chaining 2 extra integration activies,
> and that does not work, it fails, and removes the 'en' localization, and
> replaces it with a 'da' localization, and since the role now no longer
> have an 'en' localization, it is invalid.
>
> What would be the correct method to set more than one locale on a role?


0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Roleservice - setResourceLocalizedStrings - How does it work?

On Wed, 09 May 2012 12:46:59 +0000, Geoffrey Carman wrote:

> I opened SoapUI, looked at the WSDL and as you suggest, it looks
> something like this snippet:
>
> <ser:locStrings>
> <!--Zero or more repetitions:-->
> <ser:localizedvalue>
> <ser:locale>?</ser:locale>
> <ser:value>?</ser:value>
> </ser:localizedvalue>
> </ser:locStrings>
>
> Note the zero or more repetitions.
>
> Ah! Now I remember, in D4.01 AU2, in the Integration Activity, click on
> it in Workflow tab.
>
> Then right click, Show Data Item Mappings.
>
> Then click on the mappings button
>
> Then on the locStrings item, right click, and there is a number of
> instances option. Or the like. I.e. You can say 1, 3, or 17 I suppose.
>
> Now I cannot recall how you send the data in the Pre-Activity mapping.
> I.e. How do you pass the data into the first, second, third, seventeenth
> instance? Probably [1] style notation in the destination I imagine.
> maybe if you define it as 2 instances, Designer does it for you? Dunno,
> should be somewhat easier if you know where to look.


Aaah.... nicely hidden 🙂
It is almost working for me, the UI is in any case.

Right clicking gives an "Occurs" option.
When I type "2" I get 2 instances

One called
Envelope/Body/setRoleLocalizedStringsRequest/locStrings/localizedvalue/
locale
And one called
Envelope/Body/setRoleLocalizedStringsRequest/locStrings[2]/localizedvalue/
locale
This is repeated for the : Envelope/Body/setRoleLocalizedStringsRequest/
locStrings/localizedvalue/value, it gets a [2] instance as well.

If I write 'en' in the first and then 'da' in the second, and put in the
values for for example the description "My Description", only the 'en'
discription is set.
Clearly I must be doing something else wrong.
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Roleservice - setResourceLocalizedStrings - How does it work?

On Thu, 10 May 2012 07:50:31 +0000, Nicolai Jensen wrote:

> One called
> Envelope/Body/setRoleLocalizedStringsRequest/locStrings/localizedvalue/
> locale
> And one called
> Envelope/Body/setRoleLocalizedStringsRequest/locStrings[2]/

localizedvalue/
> locale
> This is repeated for the : Envelope/Body/setRoleLocalizedStringsRequest/
> locStrings/localizedvalue/value, it gets a [2] instance as well.
>
> If I write 'en' in the first and then 'da' in the second, and put in the
> values for for example the description "My Description", only the 'en'
> discription is set.
> Clearly I must be doing something else wrong.


By comparing the workflow, I get the following input maps

<input-maps>
<map data-type="string" name="test_value_0" source="'devsysaa'"
target="Envelope/@_password_"/>
<map data-type="string" name="test_value_1" source='"http://
localhost:8180/IDM/role/service"' target="Envelope/@_serverUrl_"/>
<map data-type="string" name="test_value_2"
source="'CN=uaadmin,OU=services,O=dk'" target="Envelope/@_userid_"/>
<map data-type="string" name="test_value_3"
source="'CN='+flowdata.get('cn')+',CN=' + flowdata.get('placement') +
',CN=Organisation,CN=Level' + flowdata.get('level')
+',CN=RoleDefs,CN=RoleConfig,CN=AppConfig,CN=UAMETA,CN=Driver
Set,OU=idm,OU=services,O=dk'" target="Envelope/Body/
setRoleLocalizedStringsRequest/roleDn/dn"/>
<map data-type="string" name="test_value_4" source="'en'"
target="Envelope/Body/setRoleLocalizedStringsRequest/locStrings/
localizedvalue/locale"/>
<map data-type="string" name="test_value_5" source="flowdata.get
('displayname')" target="Envelope/Body/setRoleLocalizedStringsRequest/
locStrings/localizedvalue/value"/>
<map data-type="string" name="test_value_6" source="'da'"
target="Envelope/Body/setRoleLocalizedStringsRequest/locStrings[2]/
localizedvalue/locale"/>
<map data-type="string" name="test_value_7" source="flowdata.get
('displayname')" target="Envelope/Body/setRoleLocalizedStringsRequest/
locStrings[2]/localizedvalue/value"/>
<map data-type="string" name="test_value_8" source="'2'"
target="Envelope/Body/setRoleLocalizedStringsRequest/type"/>
</input-maps>

Which I think looks like I would expect them to.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.