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

获取用户TaskToPerform列表(SOA)

[复制链接]

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

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

569495386 楼主

2016-4-7 16:18:58

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

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

x
                User user = (User) session.getAttribute("activeUser");
: o+ H9 o% G4 V2 [, L* h                Connection connection = (Connection) session.getAttribute(user.getUid() + "connection");$ g9 Z1 v, u( g$ r% l" [8 g! S  t
6 ]- h, |) A+ n9 Q, l7 k
                DataManagementService dmService = DataManagementService.getService(connection);
: n! A( I& {1 S9 g' d/ H2 ?7 A) _( _. E; J. `+ v
                ModelObject[] models = new ModelObject[] { user };
- ?3 F6 N; [0 ~+ u& S3 ~                try {' w" S& I" L; B9 ]: {
                        String[] str = new String[] { "taskinbox" };
( o- J5 f& }* b/ i                        dmService.getProperties(models, str);7 H9 j% R1 I6 t& X
                        TaskInbox inbox = (TaskInbox) user.get_taskinbox();
1 F" e1 c& M. O; H6 _2 e' q, W" t" L; T8 f* t# z  X* M
                        models = new ModelObject[] { inbox };) ^0 w8 s. k; F% l
                        str = new String[] { "tasks_to_perform" };( ~& Y: \# m# J1 n( {
                        dmService.getProperties(models, str);
+ Q' ]- r) Z6 V- J5 l                        models = inbox.get_tasks_to_perform();8 O: s% z; Q# Z5 l2 m2 o
                        str = new String[] { "object_type", "object_name" };5 d6 P* ~& P9 ^: p& [' ^
                        dmService.getProperties(models, str);
4 ?; g; ^: d6 O" `# H8 a: a                        System.out.println("---------------:" + models.length);/ ?' R7 `$ [; x6 B! ~3 j
                        for (int i = 0; i < models.length; i++) {; J6 U% D9 h  V7 x4 ~- i
                                System.out.println("------------------------------");$ K3 n2 d8 @* i4 L
                                System.out.println(models[i].getUid());
+ [  N- I# b* l' ^; e                                System.out.println(models[i].getPropertyDisplayableValue("object_type"));
( R, L% J" G! _  d# r3 Q                                System.out.println(models[i].getPropertyDisplayableValue("object_name"));
0 i0 `$ D* I8 X+ q2 _1 _% J( [. T                        }  k7 q$ h6 A$ F: ?# p! Y
6 p6 _+ ?$ D" M, e
                } caTCh (Exception e) {& ?  K9 k8 U/ d/ `. D) h- L1 a( s
                        // TODO Auto-generated catch block
; [9 F# n9 y# `3 v* ]9 \                        e.printStackTrace();
( E4 j" }6 i/ u" l0 {# G' [8 g                }, P! k, k! V% d5 S& K

$ w9 Q- |, ~1 H  `$ b: c
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了