Managing Linked Apps in a Composite Fabric App
From V9SP3GA, Quantum Fabric supports Manage Linked Apps (app modularity) feature that allows linking more than one micro-app into a composite app.
Micro-apps and Composite apps are all Fabric apps with certain conditions as follows:
- Micro-App (linked app): A micro-app is a regular Fabric app fulfilling a single module of a feature. A micro-app should be able to work as an independent app, for example, a Visualizer application can link to the micro-app. Each micro-app is capable of serving a specified business domain or functionality.
- Composite App (parent app): A composite app is a regular Fabric app, with additional information about a list of other Fabric apps that are linked to it. It allows multiple micro-apps to be added and removed from them.NOTE: Currently only 1 level of app linkage is allowed. This implies that micro-apps can be linked into composite apps, but a composite app (containing a linked micro-app) cannot be linked into another composite app.
The Manage Linked Apps feature helps to improve the Fabric custom app development aspects as follows:
App Modularity
Use case: When partners build vertical-based solutions like Infinity, the Client and Fabric applications are currently shared with customers. Customers can make changes to the application to meet their business requirements. When Infinity releases a new version, customers are expected to upgrade to the new version. For example, Accounts, Loans, Credit cards, and Wealth Management. The app can contain updated services, which are useful for customers, and the non-impacted services may not be relevant. This results in time-consuming because users have to take updates even if they do not use the feature.
Using the Managing Linked Apps functionality (modularity) allows you to link Fabric apps.
You need to break down the Infinity project into small Fabric apps. You can group each functionally as a Fabric app (called micro-app). You can then link the required apps to form a functional custom composite app. The service doc of a Composite app reflects the services of composite app + dependent micro-apps. For example, services of linked micro-apps can now be invoked via the App key/secret of a composite app. Customers can choose to upgrade to a certain module if they want to do so.
How Authentication Works in a Composite App
Identity providers of a composite app and its linked apps can be used by the composite app to log in and to access protected services belonging to both the composite app and linked apps.
For example,
- A composite app has Salesforce log in details
- Linked app_1 has configured with Google identity provider
- Linked app_2 has configured with Facebook identity provider
In this case, the Composite Fabric app can use any of its own providers (Salesforce) or its linked app providers (Google and Facebook) for logging and accessing its own protected services or the protected services of its linked apps.
How to Create Composite Apps in Fabric Console
The following sections will help you on how to link apps to a Fabric app and publish the app using Fabric Console:
Linking and Unlinking Apps to a Composite Fabric App
Multiple micro apps can be linked or unlinked from a composite app using the Manage Linked Apps page. Composite Fabric apps allow the services from the linked apps as well accessible to the client applications using the app key and secret of the composite app.
To link a Fabric app to another Fabric app, follow these steps:
- Log in to the Fabric Console.
- In the Apps page, hover your cursor over the App menu button of the app and then click Manage Linked Apps.
NOTE: You can access the Manage Linked Apps option within the app when the app is selected.
- In the Manage Linked Apps page that appears.NOTE: You can link new apps to the selected composite Fabric app by clicking the Add button on the Manage Linked Apps page.
You can navigate to the composite app by clicking theSelected:<CurrentParentAppName>
in the Manage Linked Apps page. - In the Manage Linked Apps page, do the following:
- To link apps, click Add button. The Existing Apps dialog appears with a list of existing apps.
- Select the check box for the required app/s and the version.
- Click LINK.
- In the Linked Apps dialog that appears with the apps linked status, click CLOSE.
All the linked apps are displayed on the Manage Linked Apps page
NOTE: After apps are linked to a Fabric app, you can unlink the linked apps or navigate to the linked apps using the Manage Linked Apps page. - To unlink the linked apps:
- Select the check box for the required app/s and version.
- Click Unlink.
- In the Unlink Linked Apps dialog that appears with the apps linked status, click CLOSE.
- To navigate to the linked apps, click on any of the linked apps from the list. The selected app will be opened.
The following sections detail how to publish a composite app and linked apps.
- To link apps, click Add button. The Existing Apps dialog appears with a list of existing apps.
MFCLI Commands for Linking and Unlinking Apps to a Composite Fabric App
From the 202410 release, you can link or unlink micro apps from a composite app using MFCLI commands, which helps with automating deployments of composite apps. The command line arguments vary depending on the type of your Quantum Fabric environment, either On-premise or Cloud.
MFCLI Command to link micro apps to a composite app |
---|
NOTE: If you are linking a single Micro App, replace the
-f parameter with the --childApp and --childAppVersion parameter as follows:
|
MFCLI Command to unlink micro apps from a composite app |
---|
NOTE: If you are unlinking a single Micro App, replace the
-f parameter with the --childApp and --childAppVersion parameter as follows:
|
The -f
, --file
parameter refers to the name of the JSON file that contains the metadata of the micro apps (in a list). Ensure that the JSON file adheres to the following format:
[ { "name": "microapp1", "version": "1.0" }, { "name": "microapp2", "version": "2.0" } ]
NOTE: In the JSON file, version
is an optional parameter.
However, if you are using the childapp
and chidlappversion
parameters, you must provide a version.
If you do not provide a version, Quantum Fabric assigns the default version as 1.0 to the micro app.
Publishing a Fabric Composite App
- Case 1: First publish of a composite app or the first publish after unpublish the app
- Case 2: Publish Linked Apps is not selected
- Case 3: Publish Linked Apps is selected
- Full or Incremental Publish behavior for Composite App and Linked Apps
Case 1: First publish of a composite app or the first publish after unpublish the app.
By default, all linked apps will be published while publishing the composite app.
- Navigate to your composite app in Fabric Console.
- Click Publish tab.
- Select an environment.
- Click PUBLISH.
The following table details a sample composite app and linked apps, and the results of the direct publishing of the composite app:
Sample Composite Fabric App has linked apps with versions |
Results of direct publish a composite app and linked apps for the first time |
---|---|
CompositeApp V1.0
|
|
Case 2: Publish Linked Apps is not selected
After the first publish, the publish checks if each linked app has already been published, and if not, those specific linked apps will be included for publish along with composite app. The linked apps which are missing publish can be due to new app linkage or existing linked app independently is unpublished.
- Navigate to your composite app in Fabric Console.
- Click Publish tab.
- Select an environment.
- Click CONFIGURE & PUBLISH.
- Clear the Publish Linked Apps check box to not to include linked apps for publishing.
- Click SAVE & PUBLISH.
The following table details a sample composite and linked apps, and the results of the publishing composite app without linked apps:
Sample Composite Fabric App has been modified as follows: |
Results when Publish Linked Apps is not selected |
---|---|
CompositeApp V1.0 (previously published)
|
|
Case 3: Publish Linked Apps is selected
In this case, publish operation publishes the composite app along with all linked apps. This helps include any changes to the linked apps post the initial publish.
- Navigate to your composite app in Fabric Console.
- Click Publish tab.
- Select an environment.
- Click PUBLISH.
- In the App Configuration > Publish Method select Full or Incremental for the composite app.
- Select the Publish Linked Apps check box to include linked apps for publishing.
- Click SAVE & PUBLISH.
The following table details a sample composite and linked apps, and the results of the composite app publishing with linked apps:
Sample Composite Fabric App has been modified as follows: |
Results when Publish Linked Apps is selected |
---|---|
CompositeApp V1.0 (previously published)
|
|
Full or Incremental Publish behavior for Composite App and Linked Apps
During app publishing, Quantum Fabric allows you to reconfigure certain default values of app prior to publishing.
MFCLI Commands for Publishing Composite Apps
--publishMicroApps parameter for MFCLI Publish Composite Apps
From V9SP3, Publish command will now accept an additional parameter called ‘publishMicroApps’. If you specify the parameter in the Publish command, it will publish all dependent micro apps as well.
MFCLI Command to publish a composite app along with dependent linked apps | |
---|---|
|
Commands to improve efficiency to deploy Infinity Apps on the Fabric Server
Starting from 202401, the Publish command has been introduced the following parameters to enhance the efficiency of app publishing:
-
--skipPublishedMicroApps
-
--incremental
|
From 202401 onwards, if this flag is specified at the composite app level, it will be propagated to the micro apps as well. That means, if the micro apps are published before, only the delta of the micro apps are published when the composite app is published.
For example:
java -jar mfcli.jar publish -a <appName> -e <envName> --publishMicroApps --incremental |
-mfConsoleVersion Parameter for MFCLI Publish Fabric Console Version
From V9SP3GA, the MFCLI Publish command accepts an additional parameter called ‘mfConsoleVersion’. This console version needs to be specified for older Fabric versions. This param has bee added to support the backward compatibility.
MFCLI Command to Publish Fabric Console version from V9SP3 GA | |
---|---|
|
--IncludChildApps Parameter for MFCLI object-services-meta command
From V9SP3, the Object services meta command will now accept an additional parameter called ‘includeChildApps’. If you specify the parameter in object-services-meta command, it will list the object services of the composite app and the linked apps.
MFCLI Command to get object service meta for acomposite app with linked apps | |
---|---|
|
- For more information on MFCLI commands, refer to Continuous Integration with Quantum Fabric.
- For more information on how to import and link a composite app in a Quantum Visualizer project, refer to Micro Applications in Quantum Visualizer.