找回密码
 注册账号

QQ登录

只需一步,快速开始

手机号码,快捷登录

手机号码,快捷登录

初学者课程:T3自学|T6自学|U8自学软件下载课件下载工具下载资料:通资料|U8资料|NC|培训|年结积分规则 | 使用常见问题Q&A
知识库:U8 | | NC | U9 | OA | 政务U8|U9|NCC|NC65|NC65客开|NCC客开新手必读 | 任务 | 快速增金币用友QQ群[微信群]
查看: 17058|回复: 18

[学习] NC65 解析工作流

[复制链接]
发表于 2020-12-27 11:17:16 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

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

×
nc.vo.wfengine.definition.WorkflowDefinitionVO.getWorkflowProcess()

具体方式:
    if (getContent() != null)
    {
      String xpdl = (String)getContent();
      try
      {
        return UfXPDLParser.getInstance().parseProcess(xpdl);
      }
      catch (XPDLParserException e)
      {
        Logger.error(e.getMessage(), e);
        throw new PFRuntimeException(e);
      }
    }
    return null;




 楼主| 发表于 2020-12-27 19:26:12 | 显示全部楼层

List<String> userList = participantHandler.findUsers(context);  可获得某个流程实例的具体活动的用户id列表。

示例代码:                               
   Participant participant = wfp.findParticipantByID(act
                                                .getPerformer());
                                if (participant == null)
                                        return false;

                                String orgPK = (String) participant.getExtendedAttributes()
                                                .get("OrganizeUnitPK");
                                String orgType = (String) participant.getExtendedAttributes()
                                                .get("OrganizeUnitType");
                                String orgBelongOrg = (String) participant.getExtendedAttributes()
                                                .get("OrganizeUnitBelongOrg");
                               
                                OrganizeUnitTypes t = OrganizeUnitTypes.fetchTypeByTag(orgType);
                                if (t==null) return false;
                               
                                IPFParticipant participantHandler = null;
                            if (t.getValue() == 12) {
                              participantHandler =PfParticipantFactory.getInstance().createCustomParticipantOrgUnitHandler(orgType, wfInstanceVo.getBilltype());
                            } else {
                              participantHandler = PfParticipantFactory.getInstance().createOrgUnitHandler(t.getValue());
                            }
                               
                            PfParticipantHandlerContext context = new PfParticipantHandlerContext();
                            context.setParticipantId(orgPK);
                            context.setParticipantType(orgType);
                            context.setPk_org(orgBelongOrg);
                            
                            WFTask wfTask=this.queryWFTaskByWFInstanceAndActivityDef(wfInstanceVo,act);
                            context.setWftask(wfTask);
                            
                            try {
                                        List<String> userList = participantHandler.findUsers(context);
                                       
                                        if (userList.contains(pk_user)) return true;
                                } catch (Exception e) {
                                       
                                        e.printStackTrace();
                                        throw new BusinessException(e);
                                }
                            
回复 点赞 拍砖

使用道具 举报

 楼主| 发表于 2021-11-3 09:10:28 | 显示全部楼层
回复 点赞 拍砖

使用道具 举报

 楼主| 发表于 2021-2-4 22:53:10 | 显示全部楼层

我也只是学习过程中进行记录。
回复 点赞 拍砖

使用道具 举报

 楼主| 发表于 2021-2-4 22:53:24 | 显示全部楼层

我也只是学习过程中进行记录。
回复 点赞 拍砖

使用道具 举报

 楼主| 发表于 2021-2-4 22:52:49 | 显示全部楼层

我也只是学习过程中进行记录。
回复 点赞 拍砖

使用道具 举报

 楼主| 发表于 2020-12-27 12:05:27 | 显示全部楼层
怎么由activity找到是否匹配某个用户哩?
回复 点赞 拍砖

使用道具 举报

发表于 2020-12-28 10:21:30 | 显示全部楼层
看不懂,真牛逼

点评

我也只是学习过程中进行记录。  详情 回复 发表于 2021-2-4 22:53
我也只是学习过程中进行记录。  详情 回复 发表于 2021-2-4 22:52
回复 点赞 拍砖

使用道具 举报

发表于 2021-1-21 20:28:08 | 显示全部楼层
看不懂,真牛逼

点评

我也只是学习过程中进行记录。  详情 回复 发表于 2021-2-4 22:53
回复 点赞 拍砖

使用道具 举报

发表于 2021-2-3 18:52:46 | 显示全部楼层
回复 点赞 拍砖

使用道具 举报

发表于 2021-2-8 09:12:08 | 显示全部楼层
回复 点赞 拍砖

使用道具 举报

发表于 2021-3-26 23:35:42 | 显示全部楼层
有NC65二次开发的教材吗

点评

https://nccdev.yonyou.com/ 上这个地址看看哈  详情 回复 发表于 2021-11-3 09:10
回复 点赞 拍砖

使用道具 举报

发表于 2021-11-3 13:33:58 | 显示全部楼层
有NC65二次开发的教材吗
回复 点赞 拍砖

使用道具 举报

发表于 2021-11-11 17:26:22 | 显示全部楼层
回复 点赞 拍砖

使用道具 举报

发表于 2022-9-14 11:07:37 | 显示全部楼层
回复 点赞 拍砖

使用道具 举报

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

本版积分规则

QQ|站长微信|Archiver|手机版|小黑屋|用友之家 ( 蜀ICP备07505338号|51072502110008 )

GMT+8, 2024-6-7 05:33 , Processed in 0.038155 second(s), 18 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表