Skip to Content
Technical Articles

SAP Intelligent Robotic Process Automation 2.0: Local Credentials and Local Variables

In many use case we have the need to manage credentials and variables locally. We developed a set of activities to provide this functionality.

The screen shots in this blog post are based on version 2105.

 

Local Agent Variables

A set of activities called “Local Agent Variables” allow to create, update, retrieve and delete local variables. Such variables are then stored within the Windows registry of the local computer (inside a dedicated registry, under a dedicated key). For a given project, up to 100 variables can be created. For a given local agent, up to 100 shared variables can be created.

Use Cases

Local agent variables are variables that are partly persisted (half-life) within the local computer. While Automation variables are defined for the whole life of the automation execution, each time the automation starts the variables are reset. Local variables aim to keep a state between the start of the same automation within the same project or beyond the project. For instance, let’s say that you want to count the number of times the automation starts. First, you need to create a local variable called “myAutomationCounter”. Then you will increment the variable each time the automation starts. In the end, you can retrieve the values.

Set Local Agent Variable

With the activity ‘Set Local Agent Variable’ you can set the value of a variable and in case the variable does not already exists you will create the variable in the same step.

Input parameters are variableName and variableValue as mandatory parameters. With the parameter variableScope you can decide if the variable is available on project or on global level.

The variableScope parameter is available in all activities in this area.

TIP: Be careful with the naming of the variables and do not use the same name on global and project level. If you use the same name the variableScope parameter is important to get the right values.

Get Local Agent Variable

With the activity ‘Get Local Agent Variable’ you can retrieve the values of the variables.

The parameters are similar to the Set activity described above.

Delete Local Agent Variable

With the ‘Delete Local Agent Variable’ you can delete the variables.

Parameters are variableName and variableScope.

List Local Agent Variable

If you need a list of all available variables you can use the activity ‘List Local Agent Varibale’.

The output parameter list provides you the retrieved data.

Clear Local Agent Variable

With the activity ‘Clear Local Agent Variable’ you can clear the variables.

Local Agent Credentials

A set of activities called “Local Agent Credentials” allow to create, update, and retrieve local credentials in the catalog Generic Credentials leveraging Windows Credential Manager. For more information about Windows Credential Manager, please visit the Microsoft website.

The following are the definitions of location:

  • CURRENTUSER: The credential persists for the life of the logon session. It will not be visible to other logon sessions of this same user. It will not exist after this user logs off and back on.
  • LOCALMACHINE: The credential persists for all subsequent logon sessions on this same computer. It is visible to other logon sessions of this same user on this same computer and not visible to logon sessions for this user on other computers.

Use Case

The main use case is to store securely credentials information and retrieve this information to fill when needed other applications with such credentials.

Set Local Agent Credentials

With the activity ‘Set Local Agent Credentials’ you can set the value of a variable and in case the variable does not already exists you will create the variable in the same step.

You can define the credential Name, the location and the credentials with login and password. In addition you can use a prefix.

By default, all credentials that are being created, updated, or retrieved will have a prefix. The prefix is “SAPIntelligentRPA_”. The prefix can be changed to accommodate your need. If you don’t want to use a prefix, use the Empty Text value. However, you must pay attention not to remove, update or retrieve unexpected personal information.

Get Local Agent Credentials

With the activity ‘Get Local Agent Credentials’ you can retrieve the values of the variables.

Delete Local Agent Credentials

With the ‘Delete Local Agent Variable’ you can delete the variables.

Conclusion

Now you are able to use local variables and credentials to mange this artefacts on you local machine.

For more information on SAP Intelligent RPA

1 Comment
You must be Logged on to comment or reply to a post.