Windchill API 培训

合集下载

PTC Windchill 培训

PTC Windchill 培训

产品清单产品
29
© 2012 PISX
产品清单页面会列出该用户是团队成员的所有产品:
30
© 2012 PISX
产品详细信息
31
© 2012 PISX
32
© 2012 PISX
产品文件夹
33
© 2012 PISX
34
© 2012 PISX
产品团队
35
© 2012 PISX
36
© 2012 PISX
Windchill基础知识培训
目录
• 一、Windchill环境介绍 • 二、查找信息 • 三、产品介绍 • 四、产品维护 • 五、管理工作 • 六、工作任务 • 七、Creo集成
2
© 2012 PISX
数据管理对象
3
© 2012 PISX
更改管理对象
4
© 2012 PISX
存储位置
5
© 2012 PISX
62
© 2012 PISX
部件审核流程
• 在部件的详细信息下拉菜单
63
© 2012 PISX
申请人提交
流程启动者接收任务, 点击 图标 进入主页,在我的工作分配中会有一个“提交部件审核”的任务
为流程后续的签审角色指定参与者
64
© 2012 PISX
审核人审核
以校对者的身份进入windchill。在主页 -我的工作分配中会接收到校队的任务
13
© 2012 PISX
使用“X
使用“快速链接”
15
© 2012 PISX
使用“导航器”
16
© 2012 PISX
使用“痕迹导航”
17
© 2012 PISX

Windchill用户培训文档

Windchill用户培训文档

添加标题
添加标题
添加标题
添加标题
自定义功能:用户可以根据自己 的需求添加或删除系统功能。
自定义报表:用户可以根据自己 的需求自定义报表的样式和内容。
密码管理:定期更换密码使用复杂密码 权限管理:设置不同级别的权限确保数据安全 备份与恢复:定期备份数据确保数据安全 安全审计:定期进行安全审计及时发现并解决问题 安全培训:定期进行安全培训提高员工安全意识 安全工具:使用安全工具如防火墙、杀毒软件等确保系统
添加标题
快捷键:Ctrl+C(复制)、Ctrl+V(粘贴)、Ctrl+X(剪切)、 Ctrl+S(保存)等
数据备份与恢复:支持定期备份 和快速恢复确保数据安全
数据权限管理:支持用户权限设 置确保数据安全
添加标题
添加标题
添加标题
添加标题
数据同步:支持多设备间的数据 同步提高工作效率
数据分析:支持数据查询、统计 和分析为决策提供支持
Байду номын сангаас
熟练掌握 Windchill系统的 基本操作和常用 功能
了解Windchill系 统的应用场景和 优势
掌握Windchill系 统的数据管理、 安全性和可靠性 等方面的知识
提高了解决实际 问题的能力和团 队协作能力
界面优化: 简化界面 设计提高 用户体验
功能增强: 增加更多 实用功能 提高工作 效率
登录:输入用户名和密码点击登录按钮 退出:点击右上角的退出按钮确认退出 忘记密码:点击忘记密码链接通过邮箱找回密码 登录错误:输入错误的用户名或密码系统会提示错误信息
界面布局:分为菜单栏、 工具栏、工作区和状态栏
菜单栏:包含文件、编辑、 视图、工具等选项

Windchill二次开发常用API说课讲解

Windchill二次开发常用API说课讲解

