PTC FlexPLM rfa 工作流全局变量赋值 Workflow Global Variable

1.根据当前登录用户和工作流名称定位workitem

2.获取WfAssignedActivity

3.获取activity的ProcessData

4.取变量值或者赋值

5.保存变量新值

代码如下:

//工作流全局变量赋值
        wt.fc.ReferenceFactory rf = new wt.fc.ReferenceFactory();
        wt.workflow.work.WorkItem workitem =null;
        Collection collection = null;
        workitem=(wt.workflow.work.WorkItem) rf.getReference(WorkItemID).getObject();
        wt.workflow.work.WfAssignedActivity wfactivity = (wt.workflow.work.WfAssignedActivity) workitem.getSource().getObject();
        wt.workflow.engine.ProcessData processdata = wfactivity.getContext();        
        processdata.setValue("setUser",measurementUser);
        System.out.println(processdata);
        wfactivity.setContext(processdata);
        PersistenceHelper.manager.save(wfactivity);
        //执行工作流
        String workIds = "|~*~|"+WorkItemID;
        Collection workIdsCollection = MOAHelper.getMOACollection(workIds);
        WFHelper.getService().processWFTasks(workIdsCollection, workEvent);    

 

Developing_Client_Side_Plug-ins_in_FlexPLM_6.1.pdf About This Guide................................................................................................. iii Using Client Side Plug-ins ................................................................................... 1 What is a Client Side Plug-in? ............................................................................. 1 Introduction .................................................................................................................................... 1 Client Side Plug-in Types .............................................................................................................. 2 Overview ........................................................................................................................................ 3 Justification Guidelines .................................................................................................................. 5 Overview of MainTemplate CSP Architecture ............................................................................... 6 Overview of MainTemplate/Multi-Object Editor CSP Architecture................................................. 9 Creating a Plug-in ............................................................................................... 13 Create the CSP Plug-in....................................................................................... 13 Registering the Plug-in....................................................................................... 14 Acquiring the pagekey ................................................................................................................. 14 Registering the Client Side Plug-in with FlexPLM ................................................................. 16 Developing Client-Side Plug-ins........................................................................ 19 Client Side Plug-in Layout ................................................................................. 20 General Page Layout................................................................................................................... 20 Page Header................................................................................................................................ 20 ClientSidePluginHelper class................................................................................................. 20 handleOnLoadEvent and initPage header............................................................................. 26 handleSubmitEvent header.................................................................................................... 27 handleWidgetEvent header.................................................................................................... 29 Multi-Object Editor Headers................................................................................................... 31 JavaScript Function Generation............................................................................................. 33 Accessing FlexPLM Attribute Type Values .......................................... 40 Attribute Variable Type Widget Definition.................................................................................... 40 Attribute Variable Type Widget Access Examples ...................................................................... 43 Introduction............................................................................................................................. 43 Simple Attribute Variable Type Widget Code Examples........................................................ 44 Complex Attribute Variable Type Widget Code examples..................................................... 46 Multi-Object Tables Editor Page Structure and Use.................................................................... 51 Using Client Side Plug-ins ii HTML Table Elements............................................................................................................52 TableDataModel ..................................................................................................................... 55 Table Events........................................................................................................................... 58 DOM Table Editor Tools.........................................................................................................63 Development Tips................................................................................................65 Adding CSP Debug statements to Tomcat Console output.............................65 Avoiding Restart of Tomcat during Development of JSPs ..............................69
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值