Fabric Admin Adapter

From V9SP1, a new type of integration connector — Fabric Admin has been introduced in Fabric. The Fabric Admin Adapter allows the use of administrative functions (exposed via secure APIs ) on a Fabric runtime server. This permits external systems to invoke these APIs to read or modify settings on the Fabric server.

Managing and Customizing Rules

The Fabric Admin adapter exposes APIs for managing and customizing rules published to a target runtime server.

  • With the Fabric Admin Adapter, you can invoke the Admin endpoints for rules services and manage the published business rules logic. These operations include getting a list of rulesets published to an environment, fetching rules given a ruleset name, read a base rule and custom rule of a particular rule version, create/update custom rules logic, delete a custom rule, and get status of custom rules update/delete actions.
  • With the Fabric Admin Adapter, a Business administration app (for example, Spotlight) can access and manage business rules of an Online banking client app. This is to ensure that external clients get the flexibility of customizing its Business Rules without having to change the application or publish the Fabric app again and again.

  • For this, the Online banking app should expose the Rules management APIs via the Fabric Admin Adapter. The Spotlight Fabric app should talk to these Rules management APIs (as part of Fabric Admin Adapter) through a JSON integration service.

Use Case: Modifying base rules logic dynamically on the run-time server by using a client, for example, Customer 360 (Spotlight)

Consider the following examples:

  • Banks might want to from time-to-time review and update the eligibility criteria for a particular banking product.
  • Based on a customer segment, Bank might want to offer some pre-approved credit card products.
  • During festive seasons, Banks might want to run promotional campaigns for Car Loans and so modify the Business rules to arrive at qualifying customers.

In all of these scenarios, it is noticed that the Business Rules need to be updated by a Bank Manager or Bank Employee through Customer 360 (Spotlight). In order to facilitate this, Rules in Fabric provides the option to update the Rule logic (the MVEL logic a developer configured while developing the App), while retaining the Input and Output parameters that the Rule accepts. This way, a consumer banking app like Online banking or Loans/ Mortgage could get the flexibility of customizing its Rule logic without having to change the application or publish the Fabric app again and again. And by updating and customizing the Rule logic through a Business admin app like Customer 360 (Spotlight), Banks can be guaranteed that only a Bank Manager persona is able to update the Rule logic and no one else without the requisite authority can change those business rules.

Prerequisites

  • A Fabric app should contain a rules set configured using the Rules Service and the app should be published to an environment. For more information on Rules, refer to Rules as a Service.
  • A Fabric app should contain a Fabric Admin integration service and the app should be published to the same environment where you have published your rules services.

    IMPORTANT: The Rules service and the Admin adapter integration services can be in the same app or separate apps. If these services are created in separate apps, these two apps should be published in the same environment.

    NOTE: Since the Fabric Admin adapter exposes the Administrative functions on the runtime server, only an authorized user should be able to access them. Hence only the Authenticated App User and Private security levels are supported. Anonymous and Public security levels are not supported for the operations exposed in this adapter.

Perform the following steps to Invoke the Rules Admin APIs using the Fabric Admin Adapter

Step1: Configure a Rules Service and publish it to an environment

  1. Create a Fabric app containing a rules set of a Rules Service.
    For more in formation on Rules, refer to Rules as a Service.
  2. Publish the app to an environment, for example, A.

Step2: Configure an Integration Service using the Fabric Admin adapter

NOTE: The Fabric Admin adapter integration service can be configured in the same Fabric App that you created in Step1. Or it can be in a different app.

To configure the Fabric Admin Adapter in the Integration service definition tab, follow these steps:

  1. In the Name field, provide a unique name for your service.
  2. From the Service Type list, select Fabric Admin.

  3. In the Authentication section, the Use Existing Identity Provider list displays the existing Identity services available in the Quantum Fabric App. Select an Identity Service from the list. This will add a security layer onto your Fabric Admin service. If you select an Identity Service, you must provide appropriate login details to invoke the Admin APIs from the client app. For more information on Externalizing Identity Services, refer to Replace the Identity Service references in a Fabric app.
  4. NOTE: All options in the Advanced section are optional.

  5. In the Description field, provide a suitable description for the service.
  6. Click Save or Save and Add Operation to save your service definition.

