This practical tutorial provides an introduction to leading Robotic Process Automation (RPA) platform and demonstrates how it can be integrated with the open source no-code/low-code application platform. There are 3 parts: UiPath Joget Part 1: Get Started with UiPath Part 2: Get Started with Joget Part 3: Integrate UiPath with Joget For background information, please read . Robotic Process Automation: A Quick Introduction and How it Complements Low-Code Application Platforms Part 1: Get Started with UiPath UiPath Overview is one of the leading RPA vendors, having been recognized as a leader in . UiPath “The Forrester Wave™: Robotic Process Automation, Q2 2018” report UiPath consists of 3 main components: UiPath Component Architecture : UI tool to visually design the process to automate UiPath Studio : Web application that manages the creation, monitoring, and deployment of all robots and processes UiPath Orchestrator : Runs processes that were built in UiPath Studio. Execution agent that is installed and executed in the actual machine. UiPath Robot So in a nutshell, this is how it works: Visually design a process using UiPath Studio in a developer PC, Publish/deploy the process to UiPath Orchestrator to be managed, scheduled and monitored. The actual process itself is executed by the UiPath Robots installed in the respective machines. UiPath Concepts and Terms Here are some of the basic concepts and terms in UiPath that you should get familiar with for the tutorial later: : Represents the actual machine the robot executes in Machine : An environment is a grouping of Robots, that is used to deploy processes Environment : A UiPath Studio project that is published Package : A process represents the association between a package and an environment. Each time a package is deployed to an environment, it is automatically distributed to all machines that belong to that environment. Process : A job is the execution of a process on one or multiple Robots. Job There are other concepts for more advanced usage that will not be used in the tutorial, such as: : A process library describes a system of activities that are reusable for sharing Library : Enables jobs to be executed in a preplanned manner Schedule : Usually represent shared variables or credentials that can be used in different projects. Asset : A place to store multiple types of data, such as invoice information or customer details. Queue Step 1: Sign Up for UiPath Cloud Platform Let’s sign up for an account at . There is a Community plan to get started for free, so we’ll to register. https://www.uipath.com/platform-trial Choose Community Sign up using a social account or an email, and upon registration you will be taken to a dashboard at . https://platform.uipath.com A represents a deployment in the company. A default service is already created e.g. DemoDefault. service Select the service name to open the web application. UiPath Orchestrator Step 2: Install UiPath Studio and UiPath Robot Download the installer (UiPathStudioSetup.exe) from the , and install it on the target computer. More information on UiPath Studio is available at the . UiPath Studio Resource Center UiPath Studio Guide After installing UiPathStudioSetup.exe, start from the Windows Start menu and activate it. You can start free by activating the Community Edition. UiPath Studio Step 3: Launch UiPath Robot and Obtain Machine Name In the Windows Start menu, search for and start it UiPath Robot Click on the icon to open the window, and copy the . Gear Orchestrator Settings Machine Name Step 4: Obtain Machine Key Back in the , create a new under the Machines menu. UiPath Orchestrator Machine : Make sure that the name matches the shown in the earlier. IMPORTANT Machine Name UiPath Orchestrator Settings View the selected and copy the . Machine Machine Key Step 5: Connect UiPath Robot to the Machine In the click on the icon to open the window. UiPath Robot, Gear Orchestrator Settings Fill in the ( for the UiPath Cloud Platform) and the copied in the previous step, then click on . Orchestrator URL https://platform.uipath.com Machine Key Connect Once connected, you should see “ ” at the bottom of the window. Status: Robot unavailable Hover over that message, and you should see the reason “ ” This message means that the machine connection is valid, so now it’s time to create a robot. If you see a different reason then there might be an error in your configuration so you will want to double check your settings. Robot is not available. Step 6: Create a Robot In the under the menu, click on the icon on the top right. UiPath Orchestrator Robots Plus Choose “standard robot that works on a single standard machine”. Assign the robot to the machine created previously. Set a “Name”, and fill in the actual Windows login for the target machine (where the is installed) under and . UiPath Robot Domain\Username Password Step 7: Add Robot to Environment Next, we’ll need to add the created to the . Select the tab at the top of the menu and select the option. Robot Environment Environments Robots Manage Select the previously created robot and click . UPDATE At this point, the robot should be successfully connected to the machine. Check the and the status should show “ ” UiPath Robot Orchestrator Settings Connected, licensed Step 8: Start a Job Now that the robot is deployed, it’s time to start a job to test it. Under , click on the icon on the top right. Jobs Play Select the pre-existing and the previously robot, then click on . Demo Process Start In the , it will show “ ”. Once the package has been installed, it will show “ ” which means the process has started. In this demo process, a Hello popup dialog will appear. UiPath Robot Installing package… Job started processing The robot has successfully started the job. You can monitor the robots and jobs in the menu in the . Monitoring UiPath Orchestrator Step 9: Prepare for UiPath Integration In June 2019, UiPath introduced a new mechanism for . There are a number of steps required to retrieve some required information for integration: consuming its Cloud APIs 1. Get Access and ID Tokens 1.1 Generate Code Challenge and Code Verifier In a web browser, visit and run the following code: https://repl.it/languages/nodejs function base64URLEncode(str) { return str.toString('base64') .replace(/\+/g, '-') .replace(/\//g, '_') .replace(/=/g, ''); } function sha256(buffer) { return crypto.createHash('sha256').update(buffer).digest(); } console.log("Generating challenge and Verifier"); var cryptoResult = crypto.randomBytes(32); var verifier = base64URLEncode(cryptoResult); var challenge = base64URLEncode(sha256(verifier)); console.log("Code challenge: " + challenge) console.log("Code verifier: " + verifier); Take note of the and values in the output e.g. code challenge code verifier Generating challenge and Verifier Code challenge: RzYlHiiGzPGgOLaRQJYftZ1mmc3sCbeicZVRftTmC-A Code verifier: YVMnLczXQgJ9dwzV7MlMWEjGyAia4nXvTZzU4UVrAPE 1.2 Get Authorization Code Replace the into the URL below, and visit the updated URL in a browser. code challenge https://account.uipath.com/authorize?response_type=code&nonce=b0f368cbc59c6b99ccc8e9b66a30b4a6&state=47441df4d0f0a89da08d43b6dfdc4be2&code_challenge=[code_challenge]&code_challenge_method=S256&scope=openid+profile+offline_access+email &audience=https%3A%2F%2Forchestrator.cloud.uipath.com&client_id=5v7PmPJL6FOGu6RB8I1Y4adLBhIwovQN&redirect_uri=https%3A%2F%2Faccount.uipath.com%2Fmobile The browser should redirect to https://account.uipath.com/mobile?code=[authorization_code]&state=47441df4d0f0a89da08d43b6dfdc4be2 Copy the in the URL. authorization_code 1.3 Get Refresh Token Using any API testing tool (e.g. ), submit a request to Postman POST with the body below, replacing the values for and accordingly. https://account.uipath.com/oauth/token [authorization_code] [code_verifier] { "grant_type": "authorization_code", "code": "[authorization_code]", "redirect_uri": "https://account.uipath.com/mobile", "code_verifier": "[code_verifier]", "client_id": "5v7PmPJL6FOGu6RB8I1Y4adLBhIwovQN" } Copy the value of the from the response: refresh_token { "access_token": "eyJ0eX...", "refresh_token": "CBZcOD6vrP2FQ9qa8fuqDdfoEwnVPuR2Kp...", "id_token": "eyJ0eX...", "scope": "openid profile email offline_access", "expires_in": 86400, "token_type": "Bearer" } 1.4 Get Access Token and ID using the Refresh Token Using any API testing tool, submit a request to POST with the body below, replacing the values for accordingly. https://account.uipath.com/oauth/token [refresh_token] { "grant_type": "refresh_token", "client_id": "5v7PmPJL6FOGu6RB8I1Y4adLBhIwovQN", "refresh_token": "CBZcOD6vrP2FQ9qa8fuqDdfoEwnVPuR2Kpz-hitbTAIzG" } Copy the values for and from the response. access_token id_token { "access_token": "eyJ0eX...", "id_token": "eyJ0eX...", "scope": "openid profile email offline_access", "expires_in": 86400, "token_type": "Bearer" } 2. Get UiPath Account, Service and Process Identifiers 2.1 Get the Account Logical Name Using any API testing tool, submit a request to POST with a request header https://platform.uipath.com/cloudrpa/api/getAccountsForUser Authorization: Bearer [id_token] Copy the value for from the response: accountLogicalName { "userEmail": "demo@domain.com", "accounts": [ { "accountName": "Demo", "accountLogicalName": "Demo" } ] } 2.2 Get Service Instance Logical Name Using any API testing tool, submit a request to POST with a request header https://platform.uipath.com/cloudrpa/api/account/ /getAllServiceInstances [accountLogicalName] Authorization: Bearer [id_token] Copy the value for from the response: serviceInstanceLogicalName [ { "serviceInstanceName": "DemoDefault", "serviceInstanceLogicalName": "DemoDefaultzous50676", "serviceType": "ORCHESTRATOR", "serviceUrl": "https://platform-community.azurewebsites.net" } ] 2.3 Get Release Key for the Desired Process We will now need to retrieve the Release Key, a unique identifier for a desired process. Using any API testing tool, submit a request to GET with a request header https://platform.uipath.com/odata/Releases Authorization: Bearer [id_token] Copy the value for from the response**:** Key { "@odata.context": "https://platform.uipath.com/odata/$metadata#Releases", "@odata.count": 1, "value": [ { "Key": "b27c7363-459c-4520-bae5-660d4a1d3813", "ProcessKey": "Demo_Process", "ProcessVersion": "1.0.21", "IsLatestVersion": false, "IsProcessDeleted": false, "Description": "Demo Process", "Name": "Demo Process", "EnvironmentId": 98069, "EnvironmentName": "Demo Environment", "InputArguments": null, "QueueDefinitionId": null, "QueueDefinitionName": null, "Id": 120897, "Arguments": { "Input": null, "Output": null }, "ProcessSettings": null } ] } 2.4 Test Orchestrator API Call to Start a Job At this point, make sure you have the following critical information at hand: (Refresh Token) refresh_token (Access Token) access_token (Service Instance Logical Name) serviceInstanceLogicalName (Release Key) Key Let’s try making an API call to start a job for the process. Using any API testing tool, submit a request to POST with 2 request headers https://platform.uipath.com/odata/Jobs/UiPath.Server.Configuration.OData.StartJobs Authorization: Bearer [access_token] X-UIPATH-TenantName: [serviceInstanceLogicalName] and the body: { "startInfo": { "ReleaseKey": "b27c7363-459c-4520-bae5-660d4a1d3813", "Strategy": "All", "RobotIds": [ ], "JobsCount": 0, "Source": "Manual" } } If successful, the response will be as follows, with the status of the Job shown in the attribute: State { "@odata.context": "https://platform.uipath.com/odata/$metadata#Jobs", "value": [ { "Key": "e811bd29-26fb-4cc3-af91-7fd6308ca643", "StartTime": null, "EndTime": null, "State": "Pending", "Source": "Manual", "SourceType": "Manual", "BatchExecutionKey": "382e7a96-a5b9-4343-b258-26a80cf87f80", "Info": null, "CreationTime": "2019-06-12T08:02:03.2595408Z", "StartingScheduleId": null, "ReleaseName": "Demo Process", "Type": "Unattended", "InputArguments": null, "OutputArguments": null, "HostMachineName": null, "HasMediaRecorded": false, "Id": 10169582 } ] } Part 2: Get Started with Joget Joget Overview is an open source no-code/low-code application platform for faster, simpler digital transformation. Joget combines the best of business process automation, workflow management and rapid application development in a simple, flexible and open platform. Visual and web-based, it empowers non-coders to instantly build and maintain apps anytime, anywhere. Joget Joget Platform Architecture Sign Up for Joget Workflow On-Demand If you already have your own installation of the Joget platform, you can use it and skip this step. Otherwise, you can sign up for , a hosted version of the Joget platform that allows you to quickly get started. Joget Workflow On-Demand Visit and click on to register a new account. https://cloud.joget.com Sign Up Free Once you have successfully verified your email, you will be linked to your own running installation of Joget Workflow where you’ll be able to . visually build a full app in 30 minutes without coding Part 3: Integrate UiPath with Joget How to Integrate with UiPath UiPath provides the for integration. Orchestrator API The most commonly used function is , which should satisfy a majority of use cases. We will use this function in the following integration tutorial. Starting a Job Design a Joget Process to Start a UiPath Job Since the is a API with data in format, we can use the Joget to invoke the API. UiPath Orchestrator API REST JSON JSON Tool Before we start, ensure that you have the following critical UiPath information at hand (obtained from the previous tutorial): Prepare for UiPath Integration (Refresh Token) refresh_token (Service Instance Logical Name) serviceInstanceLogicalName (Release Key) Key Step 1. Design New App First, let’s design a new app by clicking on in the Joget . Design New App App Center Fill in desired values for the and , and click . App ID App Name Save Step 2. Design New Process Click on the menu, then on the button to launch the . Processes Design Process Process Builder Design a simple process containing 2 tools, as shown below. Click on the pencil icon after hovering over the process name along the top. Enter a suitable process name and create 3 workflow variables to store the response values from UiPath API call: edit status id_token access_token Click on . Deploy Step 3. Configure First Tool to Get UiPath Access Token Once the process has been deployed, close the Process Builder. In the process view page, select the tab. Map Tools to Plugins Click on for the first tool and select , then key in the following configuration: Configure Plugin JSON Tool JSON URL: https://account.uipath.com/oauth/token Call Type: POST POST Method: Custom JSON Payload Custom JSON Payload: { "grant_type": "refresh_token", "client_id": "5v7PmPJL6FOGu6RB8I1Y4adLBhIwovQN", "refresh_token": "[refresh_token]" } Under , map the variables to store the tokens in the matching workflow variables i.e. Store to Workflow Variable access_token: access_token id_token: id_token Click on to save. Submit Step 4. Configure Second Tool to Start Job Using the Access Token Click on for the second tool and select , then key in the following configuration: Configure Plugin JSON Tool JSON URL: https://platform.uipath.com/odata/Jobs/UiPath.Server.Configuration.OData.StartJobs Call Type: POST POST Method: Custom JSON Payload Custom JSON Payload (Replace with the actual Release Key): [Key] { "startInfo": { "ReleaseKey": "[Key]", "Strategy": "All", "RobotIds": [ ], "JobsCount": 0, "Source": "Manual" } } Request Headers (Replace [ ] with the actual Service Instance Logical Name: serviceInstanceLogicalName Authorization: Bearer #variable.access_token# X-UIPATH-TenantName: [serviceInstanceLogicalName] Under , map the status variable to the attribute in the response JSON i.e. Store to Workflow Variable State status: value[0].State That’s it. The Joget process has been configured to invoke the to start a job. UiPath Orchestrator API Step 5. Run the Process Now, let’s test the process. Click on the button at the top, then again in the confirmation dialog. Run Process Run Process Once the process has started, the 2 tools will execute as configured. To view the results of the process, navigate to -> . Monitor Completed Processes Select the process instance and you will see the 2 tools executed. Click on each activity to view the values of the workflow variables which obtained the results of the calls. Orchestrator API If you are running Joget on-premise and have access to the system logs, you will be able to see the tool requests and responses if the debugging option is enabled. If you are using , you can stream the logs directly in the web browser. Joget DX Back at the and , you would also be able to monitor the execution of the job. UiPath Orchestrator UiPath Robot Conclusion In this article we covered a tutorial on getting started with UiPath and Joget, followed by integration between them. As demonstrated in the tutorial, a lot of the work required for integration is in preparing the authentication mechanism to the UiPath Orchestrator API. Once the required integration keys are available, the configuration in Joget to invoke the UiPath API itself is pretty simple. To learn more about each of the platforms, visit and . UiPath Joget <a href="https://medium.com/media/3c851dac986ab6dbb2d1aaa91205a8eb/href">https://medium.com/media/3c851dac986ab6dbb2d1aaa91205a8eb/href</a>