资产注释通过资产的状态历史记录进行创建。 可以使用 RAMAsset.getCurrentStateHistory() 来获取资产的状态历史记录。在调用了 RAMStateHistory.commet(RAMComment) 方法时,注释会向上发送到 Rational Asset Manager,不必将资产放置到会话中。
//Get the current state history RAMStateHistory stateHistory = newAsset.getCurrentStateHistory(); //Create a new comment RAMComment comment = new RAMComment(); comment.setBody(“This asset looks great!”); //Add comment to the asset stateHistory.comment(comment);