How do we migrate the existing assets to a master lifecycle of a community?
We have learnt that after you configure a master lifecycle for a community you can migrate the existing assets such that the older instance of the lifecycle/review process that they have can be overwritten by this master lifecycle.
Can you please provide us the steps on how can this be achieved?
3 answers
In general, if asset switches a lifecycle (because of configuration changes) it will:
Stay in the same state, if the new lifecycle is based on the same workflow.
Start from the beginning, if the new lifecycle is based on a different workflow.
In the case of a legacy lifecycle, it is not based on a workflow so no cigar. However you can follow the following process to migrate.
Create a new workfllow ... and have a mapping handing from the states in the legacy to the new life cycle.
For each state in the legacy review (call it state "O" that is mapped to state "N" in the new lifecycle):
- Configure the new lifecycle so that asset will automatically be moved to state "N" (remove the manual rules on the transitions).
- Search for all assets in the legacy review (use: _stateWorkflowId_:(com.ibm.ram.legacy) in the search text area. Also, filter on state "O" ... so you get all assets in state "O" in legacy review.
- bulk update these assets. .... which will force them to move to the new lifecycle, and flow to state "N"
Comments
Gill,
The approach suggested won't be very efficient for us due to the following reasons :
1. It is a manual process and prone to error.
2. We have alot of assets and this will take a very long time.
3. In my experience, the bulk update action does not work well when there is a large number of assets.
4. It changes the community of an asset which will make it unavailable to users during that time.
So we plan to automate the migration using the rest api.
Can you please guide us on how we could update the lifecycle of an asset using the rest api?
Thanks.
Please give us some pointers on how we can use the rest api to achieve our goal.
Another option would be to use the RAM Java client API calls.
Either option you still need to follow Gili's suggestion for setting up and configuring the lifecycles so they map correctly from legacy to lifecycle... and search using the criteria suggested.
Comments
For 7.2 the url format we used was to access the assets using rest api was
<hostname>/ram.ws/internal/assets.
For 7.5.1.1,is it the same?.I get 400 error if i use it the same way for 7511.
In addition what is the rest api to get the assets within a community?
You should open a different threads for Rest API ...
URLs for OSLC API may change at any given time. This is the reason OSLC provides rootservices->Catalog->AssetServices ... for which you will be directed to the proper url for a given server (note that these are current URLs.... but the catalog may return new urls in new versions)
<server:port/context>/oslc/simpleQuery <server:port/context>/oslc/assets // for asset factoryOpen a different thread with a more specific question on what is it that you are trying to do.
For the life cycle migration ... yes, in your case it is tedious, but it is doable and the only way to do it today