# Quickstart

> The purpose of this guide is to show you how to use the **UiPath Add-in for Mulesoft** by performing a **Start Job** operation.

## Introduction

The purpose of this guide is to show you how to use the **UiPath Add-in for Mulesoft** by performing a **Start Job** operation.

## Start job

To start a job, you must provide at least the following request body input parameters:

| Parameter | Description |
| --- | --- |
| **ReleaseKey** | The ID you get by performing **Get Releases**. The Orchestrator needs this key to run a specific version of a process. |
| **Strategy** | For modern folders we recommend making use of `ModernJobsCount`. |
| **JobsCount** | How often the job is executed. |
| **InputArguments** | If your job has input parameters, they can be sent as a `JSON` string in the `InputArguments` field. If it does not have input parameters, this field is ignored. |

:::note
You need the **Folder ID** to perform the **Get Releases** operation. This ID is also required in the **Start Job** operation. To get **Folder Id** you need to perform the **Get Folders** operation.
:::

![Start Job operation flow in Anypoint Studio](https://dev-assets.cms.uipath.com/assets/images/add-ins/add-ins-docs-image-44653-16a62264-127d373a.webp)

Follow these steps to perform the operation:

1. In Anypoint Studio, click **File**, go to **New** and select **Mule Project**. Name the project and click **Finish**.
2. In the **Search** field, type `HTTP` and drag the **HTTP Listener** to the canvas.
3. Click the **HTTP Listener**, then click the green plus sign to the right of **Connector Configuration**. On the next screen, add the **Host** and **Port**, then click **OK**.
4. Provide the **Path** to **HTTP Listener** with the URI parameter. Example: `/job/start}`.
5. In the **Responses** tab, set the variable `http.status` with the default `200`, as indicated in the image below:

![HTTP Listener response tab with http.status variable set to 200](https://dev-assets.cms.uipath.com/assets/images/add-ins/add-ins-docs-image-44448-c48b1bf7-22331d71.webp)

### Steps

1. **Provide Connection Configuration Details**.
   * On the **Mule Palette**, search for the **Get Folders** operation and drag it onto the canvas. Click on the new configuration and provide configuration details as below:

     ![Get Folders operation connection configuration details](https://dev-assets.cms.uipath.com/assets/images/add-ins/add-ins-docs-image-44669-b5611191-3f60717b.webp)
2. **Provide the operation parameters.**
   * Enter the `$filter` parameter value as: `DisplayName eq 'UnattendedProcesses'`.

     ![Filter parameter set to DisplayName eq UnattendedProcesses](https://dev-assets.cms.uipath.com/assets/images/add-ins/add-ins-docs-image-44961-e18777c3-8f934ddb.webp)
   * This operation returns the **Folder ID**. You will use **Set Variable** to hold the value of **Folder ID**.
3. **Set Variable.**
   * Search **Set Variable** in the **Mule Palette**, drag and drop it beside **Get Folder**.
   * Enter the variable name and value as seen below:

     ![Set Variable configuration with Folder ID variable name and value](https://dev-assets.cms.uipath.com/assets/images/add-ins/add-ins-docs-image-44500-1b6ede16-05a6513f.webp)
4. **Get Releases.**
   * Search **Get Releases** in the **Mule Palette**, then drag and drop it beside **Set Variable**.
   * Enter the **folderId**, which you set as a variable in the previous step, as **UIPATH Organization Unit Id**.
   * This operation returns the **Release key**, which is required in the **Start Job** operation.
5. **Start Job.**
   * Search **Start Job** in the **Mule Palette**, then drag and drop it beside **Set Variable**.
   * Enter the **folderId**, already set as variable, as **UIPATH Organization Unit Id**.
   * In the **Body** parameter, enter a `JSON` as seen below:
     ```
     %dw 2.0
     output application/json
     ---
     {
      "startInfo": {
       "ReleaseKey": payload.value.Key[0],
       "Strategy": "ModernJobsCount",
       "JobsCount": 1,
       "InputArguments": "{}"
      }
     }
     ```
   * For a **Successful** response, set success payload as indicated below:
     ```
     output
     application/json
     ---
     {
     "message":"Operation has been executed successfully",
     "payload": payload
     }
     ```

     ![Start Job success response payload configuration](https://dev-assets.cms.uipath.com/assets/images/add-ins/add-ins-docs-image-44444-0157152f-e61e7767.webp)
   * For a **Failure** response, set `http.status` as `500`, and the error payload as:

     ![Start Job failure response with http.status set to 500](https://dev-assets.cms.uipath.com/assets/images/add-ins/add-ins-docs-image-44813-bf42aa8e-835c1c07.webp)

     ```
     output
     application/json
     ---
     {
     "message":"There is an error while performing this operation.",
     "error":error
     }
     ```

     ![Complete Start Job flow in Anypoint Studio canvas](https://dev-assets.cms.uipath.com/assets/images/add-ins/add-ins-docs-image-44697-7e9af392-1b93b5ae.webp)