Step3: Configure the Operations for Managing the Rules

  1. Click Save and Add Operation in your service definition page to save your service definition and display the New Operation tab for adding operations.
    OR
    Click Add Operation to add a new operation or from the tree in the left pane, click Add > Add New Operation.
  2. In Operations List tab, select the required operation and click Add Operation. A new operation is created and listed in the Operations List tab with Rules as default prefix. The operations available are:
      
    • getRuleSets
    • getRuleNames
    • getBaseRule
    • updateCustomRule
    • getCustomRuleUpdateStatus
    • getCustomRule
    • deleteCustomRule
  3. Select the new operation that was added to configure the operation. Refer to the following sections to know more about the configurations you can do for each operation.

    Configure Operations

    Perform the following steps to configure each Admin operation:

    • Click the required operation from the operations list. The operation details page appears.
    • Provide the following information in the details page:
      FieldDescription
      NameThe operation name appears in the Name field. You can modify the name, if required.
      Operation Security Level

      It specifies how a client must authenticate to invoke this operation.

      Since the Fabric Admin adapter exposes the Administrative functions on the runtime server, only an authorized user should be able to access them. Hence only the Authenticated App User and Private security levels are supported. Anonymous and Public security levels are not supported for the operations exposed in this adapter.

      NOTE: The field is set to Authenticated App User, by default.

      Mapped ToDisplays the operation with which the adapter is linked with in the back end. This field is non editable.
      ActionDisplays the type of connector (service or object) with which this operation is linked with. This field is non editable.
    • NOTE: All options in the Advanced section for operations are not mandatory.

    • Enter the Description for the operation.

    Request Input Parameters

    The Request Input parameters will list a set of required input params to invoke a particular rule operation. These mandatory params have to be configured to use these operations

    You can define the Body and Header related input parameters from the Request Input tab. By default, the Body tab is selected. You can do the following to configure the input parameters in the Body tab:

    FieldDescription
    NameThe name for the request input parameter.
    Value

    The options available in the Value list determine the source from where the value of the input parameter must be retrieved.

    NOTE: The field is set to Request, by default.

    NOTE: For more information on Externalizing Identity Services, refer to Replace the Identity Service references in a Fabric app.

    Test ValueA test value is used for testing the service.
    Default ValueThe default value is used in the run-time when the service cannot find the defined header parameter value.
    Data Type
    Collection IDDetermines the location of the input value if there is a list of collections in the input received.
    Record IDDetermines the location of the input value if there is an array of records in the input received.
    DescriptionEnter the description for the request.

    The following input parameters are displayed by default for operations: These input parameters are mandatory.

    OperationInput Parameters (mandatory)
    Rules_getRuleSetsN/A
    Rules_getRuleNames
    • ruleSetName
    • version
    Rules_getBaseRule
    • ruleSetName
    • version
    • ruleName
    Rules_updateCustomRule
    • ruleSetName
    • version
    • ruleName
    • customRule

    IMPORTANT: Your custom rule must be encoded in the Base64 format.

    Rules_getCustomRuleUpdateStatus
    • updateRequestId
    Rules_getCustomRule
    • ruleSetName
    • version
    • ruleName
    Rules_deleteCustomRule
    • ruleSetName
    • version
    • ruleName

    NOTE: Quick Reference - For more information on descriptions, input parameters, sample Request/Response codes, and error scenario, refer to Operations supported in Fabric Admin Adapter

    Click the Header tab to configure the header parameters. The parameters configured here will be appended to the header of the input request. Configure the following fields to define header parameters:

    FieldDescription
    NameThe name for the request input parameter.
    Value

    The options available in the Value list determine the source from where the value of the input parameter must be retrieved.

    NOTE: The field is set to Request, by default.

    Test Value A test value is used for testing the service.
    Default Value The default value is used in the run-time when the service cannot find the defined header parameter value.
    DescriptionEnter the description for the request.

    Response Output Parameters

    In the Response Output tab, you can configure the output parameters that you are expecting the service to return after the service is executed.

    By default, the following output parameters are returned from the back end for each of the operations:

    OperationOutput Parameters
    Rules_getRuleSets
    • ruleSets
    Rules_getRuleNames
    • ruleNames
    Rules_getBaseRule
    • rule
    Rules_updateCustomRule
    • updateRequestId
    Rules_getCustomRuleUpdateStatus
    • ruleStatus
    Rules_getCustomRule
    • rule
    Rules_deleteCustomRule
    • updateRequestId

    NOTE: Quick Reference - For more information on descriptions, input parameters, sample Request/Response codes, and error scenario, refer to Operations supported in Fabric Admin Adapter

    You can configure the following information about each output parameter:

    FieldDescription
    NameThe name for the response output parameter.
    PathDetermines the path where you want to store the output value from the response.
    Scope

    It determines how you want to use the output value. It has the following options:

    • Response - Select this option if you want to add the output in the response sent to the client app user.
    • Session - Select this option if you want to add the output in the session information. This information will not be sent to the client app user.
    Data Type
    Collection IDDetermines the location of the output value if there is a list of collections in the output received.
    Record IDDetermines the location of the output value if there is an array of records in the output received.
    DescriptionEnter the description for the request.

    Other common options available in the Request Input and Response Output tabs are as follows:

    • Add Parameter: Click Add Parameter  to add an entry (if the entries for input and the output tabs do not exist).
    • Copy, Paste: Select the check box of an entry, and click Copy and Paste, if you want to make duplicate entries.
    • Delete: Select the check box of an entry and click Delete, if you want to delete an entry.
    • Enable pass-through: Select the Enable pass-through check box if you want to forward the body of the client's request to back end as it is. For more details on API Proxy service, refer to How to Enable Pass-through Proxy for Operations.

Step4: Publish the Fabric app containing the Integration Service to that environment

  1. Publish the Integration Service using the Fabric Admin to the same environment where you published your rules services in Step1.

    IMPORTANT: The Rules Set of a Rules Service and the Fabric Admin adapter integration services can be in the same app, or separate apps.
    - Different Fabric apps: If you have created a rules set of a Rules Service in one Fabric app, and the Fabric Admin integration service in another Fabric app, both these apps should be published to the same environment.

Operations supported for Fabric Admin Adapter (with Sample Request/Response and Error Scenario)

The following table lists the pre-built operations supported in Fabric Admin Adapter, which includes configuration parameters, sample Request/Response and Error Scenario.