我想复制Iream版本的发布状态并将其粘贴到他们的数据集中。我可以通过ITK完成整个过程,但我希望它由RAC完成。
你能不能帮助我。
答案 0 :(得分:0)
public void setReleaseStatus(){
WorkflowService serviceWF = WorkflowService.getService(session);
ReleaseStatusInput relStInput = new com.teamcenter.services.rac.workflow._2007_06.Workflow.ReleaseStatusInput();
relStInput.objects = new TCComponent[]{subLine};
ReleaseStatusOption relStOptions = new com.teamcenter.services.rac.workflow._2007_06.Workflow.ReleaseStatusOption();
/* // if we want delete TCReleased
relStOptions.existingreleaseStatusTypeName = "TCReleased";
relStOptions.newReleaseStatusTypeName = "";
relStOptions.operation = "Delete"; // or Append or Replace
*/
// if we want set status TCReleased
relStOptions.existingreleaseStatusTypeName = "";
relStOptions.newReleaseStatusTypeName = "TCReleased";
relStOptions.operation = "Append";
relStInput.operations = new Workflow.ReleaseStatusOption[]{relStOptions};
try {
serviceWF.setReleaseStatus(new Workflow.ReleaseStatusInput[]{relStInput});
} catch (ServiceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}