W i n d c h i l l二次开发常用A P I1.1.根据零件名称/编码得到该零件2.wt.clients.prodmgmt.WTPartHelper.findPartByName(name) ;3.wt.clients.prodmgmt.WTPartHelper.findPartByNumber(number);4.2.根据WTpart得到WTparMaster5.WtPart wtpart;6.WTPartMaster wtmaster=(WTPartMster)part.getMaster();7.3.获取codebase下配置文件wt.properties属性信息8.WTProperties wtproperties = WTProperties.getLocalProperties();9.String wthome = wtproperties.getProperty("wt.home", "");//codebase的文件夹路径10.4.获取part被借用的所有父部件11.QueryResult qr=wt.part.WTPartHelper.service.getUsedByWTParts(WTPartMsterwtMaster);12.注:此方法得到的结果为该part被使用情况的全部父部件,包括了Design视图及Manufacturing视图更包括了父部件使用part的所有修订版本,打印出来可以看到会有相同的部件编号,不同的修订版本.13.5.根据OID 获取Wtpart14.wt.fc.WTReference partRef = newwt.fc.ReferenceFactory().getReference( oid );15.WTPart wtpart=(WTPart)partRef;16.6.得到零件最新版本17.WTPart wtpart= (WTPart)VersionControlHelper.getLatestIteration(part);18.7.通过过滤得到零件最新版本19.QuerySpec querysearch = new QuerySpec(WTPartMaster.class);20.//查询所有的WTPartMaster21.QueryResult queryresult =PersistenceHelper.manager.find(querysearch);testConfigSpec latestconfigspec = newLatestConfigSpec();23.//根据WTPartMaster查询所有最新版本的零部件24.QueryResult allWTPart =ConfigHelper.service.filteredIterationsOf(queryresult,latestc onfigspec)25.8.查询某用户某段时间范围内创建的零件26.QuerySpec qs = new QuerySpec(WTPart.class);27.qs.appendSearchCondition(newSearchCondition(WTPart.class,WTPart.CREATE_TIMESTAMP, true,new AttributeRange(begintime, endtime)));//删选条件时间范围内28.qs.appendAnd();//一定要加上不然下一个条件不能删选29.qs.appendSearchCondition(new SearchCondition(WTPart.class,30."iterationInfo.creator.key",SearchCondition.EQUAL,PersistenceHelper.getObjectIdentifier(n ame)));//删选条件用户31.QueryResult qr = PersistenceHelper.manager.find(qs);32.//今后持续更新if (enumUser.hasMoreElements())user = (WTUser) enumUser.nextElement();}if (user == null) {throw new WTException("系统中不存在用户名为'" + name + "'的用户!");}return user;}}10.windchill 中查询,高级查询,基本查询QuerySpec qs = new QuerySpec();//构造Int index = qs.appendClassList(WTPart.class,true);//添加查询类型,获取类型索引,第2个参数表示“要查询的类型、表”WhereExpression where = new SearchCondition(WTPart.class, WTPart.xx, “=”, xx);//泛型在WC API中的使用//获取查询条件数目If(qs.getConditionCount()>0 && qs.getWhere().endsWith(“")){qs.appendAnd();}//添加查询条件qs.appendWhere(where, new int[]{index});//** 以下是联合查询的API范例。

Windchill系统管理员培训课件

Windchill系统管理员培训课件
Windchill系统管理员的职责和任务包括:系统安装配置、用户和权限管理、数据备份和恢复、调试和性 能监控、问题解决和更新升级等。
Windchill系统的数据备份和恢复
1
数据备份的重要性
数据备份是保证数据完整性和安全性的重要手段。
2
数据备份和恢复的方法
数据备份和恢复的方法主要有:全量备份、增量备份、数据恢复。
什么是Windchill系统?
Windchill是一款快速、可靠的产品生命周期管理软件,旨在提高生产率和产品质量。
Windchill的特点
通过集成各种软件和系统,Windchill实现了协同工作、版本控制、工程更改、BOM管理、工 程图形管理、文档管理、报告管理等功能,集成了Creo、SolidWorks、AutoCAD、Eclipse等软 件。
3
数据备份和恢复的常见问题
常见问题包括备份失败、备份不完整、恢复失败等。
Windchill系统的安全性和保密性
Windchill系统的安全性
Windchill系统的保密性
Windchill系统的防火墙 保护
Windchill系统采用多重安全策 略,包括用户认证、权限控制、 数据加密、审计跟踪等。
Windchill系统能够帮助企业保 护机密信息的安全性和保密性。
Windchill系统的安装步骤
下载安装包、解压安装包、运行安装程序、 配置参数、启动服务。
Windchill系统的配置常见问题
常见问题包括端口冲突、Java版本不匹配、 数据库不兼容等。
Windchill系统的基本配置
基本配置包括用户管理、组织架构、权限管 理等。
Windchill系统管理员的职责和任务
Windchill的应用领域

Windchill-系统管理培训教材

