Regular Contributor.. Raghav Regular Contributor..
Regular Contributor..
297 views

how to pass and use system account password in Scriptlet

Hi All,

How to pass and use system account password in Scriptlet?

Can you provide an example

var pass = scriptletContext.getSystemAccountPassword('MSSQL_Credentials/GAcc_MSSQL_SystemAccount_User');

but unable to use here can you say how can i use the password value here

 

0 Likes
4 Replies
naveenlingaraju Super Contributor.
Super Contributor.

Re: how to pass and use system account password in Scriptlet

Hello Raghav,

You can achieve in the below ways

1. Add the system account into your content pack. Ex - "MSSQL_Credentials" and GAcc_MSSQL_SystemAccount_User is the username and I have configured "success" as the password.

1. Add the operation into the flow - "/HP Solutions<>/Library/Integrations/Hewlett-Packard/Operations Orchestration/10.x/Configuration Items/Store System Account in Flow Variables".

2. In the Operation, enter your System Account Name into input "accountName" and flowvariable as below

accountName - MSSQL_Credentials

flowVariable - GAcc_MSSQL_SystemAccount_User

3. This operation will create two separate variables and will be present in the Local Context. 

GAcc_MSSQL_SystemAccount_UserUsername

GAcc_MSSQL_SystemAccount_UserPassword

4. In the scriptlet, you can add the below line and the system account will be extracted as

var pass = scriptletContext.get('GAcc_MSSQL_SystemAccount_UserPassword');

scriptletResult = pass;

5. Once this flow is executed, you will get the password of your user.

Attached some snaps for your reference.

Thanks

Naveen

0 Likes
Regular Contributor.. Raghav Regular Contributor..
Regular Contributor..

Re: how to pass and use system account password in Scriptlet

Hi Naveen
Thanks for your valuable reply
Same I have tried but actually not working
If you have any example can update over her so I can test and use it over my flows.
0 Likes
naveenlingaraju Super Contributor.
Super Contributor.

Re: how to pass and use system account password in Scriptlet

Hello Raghav,

You need to add your entire scriplet to that operation and it should work.

I tried with getting the operation output to the other do nothing operation and it worked.

After adding the scriplet, do the Check Script and let me know the error.

Thanks

Naveen 

0 Likes
Regular Contributor.. Raghav Regular Contributor..
Regular Contributor..

Re: how to pass and use system account password in Scriptlet

Hi Naveen,

Same tried at my side i am not sure for you its working. some where i am missing.

So can you share a sample over here or over any link so i can check and try my self


@naveenlingaraju wrote:

Hello Raghav,

You need to add your entire scriplet to that operation and it should work.

I tried with getting the operation output to the other do nothing operation and it worked.

After adding the scriplet, do the Check Script and let me know the error.

Thanks

Naveen 




Regards,

Raghav

 

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.