Moving assets into approved state using Java API
The requirement is to bulk upload assets and transition them into approved state.
Asset Lifecycle is set to Draft -> Review -> Approved Review to Approved transition requires at least one approval from the asset reviewers user group. I am the community admin and belong to asset reviewers user group. I am using the following code to transition the lifecycle of assets. The program executes fine but the assets are set to Review state instead of approved state. Would be helpful if someone can point out the error? public void setApproveState(RAMAsset anAsset) { //move the asset into review state |
Be the first one to answer this question!
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Comments
Are you saying that the first transition, and the vote are recorded fine, but that the last action ("Approve") did not take place? ... i.e., if you look at the asset on the web, you it is in the 2nd state, and the vote is recorded?
btw, there is no indication in your code if any action was found .... are you sure that the setAction was executed?
Gili, when I look the asset on the web, the first transition and vote are recorded fine but the last approve action didn't take place.
I removed logging statements here but the log confirms that setAction(...) was executed.
Is there something missing in the code to satisfy the policy constraint of having one approval by asset reviewer?
My transition condition from Review -> Approve is
- Manual action is Approve
- Number of approvals from Asset reviewers is 1
Where does this code run? Perhaps the RAMVote needs to be associated with a user from the Asset reviewers group (while you say the vote is recorded, does it show as recorded by you)? Does logging also confirm that closing put() is called? A stretch, I know...