Invoke MuleSoft RPA from the Composer

Photo of Leonardo Cassimiro Written by Leonardo Cassimiro,   Sep 1, 2022

In the previous blog Publish MuleSoft RPA into Exchange and invoke it from a Mule API I demonstrated the step-by-step process of calling a MuleSoft bot from a Mule API.

Today, I will continue the theme and use the same use case Hello World. Continue reading to learn how to deploy an application to CloudHub, an integration platform as a service (iPaaS). I will explain how to add a callback URL to be called after a bot completes running and how to configure and invoke a bot via Mulesoft Composer.

 

Adding a callback URL

I updated the Set Payload Transform Message by adding the callbackUri (http://helloworldrpa.ir-e1.cloudhub.io/callback) attribute.

Mule callbackAdded callbackUri.

 

I also created a flow with a Listener (/callback) to be called after a Bot completes its execution and a Logger component to display the Payload.

Payload

The next step is to deploy the application to CloudHub.

Deploy to cloudhubDeploy top CloudHub

Below is the Bot being invoked through the helloworldrpa application deployed in CloudHub. Once the bot finishes. the callback URL is invoked.

deploy and execute callback

Invoke Mule RPA from Mulesoft Composer

MuleSoft Composer is a no-code integration platform that enables users to integrate data and apps easily. The process starts by building flows using various connectors, including Salesforce, Workday, Slack and ServiceNow. A new connector to Mulesoft RPA Connector is available now.

I started by creating a flow and configuring a scheduler that executes every fifteen minutes. Next, I added the RPA connector and provided the values for the required fields:

  • Connection Display Name
    • Enter a connection name that easily identifies this connection.
  • RPA API URL
    • Is the RPA Manager URL. You can find the URL from the Published RPA Asset in Exchange.

    RPA API URL

  • API Key
    • User API Key created in Mulesoft RPA Manager under User Management → User API Keys. Below you can see how to create a User API Key.

    Create user API key-1

Create User API Key.

The steps below show how to connect Composer with Mulesoft RPA Account.

connect to MuleSoft Composer

Once we have the connection between MS Composer and MS RPA completed it is time to Invoke the Bot by following the steps below:

  • In Action select Invoke RPA Process.
  • For RPA Process select Hello World.
  • In Output select Use response in this flow to get the status results from the Bot execution.
  • Click Select Optional Field in Input fields.
  • Check the Message field name and click on Apply.
  • Enter a value for the Message field (Hello World - MuleSoft Composer).
  • Click on the Test button at the right top corner.

envoke a bot from MuleSoft ComposerA bot is invoked from MuleSoft Composer.

 

Overall, working with MuleSoft RPA was easy and straightforward. It has been well integrated into the MuleSoft ecosystem. I would love to know what was your impression of the new tool.

I hope you found this post useful and see you in the next one.

We’d love to hear your opinion on this post