Blue Prism is a robotic process automation (RPA) tool that helps businesses automate repetitive tasks, allowing employees to focus on more complex, value-added activities. Blue Prism's platform enables users to automate workflows using configurable "processes" and "objects." Its reusable Visual Business Objects (VBOs) offer templates and presets that simplify connections to applications, files, and services.
Some VBOs can connect to databases via ODBC, and when combined with the CData ODBC driver, they allow seamless integration with various data sources supported by CData. This article demonstrates how easily you can integrate PingOne with Blue Prism using the VBO for ODBC and the CData ODBC Driver for PingOne to create automated business workflows as needed.
Create an ODBC Data Source for PingOne
If you have not already, first specify connection properties in an ODBC DSN (data source name). This is the last step of the driver installation. You can use the Microsoft ODBC Data Source Administrator to create and configure ODBC DSNs.
To connect to PingOne, configure these properties:
- : The region where the data for your PingOne organization is being hosted.
- : The type of authentication to use when connecting to PingOne.
- Either (required when using the default PingOne domain) or , configured as described below.
Configuring WorkerAppEnvironmentId
is the ID of the PingOne environment in which your Worker application resides.
This parameter is used only when the environment is using the default PingOne domain (auth.pingone).
It is configured after you have created the custom OAuth application you will use to authenticate to PingOne, as described in Creating a Custom OAuth Application in the Help documentation.
First, find the value for this property:
- From the home page of your PingOne organization, move to the navigation sidebar and click Environments.
- Find the environment in which you have created your custom OAuth/Worker application (usually Administrators), and click Manage Environment.
The environment's home page displays.
- In the environment's home page navigation sidebar, click Applications.
- Find your OAuth or Worker application details in the list.
-
Copy the value in the Environment ID field.
It should look similar to:
WorkerAppEnvironmentId='11e96fc7-aa4d-4a60-8196-9acf91424eca'
Now set to the value of the Environment ID field.
Configuring AuthorizationServerURL
is the base URL of the PingOne authorization server for the environment where your application is located.
This property is only used when you have set up a custom domain for the environment, as described in the PingOne platform API documentation.
See Custom Domains.
Authenticating to PingOne with OAuth
PingOne supports both OAuth and OAuthClient authentication.
In addition to performing the configuration steps described above, there are two more steps to complete to support OAuth or OAuthCliet authentication:
- Create and configure a custom OAuth application, as described in Creating a Custom OAuth Application in the Help documentation.
- To ensure that the driver can access the entities in Data Model, confirm that you have configured the correct roles for the admin user/worker application you will be using, as described in Administrator Roles in the Help documentation.
- Set the appropriate properties for the authscheme and authflow of your choice, as described in the following subsections.
OAuth (Authorization Code grant)
Set to OAuth.
Desktop Applications
Get and Refresh the OAuth Access Token
After setting the following, you are ready to connect:
- : GETANDREFRESH. To avoid the need to repeat the OAuth exchange and manually setting the each time you connect, use .
- : The Client ID you obtained when you created your custom OAuth application.
- : The Client Secret you obtained when you created your custom OAuth application.
- : The redirect URI you defined when you registered your custom OAuth application. For example: https://localhost:3333
When you connect, the driver opens PingOne's OAuth endpoint in your default browser. Log in and grant permissions to the application.
The driver then completes the OAuth process:
- The driver obtains an access token from PingOne and uses it to request data.
- The OAuth values are saved in the location specified in , to be persisted across connections.
The driver refreshes the access token automatically when it expires.
For other OAuth methods, including Web Applications, Headless Machines, or Client Credentials Grant, refer to the Help documentation.
When you configure the DSN, you may also want to set the Max Rows connection property. This will limit the number of rows returned, which is especially helpful for improving performance when designing reports and visualizations.
Connect with PingOne data and create an automation flow in Blue Prism
In this section, we'll go through the steps to connect live PingOne data and create an automation flow in Blue Prism to load the PingOne data into an Excel sheet.
Add VBOs for ODBC
To get started, download, and add the VBO for ODBC to Blue Prism by following these steps:
- Download the Connector for ODBC Utility Blue Prism file from the provided URL.
π Download the ODBC connector from the Blue Prism Developer Community
- A file named "Data - ODBC vx.x.x" with a ".bprelease" extension will be downloaded. Rename the file as "Data - ODBC". Make the necessary modifications and save the file with a ".bpobject" extension.
- Open Blue Prism and navigate to File > Import > Process/Object. Click Browse, select the modified file as an object, and then click Next.
π Navigate in Blue Prism platform to import ODBC object recently downloaded
π Choose the input file
- Click on Next in the Process Logging Overview screen. The import is now successful. Click on Next again to complete the process.
π Click Next in Process Logging Overview screen
π ODBC object successfully imported
- Once the import is complete, "Data - ODBC" will be added to the object list as shown below.
π ODBC connector added in the object list in Blue Prism
Now, you can easily connect to the CData ODBC Driver for PingOne from Blue Prism and create the necessary automation workflows.
Create a new automation process
After configuring the CData ODBC driver and adding the VBO for ODBC to Blue Prism, we can create a new automation process or flow using the following steps:
- Go to File > New. Select Process from the New Process or Business Object window and click Next.
π Select a new process
- Enter a new process name in the New Process window.
π Add a process name
- Specify a process description if you want and click Finish.
π Specify a process description
- This will launch a process initialized as follows:
π New process is initialized
Add ODBC to the process
Processing the ODBC connection involves three main stages. While the middle stage handles the actual data operations, preparatory and concluding steps are also necessary to create a complete flow in Blue Prism.
- Open process: Establishes a new connection.
- Execute process (ExecuteNonQuery): Executes SQL commands or INSERT statements.
- Close process: Terminates the connection.
Add a process to open ODBC
First, add an open process for ODBC to use the connection already made on CData ODBC Driver for PingOne.
- Place Action decision block on the Blue Prism canvas from the left panel and double-click on it to open the settings screen.
π Place a new action decision block
- From the list of business objects, select the "Data - ODBC" object you just imported, then choose "Open" from the list of actions.
π Choose Data-ODBC from the list of business objects
π Choose Open from the list of actions
The Open action requires a Connection String as an input parameter in the Inputs tab. Enter the DSN name of the CData ODBC driver you configured, using the format: "DSN=CData PingOne Source".
π Add the connection string from the CData ODBC driver configured earlier
Note: Click the Expression Editor button on the right, then click Validate to check if the added expression is correct. Use the same method to check all the expressions used in this article.
- Click on the Outputs tab and edit the output message as "ODBC Connection". Click OK to save the process.
π Name the output as ODBC Connection
Add a process to retrieve data via ODBC
Next, let's add a process to retrieve data from PingOne.
- Place another Action block on the canvas below the previous one.
π Place another action on the Blue Prism canvas
- Select "Data - ODBC" from the list of business objects, then choose "Execute" from the list of actions. By selecting "Execute", you can specify SQL commands to retrieve data.
- In the Inputs tab, enter a SQL query within double quotes in the Query String section to retrieve data from PingOne. For example:
SELECT * FROM [PingOne].[[CData].[Administrators].Users]
π Select Execute from the list of actions and enter a SQL query in the Connection String
NOTE: The information about the tables and columns used in the SELECT statement can be found in the "Tables" tab of the ODBC DSN.
π Information about the PingOne tables and columns can be found in the ODBC DSN connected earlier
- Additionally, the processing results are stored in variables to effectively manage the outcomes in Blue Prism. To create an output variable, click the Results variable icon in the Output tab and then click OK.
π Click Results as output
Add a process to close ODBC
Finally, add a close routine to terminate the ODBC processing and release the connection.
- Place an Action block on the canvas again.
π Place a new action block
- Select "Data - ODBC" from the list of business objects and "Close" from the list of actions. There are no specific parameters to configure for Close.
π Select Close from the list of actions
- Finally, connect the "links" from the left panel to create a process like this:
π Add links to all the decision blocks to create an entire flow
Add a process to save live PingOne data to Excel
The processes demonstrated above do not retrieve the data independently, so let's proceed to write it into an Excel file. We will use the Excel VBO to create the next flow.
- Download and add an Excel VBO object in Blue Prism by following a process similar to the one described in the article's Add VBOs for ODBC section.
- In this process, place six Action blocks one after the other to complete all the follow-up steps for creating the MS Excel process flow.
- In the first Action block, select "MS Excel VBO" from the list of business objects and "Create Instance" from the list of actions. This step is used to create a new instance of Microsoft Excel.
π Add a new action to start creating a new MS Excel flow to retrieve PingOne data
π Select Create Instance from the list of actions
In the Outputs tab, add a handle name.
π Add a handle name
- In the next block, select "MS Excel VBO" from the list of business objects and "Show" from the list of actions. This action makes the Excel application visible on the screen.
π Select Show from the list of actions
In the Inputs tab, add "[handle]" as the handle value.
- Again, select "MS Excel VBO" from the list of business objects and "Create Workbook" from the list of actions for the consecutive block. This creates a new workbook to store the incoming PingOne data.
π Select Create Workbook from the list of actions
In the Inputs tab, enter handle value as "[handle]" and in the Outputs tab, set a new Workbook Name.
π Enter the handle value and set a new workbook name
- For the next action, select "MS Excel VBO" from the list of business objects and "Write Collection" from the list of actions. It writes the "Results" obtained via ODBC to the input parameter "Collection". Enter the following parameters in the Input tab:
- handle: [handle]
- Workbook Name: [Workbook Name]
- Collection: [Results]
- Worksheet Name: "Sheet1"
- Cell Reference: "A1"
- Include Column Names: True
π Select Write Collection from the list of actions and enter the input parameters
- Next, select "MS Excel VBO" from the list of business objects and "Save Workbook" from the list of actions to save the workbook. In the Inputs tab, assign the following values:
- handle: [handle]
- Workbook Name: [Workbook Name]
π Select Save Workbook from the list of actions and enter the input parameters
- In the final action, select "MS Excel VBO" from the list of business objects and "Exit" from the list of actions. This action will finally close the workbook.
π Select Exit from the list of actions
- Connect the action blocks with the "links" to get the final Excel process flow.
π Link all the action decision blocks to create the final process flow
Run the process to check the operations
Once the process is complete, click the Run button to see it in action.
- Click the Run button at the top left of the screen (as shown).
π Click on Run to start the process
- If the PingOne data is finally written to an Excel file like the one below, consider the entire process to be working successfully.
π The Excel sheet will finally receive and save the intended PingOne data
Get Started Today
Download a free, 30-day trial of the CData ODBC Driver for PingOne and integrate PingOne data into Blue Prism to create automated business workflows.
Reach out to our Support Team if you have any questions.