Windchill-系统管理培训教材
15
管理系统服务
▪ 将Apache注册为Windows服务 ➢ 注册 Windchill shell下执行: ant –f config.xml installService –DserviceName=<ServiceName> httpd –k install –n <ServiceName> ➢ 卸载 Windchill shell下执行: ant –f config.xml uninstallService –DserviceName=<ServiceName> httpd –k uninstall –n <ServiceName>
22
管理电子仓库
▪ 电子仓库 ➢ 多电子仓库配置 ✓ 创建多电子仓库 ✓ 创建仓库规则 ➢ 单电子仓库配置 ✓ 强制转换成单电子仓库 wt.fv.forceContentToVault=true ✓ 单电子仓库不需要配置规则
23
管理电子仓库
▪ 副本站点 异地协同 定时同步
24
Windchill服务调优
16
管理系统服务
▪ 将Windchill DS注册为Windows服务 ➢ 注册 执行 <Windchill>\WindchillDS\server\bat\windows-service.bat ➢ 卸载 执行<Windchillntrol-panel.bat Runtime OptionsWindows ServerDisable
2
系统管理员职责
3
系统管理员职责
维护系统组件
Apache Tomcat Windchill DS Method Server
管理系统性能
服务器状态 数据库状态 磁盘管理 网络状况

Windchill培训-100623

Windchill培训-100623

Windchill DTS(Defect Tracking System)/ CMVC(Configuration Management Version Control)系统培训1、进入Windchill系统正式系统 /Windchill/2、输入用户名及密码正式系统用户名:xxxx@密码:123456(初始)3、修改密码Home->Utility->Profile->Actions->Edit Password4、进入DFSProduct->Products-> Defect Tracking System5、归入收藏夹(建议)6、进入Windchill测试系统(培训用)测试系统 /Windchill/注:1)、配置系统的hosts(C:\WINDOWS\system32\drivers\etc)文件,增加一行:10.96.13.235 2)、IE中要去掉代理7、输入测试系统的用户名及密码(培训用)测试系统用户名:xxxx@密码:18、进入测试系统的DFSProduct->Products-> Defect Tracking System9、ECR(Engineering Change Request)流程介绍10、Release中Component与开发工程师ID的关系Release:项目/机型名称Component:故障部件分类对应表Board_Front_Panel Test Board_Front_Panel_Test chengla@ Board_HDD_BP Test Board_HDD_BP_Test duxin@ Board_Mainboard Test Board_Mainboard_Test chengla@ Board_Middle_Plane Test Board_Middle_Plane_Test duxin@ Board_RiserCard Test Board_RiserCard_Test duxin@ Manual_System Test Manual_System_Test longhp@ Manual_Mechanical Test Manual_Mechanical_Test chenllb@ Manual_BIOS Test Manual_BIOS_Test chengla@ Manual_OS_Install Test Manual_OS_Install_Test sunlp@ Mech_Cable Test Mech_Cable_Test xuwy@ Mech_Chasiss Test Mech_Chasiss_Test chenllb@ 注意:一定不能把bug提交到其他机型中去!!!11、在一个“Test”的release项目中,提交一个ECR。

PDM用户培训

PDM用户培训

学习改变命运,知 识创造未来
PDM用户培训
学习改变命运,知 识创造未来
在此查看审核 的图纸及部件
对象
PDM用户培训
审核人员查看完图纸后,选择完成或是重新工作选项,选择 Complete选项,再点完成任务按钮,则审核任务到下一关项目经理 审核;选择Rework选项,则将任务返回到设计工程师,设计工程师
学习改变命运,知 识创造未来
PDM用户培训
Windchill系统常用专业术语介绍
工作区:可认为是一个专用区域,旨在支持对您管理的用于 设计和创作项目的数据的上下文收集。工作区在给定Windchill 服务器的存储库、产品或项目位置的上下文中创建。 每个产品建立后系统都会默认产生一个工作区,但是建议用户 创建自己的工作区。
PDM用户培训
Windchill 基本操作—创建产品
创建产品:项目首要负责人创建产品,但是产品创建时需要由系统管理员 授权。 在创建产品时,创建者需要组建团队,将各角色分配给不同的用户,即授 权。 产品创建后不可以删除,所以请创建者在创建产品时要三思而后行。但是 ,产品下的数据可以删除,也可以将产品改名。
EPM文档:PROE、SOLIDWORKS、AUTOCAD产生的文档 。
学习改变命运,知 识创造未来
PDM用户培训
Windchill系统常用专业术语介绍
版本: PDM中对象的版本由两部分组成, 版本=大版本+小版本
学习改变命运,知 识创造未来
PDM用户培训
Windchill系统常用专业术语介绍
产品 功能单元的顶层组件。 存储库:也是一个数据的逻辑存储区域,用来存放管理各产品
和项目共用的标准件和通用模板等。共达的存储库划分为标准 件库、模板库等。

