Manage Asset Lifecycle States
In the software development lifecycle, assets are developed, released, and eventually deprecated, and each Exchange asset version moves through the lifecycle states of development
, stable
, and deprecated
.
Development State
An asset version in the development
state is in an iterative process of design and development.
If you republish an asset version in the development
state with the same groupId, assetId, and version (GAV) and new metadata, the asset version is overwritten, including the following version metadata:
-
Files
-
Dependencies
-
Keywords
Changing this information for an asset version in any other state requires creating a new version, which prevents republishing or overwriting the asset version.
Overwriting an asset version also updates the search index.
The following information is not overwritten when republishing an asset in the development state:
-
Asset type
-
Tags
-
Categories
-
Custom fields
-
Documentation pages
Deleting an asset version in the development
state is always a hard delete, enabling you to reuse the asset’s name, groupId, assetId, and version.
The public portal does not show asset versions in the development
state.
Anypoint Platform products other than Exchange, such as Anypoint Studio, API Manager, or Anypoint DataGraph do not consume asset versions in the development
state.
Stable State
An asset version in the stable
state is ready to be consumed. The asset cannot be republished or overwritten.
Deleting an asset version in the stable
state in the first seven days is a hard delete, enabling you to reuse the asset’s name, groupId, assetId, and version. Deleting an asset version in the stable
state after the first seven days is a soft delete, preventing you from reusing the asset’s name, groupId, assetId, and version. After a hard delete or a soft delete, an asset cannot be recovered.
The Exchange backend and some API responses use the term published
to mean stable
.
Deprecated State
An asset version in the deprecated
state is similar to an asset version in the stable
state. The only difference is that the status
property shows the asset version is deprecated.
Create an Asset in the Exchange User Interface
-
Click Publish new asset.
-
Set Lifecycle state to the Development state or the default Stable state.
-
Set other asset information.
-
Click Publish.
State Promotion
These are the three possible state promotions:
-
development
tostable
-
stable
todeprecated
-
deprecated
tostable
Only Administrators can promote an asset to development, stable, and deprecated states. Contributors can only promote an asset to development and stable.
Promote an asset version’s state either in the asset’s Exchange portal or by using the Exchange API.
In the asset’s documentation page, click the lifecycle state button that displays the current state, and select the new state of Development, Stable, or Deprecated.
To use the Exchange API, follow the Promote Lifecycle State example.
State Dependencies
An asset in the stable
state cannot add an asset in the development
state as a dependency.
If an asset in the development
state depends on one or more other assets in the development
state, Exchange does not allow promoting that asset to the stable
state. All dependencies of the asset should be promoted to stable first. If an asset in the development
state has dependencies in development
state and the dependent is modified, the dependent asset is also not regenerated. It is the asset owner’s responsibility to republish the dependent asset once its dependencies are updated.
Create an Asset Using the Exchange API
To create an asset using the Exchange API, follow the Set Lifecycle State example.
Create an Asset Using Maven
To create an asset using the Exchange Maven Facade API, follow the Asset Lifecycle State example.
Search Using the Graph API by Lifecycle State
To consume an asset and its lifecycle state, or to search for an asset by lifecycle state, follow the Asset Lifecycle State examples.