Importing Mulesoft Apps

MuleSoft Apps created in Anypoint studio can be used in Automation workflows to design a Business process. Anypoint Studio supports the ability to export projects or various project elements in a .zip package that includes all information specific to the application, including flows, configuration files, Java classes, referenced HTML files, and more. Administrators or Workflow designers can import the package file into Luma Automation and use the operations as steps in their workflows. For more information, refer to Importing and Exporting MuleSoft Apps.

Once the MuleSoft Apps are imported, related operations can be configured in Luma Automation. These operations can then be used in the Workflow as Service Tasks.

MuleSoft Apps are created and managed in Anypoint Studio. Any change to the app should be done in Anypoint platform and imported in Luma Automation.

To use MuleSoft Apps in Luma Automation workflows:

Import MuleSoft Apps

To import MuleSoft Apps, follow the below steps:

  1. Navigate to Integrations and click on Create App.

  2. On Create App page:

    1. Add the App Name and Description.

    2. Select MuleSoft as Integration Type.

    3. In the App Package, browse the .zip package generated from Anypoint studio.

    4. Select the Execution Agent to be used to deploy and execute the operation on the created Application.

    5. Select the Default Agent.

    6. You may also add an icon for the application. Select an image as App Icon.

  3. Click on Create.

The new Application now starts appearing in the Connected App list.

Execution Agent is a secure connection between Luma automation and Integration Application. The Tunnel is used to the execute the operations on the MuleSoft runtime on the third party system. It is essential that the Execution Agent is setup and running to execute the MuleSoft operations.

Reach out to your Tenant administrator or Serviceaide support team to setup Execution Agent for your application.

Configure MuleSoft Operations

Once the App is created, operations defined in Anypoint studio can be configured in Luma Automation. These operations can be added to the workflow to execute the task through the MuleSoft runtime. For each operation, we can define the input parameters required, request payload, and the response received.

To configure the operations, follow the below steps:

  1. On the Integration workspace, locate and select the new application.

  2. Click on Create Operation.

  3. Add the Operation Name and select the URI for the operation. The URI refers to the web service or operation to be performed in the target system. The operations configured in Anypoint studio are imported in Luma Automation and are available in the dropdown.

  4. In the Inputs section, define the Input parameters required for the operations. These parameters are used in the operation payload.

    1. Click on Add.

    2. Provide the Parameter name and Data type.

    3. Mark Required if the value is mandatory for the operation and add the Required Field Validation Message.

  5. Add the Request Payload in the format required for the operation, Use the input parameter defined to form the payload.

  6. In the Output section, define Response Output Parameters and extract the information from the response received from the response. You may configure parameters for as many values as needed.

    1. Click on Add.

    2. Provide the Parameter name, Data type, and Default Value.

    3. Based on the response from the operation, select the Extract type

    4. Add the Expression to refer to the value to be assigned to the parameter.

  7. You may also define Meta Parameter to use the information received as the Response Header in the operation.

  8. Click on Save to create the Operation.

You can create the operations incrementally. To import new operations from Anypoint studio, edit the app and import the new configuration file. Ensure that the new package includes the previously imported URIs. This ensures that the existing operations do not break.

Use Operations in Workflow

The MuleSoft operations can now be used as steps in the Workflow. Similar to REST operations, The operations can be added as a Service Task while designing the workflow. For more information, refer to Design Automation Workflow.

Follow the below steps to use the operation in the workflow:

  1. On the Workflow Designer, locate the application from the Connected Apps list.

  2. Select the application and drag the component on the designer. This creates a Service task for the selected application,

  3. On the properties panel, add the Service task Name and select the Execution Agent.

  4. Navigate the Operation tab and select the operation to be executed. All the Operations configured for the applications are available in the list.

  5. Based on the selected Operation, configurations such as Input parameters, Request Payload, and Output parameters are automatically populated.

  6. Add mapping for the input parameters by mapping the parameters to other workflow parameters or constant values.

  7. You may add Error Handling conditions, Pre-execution, and Post-execution steps as needed.