How to set an asset in Approved state to Retired/Archived?
RAM Version :7511
The following code snippet moves an asset in Approved state to Pre retired and not Retired.
asset.setAction(RAMAction.RETIRE);
session.put(asset, new RAMStatusMonitor());
Also when we do
asset.setAction(RAMAction.RETIRE);
session.put(asset, new RAMStatusMonitor());
asset.setAction(RAMAction.ARCHIVE);
session.put(asset, new RAMStatusMonitor());
We see that asset goes into Retired and not Archived.
How can we set the asset into Retired or Archived state?
The following code snippet moves an asset in Approved state to Pre retired and not Retired.
asset.setAction(RAMAction.RETIRE);
session.put(asset, new RAMStatusMonitor());
Also when we do
asset.setAction(RAMAction.RETIRE);
session.put(asset, new RAMStatusMonitor());
asset.setAction(RAMAction.ARCHIVE);
session.put(asset, new RAMStatusMonitor());
We see that asset goes into Retired and not Archived.
How can we set the asset into Retired or Archived state?
3 answers
As Rich answered earlier the RAMAction.RETIRE and RAMAction.ARCHIVE is for legacy review assets only. These are listed in the RAM Info center here -->
http://publib.boulder.ibm.com/infocenter/ramhelp/v7r5m1/topic/com.ibm.ram.doc/topics/r_api_legacyreviewprocess.html
Also... to help bridge the programs using the RAM client API with these 2 actions, when an asset is a lifecycle asset, the RAMAction.RETIRE moves the asset to pre-retired state and from that state and RAMAction.ARCHIVE will move it from pre-retired to retired state.
Note the Retire action Rich refers to is not the RAMAction.RETIRE action but the Retire action that will be listed in the array returned from the getAvailableActions() call:
RAMAction[] actions = asset.getAvailableActions();
Use this Retire action instead of RAMAction.RETIRE. Otherwise if you execute the RAMAction.RETIRE twice, the second action will throw an exception for lifecycle assets.
http://publib.boulder.ibm.com/infocenter/ramhelp/v7r5m1/topic/com.ibm.ram.doc/topics/r_api_legacyreviewprocess.html
Also... to help bridge the programs using the RAM client API with these 2 actions, when an asset is a lifecycle asset, the RAMAction.RETIRE moves the asset to pre-retired state and from that state and RAMAction.ARCHIVE will move it from pre-retired to retired state.
Note the Retire action Rich refers to is not the RAMAction.RETIRE action but the Retire action that will be listed in the array returned from the getAvailableActions() call:
RAMAction[] actions = asset.getAvailableActions();
Use this Retire action instead of RAMAction.RETIRE. Otherwise if you execute the RAMAction.RETIRE twice, the second action will throw an exception for lifecycle assets.
Hi Peter/Rich,
Thanks for the reply.
As my assets are lifecycle assets i used RAMAction.RETIRE followed by RAMAction.Archive,that puts the asset into RETIRED state.
But just wanted to clarify another thing,i noticed that after you retire the asset it goes into the implicit retire asset lifecycle.
Is it possible to make this asset have the community's lifecycle just like how it had in the approved state?
We want all assets in that community to have the community's lifecycle irrespective of the state.
Thanks for the reply.
As my assets are lifecycle assets i used RAMAction.RETIRE followed by RAMAction.Archive,that puts the asset into RETIRED state.
But just wanted to clarify another thing,i noticed that after you retire the asset it goes into the implicit retire asset lifecycle.
Is it possible to make this asset have the community's lifecycle just like how it had in the approved state?
We want all assets in that community to have the community's lifecycle irrespective of the state.