Versions Compared

Key

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

...

Component Action Service

Caller

Description

<component_prefix>_setup.js

iasystemcreator@clearblade.com

This service is called when a component is created through the UI (added to an asset type), 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 through the UI (added to an asset type). 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 UI. 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 UI (removed from an asset type). 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 UI (removed from an asset type), and if after deletion 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.

...