是否可以在Teamcenter throgh RAC中发布Object?

问题描述 投票:0回答:1

我想复制Iream版本的发布状态并将其粘贴到他们的数据集中。我可以通过ITK完成整个过程,但我希望它由RAC完成。

你能帮帮我吗?

itk
1个回答
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();
        }
    }
© www.soinside.com 2019 - 2024. All rights reserved.