Optionally, you can add a lifecycle to an asset type at the time of creating the asset type, by defining the lifecycle in the RXT definition. If you have not defined a lifecycle when creating an asset type, you can add a lifecycle by attaching the lifecycle to the asset type.
Follow the instructions below to attach a lifecycle to an asset type:
Create the shell of an asset extension. For more information, see Creating the Shell of an Asset Extension.
asset.configurecallback method in the
asset.jsfile within the asset extension. The
assetsdirectory of the Publisher and Store asset extension are as follows:
ES Component Directory Publisher
<ASSET_TYPE_NAME>should always correspond to an asset type that exists in ES, which has a corresponding RXT definition in the registry.
Attach the lifecycle for the asset type in the
name- Defines the default lifecycle to be used for the asset type.
If a lifecycle has been defined in the asset type RXT definition, then ES ignores the lifecycle defined in the asset extension (
asset.js) and uses the lifecycle defined in the RXT as the default lifecycle.
If a lifecycle has not been defined in the asset type RXT definition, then ES uses the lifecycle defined in the asset extension (
asset.js) as the default lifecycle.
If this property is set to false, ES will not attach a lifecycle to this asset type.
defaultLifecycleEnabled- Defines which lifecycle is used with the specific asset type. If the
defaultLifecycleEnabledproperty is true, then the default lifecycle, which is specified in the asset extension, is used as the lifecycle for the asset type. However, if the
defaultLifecycleEnabledproperty is false, the lifecycle defined in the asset type RXT definition is used.
Attach the lifecycle, which is namely
MobileAppLifeCycle, to the asset type.
asset.jsfile should look as follows:
- Restart the ES server, so that ES evaluates the changes in the