Skip to Content
Technical Articles

How to use credentials and variables with Cloud Factory in SAP Intelligent RPA

Hi

I’m a member of the SAP Intelligent RPA Adoption team.

You need frequently to make configurable scripts. SAP Intelligent RPA, provide this functionality thanks to the factory and the environments. I will present you how to do this.

I will use activities that will be released in the version 1.0.9 but the environment selection is available since the version 1.0.6.

Initialize the variables

To initlialize your variable you have to configure them in the factory.

There is two types of variables :

  • Credential : you can store a username and a password
  • Text : you can store a simple value (a url for example)

You can do this in the management tab of the factory :

Retrieve the variables in a workflow :

First of all you have to declare your credential or your variable (setting) with the good activity, you have to put it out of the scenario and check the option Server to tell to the agent to retrieve the credential in the factory and not in the windows credential manager.

 

Once this done you can use the activity get to retrieve your data. I strongly recommend to store the data in the context sc.localData, because credentials and variables can be sensitive data. And sc.localData is an internal context of the workflow.

How to retrieve them when you launch your project with the studio :

Since the 1.0.5 you can retrieve the variables when you launch the project with the studio.

The only thing that you have to check is the environment on which you are plugged.

To do this you have to use the systray in the settings :

And select the environment in which the variables have been configured.

Conclusion

Now you know how to declare and use variables to configure your scripts.

I have presented a webinar on this subject, you can get the recording here.

Important : In this webinar I said that the new activities will be available in the version 1.0.8, it was wrong, it will be available in the version 1.0.9 (coming at the end of April 2020)

3 Comments
You must be Logged on to comment or reply to a post.
  • Hi Julien,

    Thank for the post.

    As you mentioned, the function to retrieve credentials from the cloud is only available in version 1.0.9 right?

    I’m using 1.0.8 and when I use the Get credential activity there are no user & password fields.

    Thank you.

    /
    • Hi there,

      Please follow the following steps for your version.

      • Go under Scripts tab
      • There will be a section that is commented under “TODO: set login/password here“. As per Julien’s example, you can type in the following 2 lines of code under this section.

      sc.localData.username = credential.userName.get();
      sc.localData.password = credential.password.get();

      Hope it helps!

      /
      • Hello,

        I tried your suggestion but, in my desktop agent I can’t choose environment (version 1.0.8.36) Is it necessary? And also I only have one environment on cloud factory.