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:
Navigate to Integrations and click on Create App.
On Create App page:
Add the App Name and Description.
Select MuleSoft as Integration Type.
In the App Package, browse the .zip package generated from Anypoint studio.
Select the Execution Agent to be used to deploy and execute the operation on the created Application.
Select the Default Agent.
You may also add an icon for the application. Select an image as App Icon.
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:
On the Integration workspace, locate and select the new application.
Click on Create Operation.
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.
In the Inputs section, define the Input parameters required for the operations. These parameters are used in the operation payload.
Click on Add.
Provide the Parameter name and Data type.
Mark Required if the value is mandatory for the operation and add the Required Field Validation Message.
Add the Request Payload in the format required for the operation, Use the input parameter defined to form the payload.
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.
Click on Add.
Provide the Parameter name, Data type, and Default Value.
Based on the response from the operation, select the Extract type
Add the Expression to refer to the value to be assigned to the parameter.
You may also define Meta Parameter to use the information received as the Response Header in the operation.
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:
On the Workflow Designer, locate the application from the Connected Apps list.
Select the application and drag the component on the designer. This creates a Service task for the selected application,
On the properties panel, add the Service task Name and select the Execution Agent.
Navigate the Operation tab and select the operation to be executed. All the Operations configured for the applications are available in the list.
Based on the selected Operation, configurations such as Input parameters, Request Payload, and Output parameters are automatically populated.
Add mapping for the input parameters by mapping the parameters to other workflow parameters or constant values.
You may add Error Handling conditions, Pre-execution, and Post-execution steps as needed.