Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Your repository name should be of the format <component_prefix>-<component_id>, where component_prefix may only include alphanumeric characters and underscores. It must begin with a letter and cannot have '_' as the last character. Similarly, your component_id should only include letters and underscore. For example, if you are building a component for Predictive Maintenance, your repository name can be pm-PredictiveMaintenance.

Note

Both component_prefix and component_id must be unique in order to prevent conflicts with other components.

Warning

We are required to name the GitHub repository in this specific format because it enables us to integrate multiple components into the IA system. Each component repository includes predefined action services, as detailed in step 2. Without a unique prefix for these action services, the component cannot be added, as the IA system will attempt to register services with identical names, resulting in conflicts.

...

Component Action Service

Caller

Description

<component_prefix>_setup.js

iasystemcreator@clearblade.com

This service is called when a component is created added to an asset type through the UIIntelligent Assets user interface, and only called if no other instances of that component exist yet in the system. It is called as a developer and creates new ClearBlade resources if required. Most of the resources will be a part of the IPM itself, but you will need to use this in the event you want to use secrets to create external dbs, bucket sets, etc., or to setup any other external entities.

<component_prefix>_install.js

collectionHandler@clearblade.com

This service is called every time a component is created added to an asset type through the UIIntelligent Assets user interface. It can interacts with IPM/IA resources to create entities such as collection rows, publish messages to IA services, add data to IA collections, etc.

<component_prefix>_update.js

collectionHandler@clearblade.com

This service is called in the event a user updates an existing instance of a component through the UIIntelligent Assets user interface. It interacts with IPM/IA resources to update any entities such as collection rows, etc.

<component_prefix>_deleteuninstall.js

collectionHandler@clearblade.com

This service is called everytime an existing instance of a component is deleted through the UIremoved from an asset type in the Intelligent Assets user interface. It should delete any entities created by the corresponding _install call.

<component_prefix>_teardown.js

iasystemcreator@clearblade.com

This service is called if a component is deleted through the UIremoved from an asset type in the Intelligent Assets user interface, and if after deletion removal no other instances of that component would be present in the system. It is called as a developer and should clean up anything that was created by the corresponding _setup call.

...

Lastly, a ClearBlade developer must go the components collection in the asset-monitor-management system and add a row with your the component details you provide to them:

  • id - Should match the component id you used in your component repo

  • name - Should match the component name you used in your component repo

  • type - ai_internal_v1 for internal and external for external components.

  • owner - Owner of the component

  • description - Description of the component

  • ui_injection_id - You can skip this.

    • asset types are the only supported injection point with the current version of components, meaning, the _install, _update, _setup, _uninstall, and _teardown scripts are only triggered by asset types getting the component setup through the modal in IA, as well as the asset types that have it set up getting updated or deleted

  • min_ia_version - This is the IA version on which this MFE was tested.

  • repo_url - The url to the components repository you created from the template

  • mfe_url - The url to your MFE (e.g. https://cdn.jsdelivr.net/gh/ParentRepo/tst-TestRepo@main/dist/tst_TestRepo.js)

...