PLM之家PLMHome-工业软件践行者

获取用户TaskToPerform列表(SOA)

[复制链接]

2016-4-7 16:18:58 3655 0

569495386 发表于 2016-4-7 16:18:58 |阅读模式

569495386 楼主

2016-4-7 16:18:58

请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!

您需要 登录 才可以下载或查看,没有账号?注册

x
                User user = (User) session.getAttribute("activeUser");
' [# C  y. V9 T                Connection connection = (Connection) session.getAttribute(user.getUid() + "connection");6 D, e1 u! o9 c) Y* B- x

/ Q: E* s! n" ]1 H5 G7 m2 u                DataManagementService dmService = DataManagementService.getService(connection);
4 M. f2 X4 m/ [9 Q. l( p$ x3 G4 b$ b$ O# ^5 \
                ModelObject[] models = new ModelObject[] { user };
: g8 U) ]! h6 ]4 x                try {9 Y- C* [% P2 w  f+ i1 v5 ]8 f1 R
                        String[] str = new String[] { "taskinbox" };
& X! L* `; x( I# y0 `7 O8 Z                        dmService.getProperties(models, str);! l/ X; i7 c( b* O9 s9 J3 u& A, @, {
                        TaskInbox inbox = (TaskInbox) user.get_taskinbox();# l1 O' T  j$ b0 ~

4 Y& n: ]9 H* p/ e. I7 V- T                        models = new ModelObject[] { inbox };
( C) s1 I8 Y% h6 s0 N) o( M- g                        str = new String[] { "tasks_to_perform" };" b8 C- w! G. f/ [" G4 x
                        dmService.getProperties(models, str);4 w- b9 ^9 P8 e2 i8 h& i. `  p( d* Y! g
                        models = inbox.get_tasks_to_perform();6 Q0 A% W- P( z- q
                        str = new String[] { "object_type", "object_name" };
' t! @' V7 i- v! \, j( Y+ }                        dmService.getProperties(models, str);% g$ Q) Y3 i1 w- I
                        System.out.println("---------------:" + models.length);2 k& D8 Y% R6 T( N
                        for (int i = 0; i < models.length; i++) {* }% o& I- {6 n3 n" ?
                                System.out.println("------------------------------");
4 d9 i& F, ~2 `2 d8 ]3 m) A# u                                System.out.println(models[i].getUid());
, r/ e1 j5 f( J. Y6 j% T% M                                System.out.println(models[i].getPropertyDisplayableValue("object_type"));
( ?. t9 \" Q( V' C" i* e                                System.out.println(models[i].getPropertyDisplayableValue("object_name"));
  C, Z9 I- l7 \& Z  ?& I, o8 E                        }- }0 F$ A7 U2 k. d
% |1 W7 K+ p5 I. K3 L) {. k
                } caTCh (Exception e) {8 z) |2 {' Q4 ~- U
                        // TODO Auto-generated catch block# U5 g6 w3 y8 p. p; ?
                        e.printStackTrace();
5 S* J. K" l) c: o6 V9 M7 P3 ]" ^8 Q                }
2 {* G8 b2 L. l: h: k
2 t, d8 i1 V: r2 e
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 www.diantuankj.com/ doTeam.tech
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 注册

返回列表 本版积分规则

  • 发布新帖

  • 在线客服

  • 微信

  • 客户端

  • 返回顶部

  • x
    温馨提示

    本网站(plmhome.com)为PLM之家工业软件学习官网站

    展示的视频材料全部免费,需要高清和特殊技术支持请联系 QQ: 939801026

    PLM之家NX CAM二次开发专题模块培训报名开始啦

    我知道了