Windchill 10.1客户端开发培训

Windchill 10.1客户端开发培训

1.Windchill自定义Windchill自带的客制化:站点->实用程序->首选项管理器->展开" Client Customization"->将" Client Customization"选项卡的"否"改为"是"->重新打开浏览器->会出现"自定义"图标,如下图所示:2.定制菜单定制主菜单1)复制navigation-actionModels.xml中的main navigation段代码到custom-actionModels.xml文件中<model name="main navigation" id="browseActions"resourceBundle="com.ptc.core.ui.navigationRB"><description>Main navigation (tabs)</description><action name="recentContexts" type="navigation"/><action name="product" type="navigation"/><action name="library" type="navigation"/><action name="project" type="navigation"/><action name="program" type="navigation"/><action name="change" type="navigation"/><action name="supplier" type="navigation"/><action name="qms" type="navigation"/><action name="org" type="navigation"/><action name="site" type="navigation"/><action name="search" type="navigation"/><!-- entry for customization tab --><action name="customization" type="navigation"/><action name="test" type="navigation"/>//这里是添加的</model><model name="test navigation" defaultActionName="subtest1" defaultActionType="test"><description>Sub tabs under the product main tab</description><action name="subtest1" type="test"/><action name="subtest2" type="test"/></model>2)在custom-actions.xml文件中增加如下代码:<objecttype name="navigation" class="" resourceBundle="ext.corilead.resource.ActionLableResourceRB"><action name="test" renderType="GENERAL"><command class="netmarkets" method="servlet/Navigation?tab=test" windowType="page"/></action></objecttype><objecttype name="test" class="wt.inf.container.ExchangeContainer" resourceBundle=" ext.corilead.resource.ActionLableResourceRB "><action name="subtest1" enabledwhensuspended="true"><command windowType="page"/><includeFilter name="hideNonSiteAdmin"/></action><action name="subtest2" enabledwhensuspended="true"><command windowType="page"/><includeFilter name="hideNonSiteAdmin"/></action></objecttype>3)修改资源文件ActionLableResourceRB文件内容如下:package ext.corilead.resource;import wt.util.resource.RBEntry;import wt.util.resource.RBUUID;import wt.util.resource.WTListResourceBundle;@RBUUID("ext.corilead.resource.ActionLableResourceRB")public class ActionLableResourceRB extends WTListResourceBundle { @RBEntry("定制主菜单")public static final String NAVIGATION_TEST_TITLE ="navigation.test.title";@RBEntry("定制主菜单")public static final String NAVIGATION_TEST_DESCRIPTION = "navigation.test.description";@RBEntry("定制主菜单")public static final String NAVIGATION_TEST_TOOLTIP ="navigation.test.tooltip";@RBEntry("子菜单一")public static final String TEST_SUBTEST1_TITLE ="test.subtest1.title";@RBEntry("子菜单一")public static final String TEST_SUBTEST1_DESCRIPTION ="test.subtest1.description";@RBEntry("子菜单一")public static final String TEST_SUBTEST1_TOOLTIP ="test.subtest1.tooltip";@RBEntry("子菜单二")public static final String TEST_SUBTEST2_TITLE ="test.subtest2.title";@RBEntry("子菜单二")public static final String TEST_SUBTEST2_DESCRIPTION ="test.subtest2.description";@RBEntry("子菜单二")public static final String TEST_SUBTEST2_TOOLTIP ="test.subtest2.tooltip";}ActionLableResourceRB_zh_CN内容如下:package ext.corilead.resource;import wt.util.resource.RBEntry;import wt.util.resource.RBUUID;import wt.util.resource.WTListResourceBundle;@RBUUID("ext.corilead.resource.ActionLableResourceRB")public class ActionLableResourceRB_zh_CN extends WTListResourceBundle { @RBEntry("定制主菜单")public static final String NAVIGATION_TEST_TITLE ="navigation.test.title";@RBEntry("定制主菜单")public static final String NAVIGATION_TEST_DESCRIPTION ="navigation.test.description";@RBEntry("定制主菜单")public static final String NAVIGATION_TEST_TOOLTIP = "navigation.test.tooltip";@RBEntry("子菜单一")public static final String TEST_SUBTEST1_TITLE = "test.subtest1.title";@RBEntry("子菜单一")public static final String TEST_SUBTEST1_DESCRIPTION = "test.subtest1.description";@RBEntry("子菜单一")public static final String TEST_SUBTEST1_TOOLTIP = "test.subtest1.tooltip";@RBEntry("子菜单二")public static final String TEST_SUBTEST2_TITLE = "test.subtest2.title";@RBEntry("子菜单二")public static final String TEST_SUBTEST2_DESCRIPTION = "test.subtest2.description";@RBEntry("子菜单二")public static final String TEST_SUBTEST2_TOOLTIP = "test.subtest2.tooltip";}4)在netmarkets下新建文件夹test并在test下新建jsp文件subtest1.jsp和subtest2.jsp注意:这里的文件名和文件夹名都不能错5)重启服务器6)效果如下:使用jca Table1)修改subtest1.jsp修改subtest1.jsp内容如下:<%@taglib uri="/windchill/taglib/components"prefix="jca"%><%@taglib uri="/windchill/taglib/fmt"prefix="fmt"%><%@page import="ext.corilead.report.GetProductList"%><%@include file="/netmarkets/jsp/util/begin.jspf"%><fmt:setLocale value="${localeBean.locale}"/><fmt:message var="name"key="name"/><fmt:message var="creator"key="creator"/><fmt:message var="container"key="container"/><jca:describeTable var="tableDescriptor"id="allproduct"label="All Product"><jca:describeColumn id="name"label = "Name"sortable="true"/><jca:describeColumn id="creator"label="Creator"sortable="true"/><jca:describeColumn id="container"label="Container"sortable="true"/></jca:describeTable><jca:getModel var="tableModel"descriptor="${tableDescriptor}" serviceName="ext.corilead.report.GetProductList"methodName="getAllProduct"></jca:getModel><jca:renderTable showCustomViewLink="false"model="${tableModel}" showCount="true"showPagingLinks="false"/><%@include file="/netmarkets/jsp/util/end.jspf"%>2)修改java文件package ext.corilead.report;import java.util.HashMap;import java.util.Vector;import wt.fc.QueryResult;import wt.method.RemoteAccess;import wt.pdmlink.PDMLinkProduct;import wt.pds.StatementSpec;import wt.query.QuerySpec;public class GetProductList implements RemoteAccess {private GetProductList(){}public static GetProductList newGetProductList(){return new GetProductList();}public static Vector getAllProduct(){Vector v=new Vector();QuerySpec qs=null;QueryResult qr=null;try{qs=new QuerySpec(PDMLinkProduct.class);if(qs instanceof StatementSpec){qr = wt.fc.PersistenceHelper.manager.find((StatementSpec)qs);//查询所有产品列表while(qr.hasMoreElements()){Object object = qr.nextElement();if(object instanceof PDMLinkProduct){HashMap map=new HashMap();PDMLinkProduct pro=(PDMLinkProduct)object;String name=pro.getName();String creator=pro.getCreator().getName();String container=pro.getContainerName();map.put("name", name);map.put("creator", creator);map.put("container", container);map.put("pro", pro);v.add(map);}}}}catch(Exception e){e.printStackTrace();}HashMap map=new HashMap();return v;}}3)将生成的class文件拷贝到系统codebase目录下,重启服务器4)点击子菜单一,显示结果如下:使用DataUtility1)修改jsp修改jsp文件<jca:describeColumn id="container" label="Container" sortable="true" />为<jca:describeColumn id="container" label="Container" sortable="true"dataUtilityId="containerDdetail"/>2)修改java文件package ext.corilead.dataUtilities;import java.io.IOException;import java.io.Serializable;import java.util.HashMap;import org.apache.log4j.Logger;import wt.fc.ReferenceFactory;import wt.inf.container.WTContainer;import wt.log4j.LogR;import wt.method.RemoteAccess;import wt.pdmlink.PDMLinkProduct;import wt.pom.PersistenceException;import wt.util.WTException;import wt.util.WTProperties;import ponents.descriptor.ModelContext;import ponents.factory.AbstractDataUtility;import ponents.rendering.guicomponents.UrlDisplayComponent;public class SearchDetail extends AbstractDataUtility implements RemoteAccess,Serializable {private static Logger logger = LogR.getLogger(SearchDetail.class.getName());public Object getDataValue(String col_id, Object obj, ModelContext modelcontext) throws WTException {UrlDisplayComponent goPartNumberButton = new UrlDisplayComponent();if(obj instanceof HashMap){HashMap map=(HashMap)obj;String container=(String)map.get("container");WTContainer org=((PDMLinkProduct)map.get("pro")).getContainer();if (org != null) {String url2 = getURLByWTContainer(org);goPartNumberButton.setLink(url2);goPartNumberButton.setLabelForTheLink(container);goPartNumberButton.setTarget("_blank");}}return goPartNumberButton;}//构造url地址public static String getURLByWTContainer(WTContainer org) throws PersistenceException, WTException {String url = "";ReferenceFactory referenceFactory = new ReferenceFactory();if (org != null) {String ufid = referenceFactory.getReferenceString(org);try {WTProperties properties = WTProperties.getLocalProperties();String urlbase = properties.getProperty("java.rmi.server.hostname");String webport = properties.getProperty("wt.webserver.port");url = "http://" + urlbase + ":" + webport + "/Windchill/app/#ptc1/comp/Page?oid=" + ufid + "&u8=1";logger.debug("url==========="+url);} catch (IOException e) {e.printStackTrace();}}return url;}}3)注册dataUtility在site.xconf文件里添加如下内容:<Propertyname="wt.services/svc/default/ponents.descriptor.DataUtility/contai nerDdetail/ng.Object/0"overridable="true"targetFile="codebase/com/ptc/core/components/components.dataUtilities.properties"value="ext.corilead.dataUtilities.SearchDetail/singleton" />4)拷贝class文件及jsp文件到对应路径下5)在Windchill shell下执行xconfmanager –p 命令,重启服务6)点击组织链接,弹出界面如下:添加操作菜单1)custom-actionModels.xml文件拷贝DocumentManagement-actionmodels文件下的:<model name="docs row actions toolbar" menufor="wt.doc.WTDocument"><action name="view" type="object"/> <!-- Info page --><action name="separator" type="separator"/><action name="download_primary_attachment" type="attachments"/><action name="redirect_primary_attachment" type="attachments"/><action name="separator" type="separator"/><submodel name="docs row actions open"/><action name="separator" type="separator"/><action name="checkin" type="wip"/> <!--Check In --><action name="checkin" type="clashDefinition"/> <!--Enabled only if Clash Definition (replaces wip version) --><action name="checkout" type="object"/> <!--Check Out --><action name="checkout_and_download" type="wip"/> <!-- Check Out and Download --><action name="checkoutAndEdit" type="document"/> <!--Check Out and Edit --><action name="checkoutAndEditClashJobDefinition" type="clashDefinition"/> <!-- Check Out and Edit a Clash --><action name="undocheckout" type="object"/> <!--Undo Checkout --><action name="edit" type="document"/> <!-- Edit --><action name="editClashJobDefinition" type="clashDefinition"/> <!-- Edit a Clash --><action name="viewClashJobDefinition" type="clashDefinition"/> <!-- View a Clash --><action name="submitClashJobDefinition" type="clashDefinition"/><action name="replace_content" type="wip"/> <!-- Replace Content --><action name="REVISEITEMS" type="pdmObject"/> <!-- Revise --><action name="separator" type="separator"/><submodel name="docs row actions new"/><action name="separator" type="separator"/><action name="copy" type="object"/> <!--Copy --><action name="renameDocumentWizard" type="document"/> <!--doc specific Rename --><action name="route" type="workflow"/> <!--Route ProjectLink --><action name="CONTAINERMOVE" type="pdmObject"/> <!--Move --><action name="setState" type="lifecycle"/> <!--Set State --><action name="export" type="object"/> <!--Export ProjectLink --><action name="EXPORT" type="pdmObject"/> <!--Export PDMLink --><action name="MULTI_OBJ_DELETE" type="pdmObject"/> <!--Delete --><action name="MULTI_OBJ_DELETE_DETAILS" type="pdmObject"/> <!--Delete --><action name="deleteIterations" type="object"/> <!-- Delete all old iterations --><action name="reassignLC" type="lifecycle"/> <!--Reassign Life Cycle --><action name="resetTeam" type="team"/> <!--Reset Team --><action name="disable" type="document"/> <!--Disable template --><action name="enable" type="document"/> <!--Enable template --><action name="userInitiatedReplication" type="replication"/> <!-- Use Initiated Replication --><action name="separator" type="separator"/><submodel name="docs row actions add"/><action name="separator" type="separator"/><action name="SBSendToPdm" type="sandbox"/> <!--Send to PDM --><action name="sandboxUndoCheckoutDetails" type="object"/> <!--Undo PDM Checkout Details --><action name="sandboxCheckoutShare" type="object"/> <!--PDM Checkout when shared --><action name="convertToShare" type="sandbox"/> <!--Convert to Share --><action name="removeShare" type="object"/> <!--Remove Share --><action name="separator" type="separator"/><submodel name="docs row actions compare"/><action name="separator" type="separator"/><action name="DISPLAYRELATEDMANUFACTURINGITEMS" type="object"/> <!-- MPMLink Display Related Manufacturing items report --><action name="batchPrint" type="wvs"/><action name="separator" type="separator"/><action name="markLinkAsSuspect" type="requirement"/><action name="separator" type="separator"/><action name="RefreshAssociationsDB" type="SoftwareBuild"/> <!-- Update Defect Associations --><action name="ManageSecurity" type="accessPermission"/> <!--Security --><action name="createSubscription" type="subscription"/> <!--Subscribe --><action name="separator" type="separator"/> <!--===================================== --><action name="associateDistributionTarget" type="tgt"/> <!--ESI Associate Distribution Targets (JCA action) --><action name="sendToDistributionTarget" type="tgt"/> <!--ESI Send toDistribution Target --><action name="separator" type="separator"/> <!--===================================== --></model>到custom-actionModels.xml文件内添加行:<action name="submitReview" type="doc"/>2)custom-actions.xml文件增加如下内容:<objecttype name="doc" class="wt.doc.WTDocument"resourceBundle="ext.iecas.resource.ActionLableResourceRB"><action name="submitReview" ajax="page"><command windowType="normal" class="ext.iecas.util.SetStateUtil"method="doSetState"onClick="JCAConfirm(event,&apos;ext.iecas.resource.ActionLableResourceRB.CONFORM_SU BMIT_REVIEW&apos;)"/></action></objecttype>3)在资源文件ActionLableResourceRB和ActionLableResourceRB_zh_CN里增加如下内容:@RBEntry("提交审阅")public static final String DOC_SUBMITREVIEW_TITLE = "doc.submitReview.title";@RBEntry("提交审阅")public static final String DOC_SUBMITREVIEW_TOOLTIP = "doc.submitReview.tooltip";@RBEntry("提交审阅")public static final String DOC_SUBMITREVIEW_DESCRIPTION = "doc.submitReview.description";@RBEntry("您确认要提交审阅吗?")public static final String CONFORM_SUBMIT_REVIEW = "CONFORM_SUBMIT_REVIEW";@RBEntry("height=200,width=300")@RBPseudo(false)public static final String DOC_SUBMITREVIEW_MOREURLINFO = "doc.submitReview.moreurlinfo";@RBEntry("提交审阅完成。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
thenticatedUser(String);
• 其它常用的方法。在 OrganizationServicesHelper的设计中,提 供了许多有关用户、群组、团队的“服务
”。Windchill中大量使用“Helper-服务模 式” 。有关“Windchill的3大模式”,请 详见《Windchill 客制化手册》倒数第2章
• 3、验证用户是否属于某角色
输入:表示用户的字符串,表示角色的字符串 输出:若属于则返回true其它返回false
• 4、将用户添加到组和角色 输入:表示用户、组、角色的字符串 输出:若发生异常则抛出异常
4、流程参数
• 进程类型:WfProcess • 活动类型:WfAssignedActivity • 进程上下文:ProcessData • 进程变量:WfVariable
WhereExpression where = new SearchCondition(WTPart.class, WTPart.xx, “=”, xx);//泛型在WC API中的使 用
//获取查询条件数目
If(qs.getConditionCount()>0 && qs.getWhere().endsWith(“)”)){ qs.appendAnd();
Windchill API 培训
张玉
பைடு நூலகம்
概述
• 只有掌握Windchill API,才能实施好方案. • 本文介绍方案实施中最常使用的API • WC API有框架,学习本文的基础,其它可举
一反三. • 养成“验证、总结”的好习惯
目录
1. 高级查询 2. 基本查询 3. 用户、组、角色的查与改 4. 流程参数 5. IBA操作 6. 设置生命周期状态 7. 设置动态权限 8. 部件与文档之间 9. 持续化操作 10. Windchill设计模式
PersistenceHelper.manager.find(qs); //过滤出最新小版本 LatestConfigSpec lcs = new LatestConfigSpec(); qr = lcs.process(qr);
习题1
• 1、查询部件 输入:部件编码 输出:各小版本对象的集合
• 2、接上题,添加条件:只得到最新小版本 • 3、查询部件的参考文档
1、高级查询
• 添加查询类型 • 添加查询条件 • 联合查询 • 添加生命周期条件 • 执行查询 • 过滤出最新小版本
QuerySpec qs = new QuerySpec();//构造
Int index = qs.appendClassList(WTPart.class,true);// 添加查询类型,获取类型索引,第2个参数 表示“要查询的类型、表”
ProcessData pPdata = wfProcess.getContext();
//获取变量 WfVariable xx = pData.getVariable(“xx”);
//准备SQL语句 PreparedStatement query = conn.
prepareStatement(SQL); //执行查询 ResultSet rs = query.executeQuery(); //关闭数据库连接。 conn.close();
习题2
• 1、查询部件的最新小版本
} //添加查询条件
qs.appendWhere(where, new int[]{index}); //** 以下是联合查询的API范例。LINK关系//ROLEA
、ROLEB的INDEX被使用到。 int linkIndex = qs.appendClassList(XXLink.class, false);
输入:部件编码 输出:部件的最新小版本
3、用户、组、角色的查与改
• WC中承担者的类型结构 • 核心API:OrganizationServicesHelper
• 承担者的类型结构 WTPrincipal
WTGroup WTOrgnazition
WTUser
• 查用户
OrganizationServicesHelper.manager.getAu
,本文略。
• 其它常用方法: getGroup(); getOrganization(); isMember(); members(); rename(); …
习题3
• 1、查找用户
输入:表示名称的字符串 输出:用户对象。若无此用户则返回null。
• 2、验证用户是否属于组
输入:表示用户的字符串,表示组的字符串 输出:若属于则返回true其它返回false
输入:部件对象 输出:此部件的所有参考文档
2、基本查询
• 建立数据库连接 • 准备SQL语句 • 执行查询 • 遍历查询结果 • 关闭数据库连接
//建立数据库连接 PDSIfc pds =
DataServicesRegistry.getDefault().getPdsF or(“Default”); Connection conn = null; if(pds!=null){ conn = pds.getDataSource().getConnection(); }
//获取活动
WfAssignedActivity activity = (WfAssignedActivity) workItem.getSource().getObject();
//获取进程
WfProcess process = activity.getParentProcess();
//获取进程上下文
qs.appendJoin(linkIndex, xxLink.RoleA, index_A);
qs.appendJoin(linkIndex, xxLink.RoleB, index_B);
//添加“生命周期”查询条件 LifeCycleConfigSpec lcsp = new
LifeCycleConfigSpec(); lcsp.setLifeCycleState(State.toState(state)); qs = lcsp.appendSearchCriteria(qs); //执行查询 QueryResult qr =
相关文档
最新文档