其他配置 > 配置 ThingWorx Navigate 连接到多个 Windchill 系统
  
配置 ThingWorx Navigate 连接到多个 Windchill 系统
可以将 ThingWorx Navigate 连接到多个 Windchill 服务器。ThingWorx Navigate 会搜索系统,并在一个页面上向最终用户显示搜索结果。
本主题介绍如何配置 ThingWorx Navigate 连接到多个 Windchill 实例,每个实例执行 ThingWorx Navigate 中的服务,用于自动复制所需的连接器、实体和服务。
先决条件
在设置多个 Windchill 配置之前,请确保满足以下先决条件:
Windchill 服务器已设置。
配置 ThingWorx Navigate 使用单一登录或 Windchill 身份验证。
每个用户在各个 Windchill 系统上具有相同的用户名。
每个 Windchill 系统根据该特定系统授予用户的权限返回数据。如果用户以不同的用户名登录,ThingWorx Navigate 将不会如预期一样工作。
添加 Windchill 服务器
要添加另一个 Windchill 服务器,需要复制现有的资源提供者和 Windchill 连接器:
1. ThingWorx Composer 中,在“系统”之下单击“资源”
2. 搜索资源 NavigateSetupUtils 并打开它。“常规信息”页面随即打开。
3. 单击“服务”“服务”页面打开。
4. 搜索 AddWindchillServerForNavigate,然后单击“执行服务”“执行服务”窗口随即打开。
5. suffix 下,将后缀添加到复制的服务器名称,然后单击“执行”
6. 在输出中检查复制的事物摘要:
ptc-windchill-integration-connector-proxy_suffix
ptc-windchill-integration-connector_suffix
WindchillDemoPartResourceProvider_suffix
WindchillDocumentResourceProvider_suffix
WindchillDemoEpmDocumentResourceProvider_suffix
WindchillDemoRepresentationResourceProvider_suffix
* 
如果您在输出中发现错误并且服务失败,则不会创建新的连接器,并且您将无法使用多个 Windchill 服务器配置系统。
7. 单击“完成”
8. 要检查是否已创建了复制的连接器、连接器代理和资源提供者,请搜索具有指定后缀的名称。
9. 如果 ThingWorx Navigate 已配置了单一登录,请重新启动 Apache Tomcat,否则无法配置连接器。
现在,您已添加了复制的连接器,下一步是使用多个 Windchill 连接的身份验证方法配置 ThingWorx Navigate
根据原始连接器和连接器代理 (ptc-windchill-integration-connectorptc-windchill-integration-connector-proxy) 的配置,配置新连接器和连接器代理 (ptc-windchill-integration-connector_suffixptc-windchill-integration-connector-proxy_suffix),但将新的 Windchill 服务器详细信息添加到:
ptc-windchill-integration-connector-proxy_suffix URL 和测试连接 URL
ptc-windchill-integration-connector_suffix 基本 URL
继续单一登录或 Windchill 身份验证部分。
配置新服务器使用单一登录
要配置其他 Windchill 服务器采用单一登录,请遵循《PTC 单一登录体系结构和配置概述指南》中的“方案:ThingWorx 作为服务提供者和 Windchill 作为资源提供者”。该指南提供了操作说明和数个身份提供者配置示例。
您的系统现已连接到新 Windchill 服务器。再次登录到 ThingWorx Navigate 即可访问多个 Windchill 系统的数据。
配置新服务器使用 Windchill 身份验证
如果您正在使用 Windchill 身份验证,请执行以下步骤:
1. ThingWorx Composer 中,在“安全”之下单击“身份验证器”
2. 单击 ptc-identity-provider-authenticator 将其打开。
3. 单击“配置”。将显示“配置”页面。
4. 选中 MultipleWindchillServers 的复选框 - 该操作将 ThingWorx Navigate 连接到两个或更多 Windchill 实例。
5. 停止 Apache Tomcat 和 ThingWorx Integration Runtime。
6. 替换 Tomcat 安装目录中的 web.xml 文件:
a. 浏览到 <Tomcat 安装位置>\webapps\Thingworx\WEB-INF
b. 复制 web.xml 并将该副本保存到其他位置。
c. 浏览到 <Navigate 安装位置>\MultiWindchillConfiguration\idp\,然后复制 web.xml 文件。
* 
如果单独下载了 ptc-windchill-extension,也可以从 ptc-windchill-extension\idp\twx-8.3.x\multi 文件夹复制 web.xml 文件。
d. web.xml 粘贴到此位置:
<Tomcat 安装位置>\webapps\Thingworx\WEB-INF
7. 启动 Apache Tomcat 和 ThingWorx Integration Runtime。
* 
请确保 KeyStore 和 TrustStore 文件包含所有 Windchill 服务器所需的证书。如果缺少证书,您将无法连接到其他 Windchill 服务器。
新的服务器现在已配置为使用 Windchill 身份验证。再次登录到 ThingWorx Navigate 即可访问多个 Windchill 系统的数据。
* 
对于使用 Windchill 身份验证配置的系统,用户必须以各个 Windchill 实例的相同用户角色进行登录。
请继续下一部分,为新的服务器设置刷新率。
为新服务器配置刷新
如果要将 Windchill 服务器添加到现有 ThingWorx Navigate 设置中,须决定用户何时可以看到新服务器的结果。为新服务器选择以下刷新类型之一:
仅在登录时查找新服务器 - 这是默认值。用户下次登录 ThingWorx Navigate 时将看到新服务器上的搜索结果。
每 n 秒刷新一次 - 系统每 n 秒检查新服务器。用户将在刷新后看到其他服务器的结果,而不必先注销。设置自动刷新率的步骤如下所示:
1. 停止 Apache Tomcat 和 ThingWorx Integration Runtime。
2. 在文本编辑器中打开文件 <Tomcat 安装位置>\webapps\Thingworx\WEB-INF\web.xml
3. 查找 mwaTimePeriod,将参数值更改为 +n,其中 n 指定每隔 n 秒查找新的服务器。
* 
如果您正在使用 Windchill 身份验证,此参数设置为正值并且其中一个 Windchill 服务器已关闭,当该服务器重新启动后,用户可能会发现问题。在这种情况下,用户应刷新 ThingWorx Navigate 的登录页面以获取该服务器的 Windchill 登录提示。
或者,您可以将 masterIdpServer 参数值更改为 Windchill URL,从而选择用户首先登录的 Windchill 服务器。
4. 保存并关闭该文件。
5. 启动 Apache Tomcat 和 ThingWorx Integration Runtime。
* 
对于此配置,请注意以下几点:
对于使用 Windchill 身份验证配置的系统,用户必须以各个 Windchill 实例的相同用户角色进行登录。
不支持“下载绘图资源束”任务。