Respected Contributor.. DH_1 Respected Contributor..
Respected Contributor..
1231 views

Set Selection List and HPOO 10.20

I am having trouble converting a flow from OO 9.06 to OO 10.20, it seems that the 'Set Selection List' operation is not working.

The flow works in HP OO 9.06 without problems.

Has anybody successfully used this operation in HPOO 10.20 ?

We are creating/updating a selection list based on an excel sheet, and as the operation for 10.20 does not support creating lists, we have created the list in advance. But it seems that it never updates the list, however in studio i can see that the selection list gets modified correctly.

Any ideas ?

We are using HP Solutions CP 1..3.0 and HPOO 10.20

Labels (1)
0 Likes
5 Replies
Micro Focus Expert
Micro Focus Expert

Re: Set Selection List and HPOO 10.20

Hi,

I've tested the operation in 10.20 using the hpsolution content pack you've mentioned and it works on my install. Things to keep in mind with 10.20:

- if the selection list doesn't exist the set selection list operation will create it temporarily for the duration of the execution. Once the execution is complete the selection list contents are gone.

- if the selection list exists in central it will create a central override for it using the values provided in the values input. In this case you need to pay close attention to how you add your values (if you add a value it will replace all contents with that value, to append you need to do ${selectionList}|value )

- the override created by the set selection list operation does not get removed even if you delete the containing CP, therefore make sure to properly initialize the selection list.

For an existing selection list to check wether the operation worked check in the rest api /content-config/{selectionList} the difference between customValue and defaultValue (defaultValue is the selection list that was deployed with the CP, customValue is the central override of the selection list). 

If I can help you further feel free to provide me with more details and i will try to see more about your exact case.

Hope this helps,

Vlad

Respected Contributor.. DH_1 Respected Contributor..
Respected Contributor..

Re: Set Selection List and HPOO 10.20

Hi Vlad.

Thanks for your response.

I will try to do some more work based on your feedback, i will let you know how it goes.

Thanks,

Dan

0 Likes
Respected Contributor.. DH_1 Respected Contributor..
Respected Contributor..

Re: Set Selection List and HPOO 10.20

Hi Vlad.

I have installed a REST client and i did some tests.

According to the API guide p21, /config-items should have replaced /content-config. However i am only able to get selection-lists without a sub path, and since my selection list should exist in a <projectName>/<subFolder>, i suspect that i might have a problem with my installation.

I will open a case with support and see if i can get any further with this.

Dan

0 Likes
Micro Focus Expert
Micro Focus Expert

Re: Set Selection List and HPOO 10.20

Hi,

In order to make things clear about the usage of the set selection lists operation i have created an example similar to your specification.

I have created a small CP containing a selection list located under the folder structure: "folder_1\modify" under the slection lists folder. The selection list was called numericalSequenc and originally contained the values 1|2|3. I created a flow that adds to this selection list the values 4|5|6|7|8|9|0 to do this in the input value i used: ${folder_1/modify/numericalSequence}|4|5|6|7|8|9|0 (in the attached screenshot of the inputs  from central the ${} is already resolved to it's value). Deployed it to central and ran it. (see the attached screenshot for full details about how I used the operation).

Before running my flow i used in the browser the api call to get the value of the selection list and ran it again after running the content. The api call used was: /oo/rest/v2/config-items/selection-lists/folder_1/modify/numericalSequence (the v2 is optional, but using that ensures that you always use the latest version of that API, if it doesn't work for you with v2 remove it). The results of the call are as follows: 

Before running the flow

{"type":"selection-lists","path":"folder_1/modify/numericalSequence","name":"numericalSequence","value":"1|2|3","defaultValue":"1|2|3","customValue":null,"fullPath":"Configuration/Selection Lists/folder_1/modify/numericalSequence.xml","uuid":"677b5373-0e17-4fb8-a2d5-122bc9544d87"}

After Running the flow

{"type":"selection-lists","path":"folder_1/modify/numericalSequence","name":"numericalSequence","value":"1|2|3|4|5|6|7|8|9|0","defaultValue":"1|2|3","customValue":"1|2|3|4|5|6|7|8|9|0","fullPath":"Configuration/Selection Lists/folder_1/modify/numericalSequence.xml","uuid":"677b5373-0e17-4fb8-a2d5-122bc9544d87"}

Basically the gist of the matter is that when you need to use a configuration item (slection list, system property etc) and it is under some folder, everywhere  where you would use the name of the configuration item you can put the full path starting with the first folder under the configuration item type and it will work, both for API and execution.

Regards,

Vlad

 

 

reisen Absent Member.
Absent Member.

Re: Set Selection List and HPOO 10.20

Hi,

Just a note about the API level - since the OO version is 10.20, you should use /v1/ in the request URL (v2 was only added in 10.50).

(By the way, omitting the version will not work in this particular case, since omitting it means "pre-v1" API, and this particular API function did not exist before v1.)

Regards,
Rotem

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.