Respected Contributor.. Charlemagne Respected Contributor..
Respected Contributor..
1551 views

Reference to system account username/password in inputs using a pathname

Jump to solution

Hi,

is it possible to refer to a system account's username/password using a pathname instead of the System Account option in the inputs?

I would like to be able to pass as a constant (flow variable) the location of the System Account to use since I have many environments and it would be handy to just switch from one to another using a pathname as follow for system accounts:

env1/AccountA
env1/AccountB
env2/AccountA
env2/AccountB
env2/AccountC
env3/AccountC

Also, it would be possible to compose the name of the account on the fly depending on specific conditions. Say, a domain name may lead to another account, etc.

How can I achieve this behavior if possible?

THX

Labels (1)
0 Likes
1 Solution

Accepted Solutions
Outstanding Contributor.. JarodMB Outstanding Contributor..
Outstanding Contributor..

Re: Reference to system account username/password in inputs using a pathname

Jump to solution

Use ("/HP Solutions [1.3.0]/Library/Integrations/Hewlett-Packard/Operations Orchestration/10.x/Configuration Items/Store System Account in Flow Variables") - 1.3.0 is the version i have installed - there is likely a later version available.

Throw some javascript in the scriptlet of a do nothing step to handle your logic 

 

8 Replies
Outstanding Contributor.. JarodMB Outstanding Contributor..
Outstanding Contributor..

Re: Reference to system account username/password in inputs using a pathname

Jump to solution

Use ("/HP Solutions [1.3.0]/Library/Integrations/Hewlett-Packard/Operations Orchestration/10.x/Configuration Items/Store System Account in Flow Variables") - 1.3.0 is the version i have installed - there is likely a later version available.

Throw some javascript in the scriptlet of a do nothing step to handle your logic 

 

AndreiTruta Outstanding Contributor.
Outstanding Contributor.

Re: Reference to system account username/password in inputs using a pathname

Jump to solution

I suggest to take a look at the Store System Account operation.

Library/Integrations/Hewlett-Packard/Operations Orchestration/10.x/Configuration Items/Store System Account in Flow Variables

Maybe something similar to the below will help. 

Where ${variable} will be something you can control dynamically

Screenshot_22.png

 

Andrei Vasile Truta
0 Likes
Respected Contributor.. Charlemagne Respected Contributor..
Respected Contributor..

Re: Reference to system account username/password in inputs using a pathname

Jump to solution

Thanks, you put me on the right track. I still have a problem since I need a reference to the content of a property which the name is dynamically composed. I need to extract the value of the property.

Suppose I have an property or a flow variable name Environment with the value env1. To reference the system property env1/myProperty I need to use a construct like: ${Environment}/myProperty, however I need to get the content in a json Path operation and not the value of ${Environment}/myProperty which is env1/myProperty. So, it would be something like: ${${Environment}/myProperty}. How can I make this evaluated in the constant input field?

0 Likes
Bridges Respected Contributor.
Respected Contributor.

Re: Reference to system account username/password in inputs using a pathname

Jump to solution

Check out the 'Flow Variable Resolver' in the Utility Operations/Flow Variable Manipulation/ folder.

 

 

0 Likes
Respected Contributor.. Charlemagne Respected Contributor..
Respected Contributor..

Re: Reference to system account username/password in inputs using a pathname

Jump to solution

Thanks, it does the trick. However, it returns with a failure even if there is no failure and there is actually a flow variable substitution. The result is as expected and the response is supposed to be success.

0 Likes
AndreiTruta Outstanding Contributor.
Outstanding Contributor.

Re: Reference to system account username/password in inputs using a pathname

Jump to solution

It should not return to failure but it does. you are right. please open a ticket.

I got the above wrong by missusage. I read the description and understood I was using it in a wrong manner.

Please read the description and understand if this can still match your need.

 

Andrei Vasile Truta
0 Likes
Respected Contributor.. Charlemagne Respected Contributor..
Respected Contributor..

Re: Reference to system account username/password in inputs using a pathname

Jump to solution

Hi Andrei,

I am a bit confused about the behavior. The variable ${Environnement} is in fact a System Property, so, it is defined and known at the beginning of the flow. Then, I need to access another System Property 'Liste RAS' which has ${Environnement} in its access path. If I feed directly ${Environnement}/Liste RAS to my JSON Path operation, it substitutes the variable and take, suppose Environnement = Test, Test/Liste RAS as a JSON structure, which it isn't. The structure is the value of this Property.

The flow variable resolver seems to substitute the variables right before starting, so the variable Environnement is already substituted before the resolver even tries. Hence the failure. If I recover the result from the flow variable resolver, I am getting the actual JSON structure, which is what I am trying to achieve. The Flow Variable Resolver may not be the way to go on another hand, something simpler out there which will not produce failures while it is not actually a failure?

0 Likes
AndreiTruta Outstanding Contributor.
Outstanding Contributor.

Re: Reference to system account username/password in inputs using a pathname

Jump to solution

If I got it right, you could try to achieve it in two steps. I used the Do Nothing Operation.

Check the below screenshots - they were not put in the desired order by the forum but they should help though.

Hope it helps

The second step doing the magicThe second step doing the magicwhat happens at runtimewhat happens at runtimewhat happens at runtimewhat happens at runtime2 Do nothing steps2 Do nothing steps

Andrei Vasile Truta
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.