How To: Integrate K2 and Blue Prism

  • 15 February 2022
  • 0 replies

Userlevel 5
Badge +21

How To: Integrate K2 and Blue Prism


K2 Cloud
K2 Five
K2 blackpearl 4.6.11 to 4.7


Discover the options available for integration between K2 and Blue Prism, for both inbound and outbound communication that allows you to make calls from K2 (via SmartObjects) to start processes in Blue Prism and how make calls from Blue Prism interact with K2 forms and workflows.



The screenshots and instructions for third-party software are accurate at the time of publication. Third-party vendors may have changed or updated aspects of their systems (such as user interfaces, functionality, and security). As a result, this content may be outdated.

Prerequisites and Requirements

K2 requirements include:

  • K2 blackpearl 4.6.11 or greater, K2 Five or K2 Cloud
  • A basic understanding of K2 service types
  • Administrative rights to configure new service instances and to enable the REST API

Blue Prism requirements include:

  • Blue Prism version 5.0
  • Administrative rights in Blue Prism to enable web services
  • A deep understanding of authoring Virtual Business Objects (VBOs)


This article uses Blue Prism version 5.0 but later versions that include the web services should function in the same way. Consult your Blue Prism documentation for more information.


In addition to the above requirements, you must have a basic understanding of SOAP and REST-based web services.




Architectural Overview of Integration

Use the following diagram for understanding how K2 and Blue Prism communicate with each other.





Use the following scenarios for the type of integration you need between K2 and Blue Prism.


Scenario 1: Use the Endpoint Web Service to Call Blue Prism Processes and Objects

Enable the SOAP-based Blue Prism web services, and then create a K2 service instance and SmartObjects that interact with the Blue Prism services. Use these SmartObjects in a SmartForm or workflow to make calls from K2 to Blue Prism.


Scenario 2: Use the Workflow REST API to make calls from Blue Prism to K2

Use Blue Prism VBOs to call the K2 Workflow REST API to start or action K2 workflows from Blue Prism.


Scenario 3: Use K2 SmartForms and SmartObjects as a Replacement or Extension of Blue Prism

Use the Blue Prism Application Modeler to start and interact with K2 workflows and SmartObjects through a form.

With K2 blackpearl (which does not include the K2 Workflow REST API), you are limited to using Scenarios 1 and 3.



Scenario 1: Use the Endpoint Web Service to call Blue Prism Processes and Objects

You can interact with Blue Prism through SOAP-based web services by first enabling them in Blue Prism and then creating a service instance and SmartObjects in K2.


Step 1: Expose Blue Prism Artifacts as Web Service Endpoints

  1. Log in to Blue Prism with administrative privileges which are necessary to configure system options.
  1. Locate the System settings option on the left. There are two nodes you can use to configure the web service: Processes and Objects. Use processes to manage Blue Prism processes and objects to manage VBOs. Both nodes have an option called Exposure that allows you to configure web services. Keep in mind that you must enable these per artifact and that they are not enabled by default. The example used here uses a process but the steps are the same for VBOs.
  1. Expand the Processes node and select Exposure. This opens the Process - Exposure pane in which you click Expose a Process to open the dialog.
  1. Select the process to configure for web services and click Next.
  2. Specify a name for this endpoint and then click Finish.


  1. Verify that the process appears in the Web Service Exposed Processes list.



Step 2: Test Blue Prism Web Service Endpoints

Test the service you created in Step 1 by following these steps.


  1. Open a web browser.
  2. Browse to the URL http://<BluePrismMachineName>:8181/ws/
  3. Your browser should look similar to the following page:


  1. Click one of the WSDL links that you see on the page to see the XML representation of Blue Prism artifacts exposed by the endpoint.



Log in to the K2 Server and repeat this test from a web browser while logged in as the K2 service account. By browsing to the Blue Prism URL, you validate that there are not any communication issues between K2 and Blue Prism, and you make sure that there are not any policies in place (such as Internet Explorer Enhanced Security) that would interfere with the ability of the K2 server to make HTTP requests to the Blue Prism web service.


Step 3: Configure the K2 Endpoints WebService Instance

Use the Endpoints WebService service type to create a service instance that connects to Blue Prism using SmartObjects.


  1. Open a browser and go to K2 Management
  2. Click Integration > Service Instances
  1. Click Add and select Endpoints WebService as the Service TypeImage
  1. Specify values for Display Name, Description and select an Authentication Mode of Static
  1. Specify a User Name and Password of an identity that can log in to Blue Prism and use the endpoint
  2. In the Settings section of the service instance configuration, find the WebService URL property and enter the URL of the Blue Prism endpoint, including the ?wsdl. The example used here is http://dlx:8181/ws/K2Test?wsdl
  1. Click OK to complete the configuration and you see the following confirmation.
  1. The new instance is located on the Service Instances page. Find and select the instance, and then click Generate SmartObjects to generate the SmartObject necessary to call Blue Prism (or use K2 design tools to create your own SmartObjects). You can now use these SmartObjects with SmartForms, and in worfklows by dragging a SmartObject Event onto the workflow design canvas.


Scenario 2: Use the Workflow REST API to make calls from Blue Prism to K2

Blue Prism communicates with REST APIs using Virtual Business Objects (VBOs). Native support for REST APIs is not included in Blue Prism at the time of this article's publication. Talk with a Blue Prism subject matter expert with experience in authoring VBOs to help you set up this scenario.

There are many out-of-the-box examples with Blue Prism, including one that uses REST.


Step 1. Enable the K2 Workflow REST API

You must enable the K2 REST API before configuring Blue Prism.

  1. Open a browser and go to K2 Management
  2. Click Integration > APIs > Workflow Rest
  1. Click the Workflow API switch to enable the API
When the API is not enabled you see:
When the API is enabled you see:
  1. Use the Swagger documentation (accessed through the Swagger descriptor URL in the screen shown above) to find the methods you want to use, along with the URLs and parameters.



For more information about working with the Workflow REST API, see the K2 Cloud and K2 Five Developer Reference content.


Step 2: Create a Blue Prism VBO that calls the K2 REST API

In Blue Prism, create a VBO that calls the K2 REST API. (The example shown below is available to download, see the links on the right-hand side of this page).



Scenario 3: Use K2 SmartForms and SmartObjects as a replacement or extension of Blue Prism.

Another option for working with K2 from Blue Prism is using K2 forms to control a Blue Prism robot. Blue Prism enables interacting with forms and programs as part of their Application Modeler functionality.

Using Application Modeler, you could configure Blue Prism to start and interact with K2 workflows and SmartObjects through a form. In this way, the VBOs that you create could be leveraged by more people developing solutions with K2.



The integration path that you choose to integrate K2 and Blue Prism depends on the needs of your solution. While the VBO path provides the potential for a more generic, reusable integration that can be created with a certain amount of resilience built in, using a K2 form can be a viable option for scenarios where project scope or resource availability require a different approach. 


0 replies

Be the first to reply!