• 【第37期】接口方式修改时间表任务的工作完成百分比属性,无权限问题解决方法


    1.问题:

    通过接口方式修改时间表任务的工作完成百分比属性,报错:You do not have the correct access

    privileges to modify one or more objects

    Modified Objects handled in com.teamcenter.clientx.AppXUpdateObjectListener.modelObjectChange
    The following objects have been updated in the client data model:
        BOM::70720 UserSession 
    TestTCWeb01.64142.01.dcproxy.00016: ProjectManagement-2012-02-ScheduleManagement.updateTasks
    
    *****
    Partial Errors caught in com.teamcenter.clientx.AppXPartialErrorListener.
    Partial Error for     Code: 230045  Severity: 3  You do not have the correct access privileges to modify one or more objects.
    java.lang.Exception: com.teamcenter.soa.client.model.strong.ScheduleTask@74cf49b0:updateScheduleTaskAttribute===You do not have the correct access privileges to modify one or more objects.
      at com.plm.service.controller.synplmprjstatus.SynPLMPrjStatusOperation.updateScheduleTaskAttribute(SynPLMPrjStatusOperation.java:98)
      at com.plm.service.controller.synplmprjstatus.SynPLMPrjStatusOperation.dealPrjStatus(SynPLMPrjStatusOperation.java:74)
      at com.plm.service.controller.synplmprjstatus.SynPLMPrjStatusOperation.doMain(SynPLMPrjStatusOperation.java:50)
      at com.plm.service.controller.TeamcenterController.synPLMPrjStatus(TeamcenterController.java:30)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498)
    

      

    图1:工作完成百分比属性

    2.分析:

    该接口是通过固定用户(如infodba)登录Teamcenter系统,后运行接口代码,所以接口对任务赋值工作完

    成百分比时候登录用户不是任务任务的资源,也不是时间表的协调者,所以没有权限对任务属性做修改,

    界面上用infodba用户登录后,打开bypass权限后修改任务属性,同样报错"无法修改时间表任务XX,因

    为登录的用户即没有呗指派到任何任务,也不是时间表的协调者"(图2)

    图2:手工操作对时间表属性赋值操作报错

    3.解决:

    将接口登录用户设置未时间表的协调者(可以在时间表模板中就设置接口用户为协调者,这样新建时间表任

    务时候就默认设置接口用户为协调者了)

    3.1.时间表->时间表成员资格

    3.2.加入接口登录用户infodba,并设置为“协调者”

     

    转自:微信公众号PLM有个号

  • 相关阅读:
    智能佳 金刚足球机器人 竞赛机器人 智能机器人
    DIY小能手|别买电动滑板车了,咱做一台吧
    !!2016/02/22——当日买入——事后追悔,总结经验,忘记了买票的初衷!
    20160222深夜 支撑与阻力的问题,突破要不要买,回踩要不要接
    2016/2/4——昨天操作错误
    C语言 · 瓷砖铺放
    C语言 · 字符串编辑
    C语言 · 比较字符串
    C语言 · 3000米排名预测
    C语言 · 陶陶摘苹果2
  • 原文地址:https://www.cnblogs.com/wwssgg/p/16578504.html
Copyright © 2020-2023  润新知