MuleSoft (Anypoint Platform™) is a platform that helps app developers to design custom APIs and deploy to a Mule Enterprise Service Bus runtime (ESB). With MuleSoft integration service in Kony Fabric, developers can interact with more than 50 types of adapters.
To integrate a MuleSoft service in Kony Fabric, developers need to create a project in MuleSoft Studio, export the project to a local system, and then deploy it to Cloud Hub. On top of the project deployment, a RESTful API modeling language (RAML) file needs to be built, which defines all the API definitions in the project. A RAML file also contains the defined schemas with properties. When a user creates a project from AnyPoint API Studio with any adapter and builds a RAML file over the project, all the APIs can be used in Kony Fabric integration service. When a Kony Fabric user selects a MuleSoft adapter from Kony Fabric Console, based on the cloud hub portal credentials of the MuleSoft adapter, the system retrieves metadata from a RAML file and displays all APIs of a RAML file. Developers can add these APIs as operations in MuleSoft integration service in Kony Fabric Console.
Kony Fabric discovers the MuleSoft endpoints through a RAML file. Kony Fabric parses a RAML file and exposes all the MuleSoft endpoints through the integration service. Mobile app developers can use the configured MuleSoft integration service and access the backend systems supported by MuleSoft’s adapters.
Note: In Kony Fabric Console, you can provide login credentials of MuleSoft or upload a RAML file to configure an integration service.
Adding a MuleSoft service involves the following steps:
To configure a Mulesoft adapter in Integration Service Definition tab, follow these steps:
Note: XML is selected, by default.
Fields | Description |
---|---|
Version | Select the version for the service. |
Choose API Discovery Type | Click one of the following modes
|
Field | Description |
---|---|
Custom code |
To specify a JAR associated to the service, select one from the Select Existing JAR drop-down menu or click Upload New to add a new JAR file. Make sure that you upload a custom JAR file that is built on the same JDK version used for installing Kony Fabric Integration. Important: Make sure that you upload a custom JAR file that is built on the same JDK version used for installing Kony Fabric Integration. |
API Throttling |
|
Use proxy from settings | To enable the proxy, select the check box. The Use proxy from settings check box dims when no proxy is configured under the Settings > Proxy. |
Note: All options in the Advanced section are optional.
The Operations List tab appears only after the service definition is saved.
Note: Click Operations List tab > Configure Operation. The Configured Operations list appears.
To create an operation, follow these steps:
Note: To use an existing integration service, refer to How to Use an Existing Integration Service.
Provide the following details to configure operations.
Field | Description |
---|---|
Groups |
Select the title of the RAML file that is uploaded at AnyPoint CloudHub. Based on the selected groups, the Versions drop-down list is loaded with the versions of the RAML file. |
Versions |
Select the required version. You can select only one version of the RAML file. |
Resources |
Select the required resource. |
Operation (HTTP Methods) |
Select the required check boxes for the defined methods in the RAML file. You can click Select all check box to select all the operations. |
The system creates a JSON service for the MuleSoft service. Operation names are auto-generated in the format. The default name format of a MuleSoft operation is <operation_name><resource_name>
. You can change the operation name if required.
For example, postfolder
.
Note: To edit an operation, you can also click the operation from the service tree pane.
The system displays the selected operation in the edit mode. Provide the following details to configure the operation.
Fields | Description |
---|---|
Name | The Name field is pre-populated with fields names of the selected database. You can edit this field. |
Operation Security Level | It specifies how a client must authenticate to invoke this operation. Select one of the following security operations in the Operation Security Level field.
Note: The field is set to Authenticated App User, by default. The Operation Path field is prepopulated with MuleSoft URL. You can edit this field if required. |
Custom Code Invocation | You can add pre and post processing logic to services to modify the request inputs. When you test, the services details of various stages in the service execution are presented to you for better debugging. All options in the Advanced section are optional. For more details, refer to Preprocessor and Postprocessor. |
Additional Configuration Properties | Additional Configuration Properties allows you to configure service call time out cache response. For information on different types of configuration properties, refer Properties. |
Front-end API | Front-end API allows you map your endpoint (or) backend URL of an operation to a front-end URL. For detailed information, refer Custom Front-end URL. |
Server Events | Using Server Events you can configure this service to trigger or process server side events. For detailed information, refer Server Events. |
Note: All options in the Advanced section for operations are optional.
Integration services accept only form-url-encoded
inputs for all input parameters provided in service input parameters (request input).
You can perform the following actions in Request Input tab:
Field | Description |
---|---|
Name | Enter the name for the request input parameter. Note: In the Body tab > NAME field, the input parameters are prepopulated based on the properties of the input schema of a RAML file. |
Value | Three different options are available in Kony Fabric under VALUE during configuration of any operation. When you start editing this field, dependent identity services are auto populated. These options primarily determine the source of the value of the header. Select request or session or Identity.
Note: The field is set to Request, by default. |
TEST VALUE | Enter a value. A test value is used for testing the service. |
DEFAULT VALUE | Enter the value, if required. The default value will be used if the test value is empty. |
Scope | Select request or session. This field is set to Request, by default. The default datatype for the selected column is loaded under DATATYPE field. |
Encode | Select the checkbox to enable an input parameter to be encoded. For example, the name New York Times would be encoded as New%20York%20Times when the encoding is set to True. The encoding must also adhere the HTML URL encoding standards. |
You must provide the custom HTTP headers based on the operation. For example, post or get.
Field | Description |
---|---|
Name | Provide custom HTTP headers required by the external source. |
Value | Three different options are available in Kony Fabric under VALUE during configuration of any operation. When you start editing this field, dependent identity services are auto populated. These options primarily determine the source of the value of the header. Select request or session or Identity.
Note: The field is set to Request, by default. Note: If the header value is scoped as a Request (or) Session and the same header is accessed under the Expression header value, then the expression must be represented as $request.header (or) $session.header. |
TEST VALUE | Enter a value. A test value is used for testing the service. |
DEFAULT VALUE | Change the syntax, if required. The default value will be used if the test value is empty. |
SCOPE | Select request or session. The field is set to Request, by default. |
Description | Enter the Description for the request input. |
To validate the details, click Fetch Response. You can refer to Test a Service Operation for the steps to test a service.The result of the operation appears.
Click the Response Output tab to configure the fields of the table for displaying the data.
Note: If you define parameters inside a record as the session, the session scope will not get reflected for the parameters.
In the Response Output tab, configure the fields of the table for displaying the data:
The Name field in the Response Output tab is prepopulated with the properties of output schema of a RAML file.
Enter the values for required fields such as name, path, scope, data type, collection ID, record ID, format and format value
Note: If you define parameters inside a record as the session, the session scope will not get reflected for the parameters.
Note: You can view the service in the Data Panel feature of Kony Visualizer. By using the Data Panel, you can link back-end data services to your application UI elements seamlessly with low-code to no code. For more information on Data Panel, click here.
Copyright © 2020 Kony, Inc. All rights reserved. |