ThingWorx Flow > 安装和配置 > 配置 ThingWorx Flow > 在 ThingWorx Flow 中设置文件传输联合
在 ThingWorx Flow 中设置文件传输联合
先决条件
按照配置 ThingWorx 联合中的步骤设置 ThingWorx 联合。
步骤
完成以下步骤以在 ThingWorx Flow 中设置文件传输:
1. 在本地部署系统中,使用 FileRepository 作为基本事物模板来创建 WindchillSystemRepository 事物。
2. 在本地部署系统中,在 WindchillSystemRepository 事物中创建一个“工作流”服务 WindchillUploadFileService 以从 Windchill 下载文档,然后使用 ThingWorx“上载文件”操作将其上载到 WindchillSystemRepository
3. 在云端系统中,使用 RemoteThingWithFileTransfer 作为基本事物模板来创建 RemoteThingWithFileTransfer 事物。要将此 RemoteThing 与本地部署的 WindchillSystemRepository 绑定,您需要填充“标识符”字段。
“标识符”字段的值采用 nameOfThing@ServerIdentificationName 格式。例如,如果本地部署的 FederationSubsystem 的服务器标识名称为 publisher,并且事物名称为 WindchillSystemRepository,则“标识符”字段的值为 WindchillSystemRepository@publisher
4. 要验证连接是否成功,请导航至 RemoteThingWithFileTransfer 事物的“属性”页面,并确保 isConnected 属性为 true
5. 执行以下步骤以通过云端 ThingWorx 实例调用本地部署的 WindchillUploadFileService
a. 转至 RemoteThingWithFileTransfer 的“服务”页面,然后单击“浏览远程服务”。即会显示所有可用的远程服务。
b. 搜索 WindchillUploadFileService 并对其进行拖动,以创建新的服务。
6. 在云端系统中,在包含以下操作的 RemoteThingWithFileTransfer 事物中创建一个“工作流”服务 UploadWindchillFileToBox
WindchillRemoteService 操作 - 从 Windchill 下载文档,然后将其上载到本地部署的 WindchillSystemRepository
CopyFileFromOnPremToCloud 操作 - 将文件从本地部署的 WindchillSystemRepository 复制到云端 SystemRepository
Box 下的“上载文件”操作 - 将文件上载到 Box 帐户。
验证
在云端系统中执行此工作流会触发本地部署系统中的工作流,并执行以下任务:
将 Windchill 内容文件将下载到 WindchillSystemRepository
将 Windchill 内容文件从本地部署的 WindchillSystemRepository 复制到云端 SystemRepository
将 Windchill 内容文件上载到 Box 帐户。
这对您有帮助吗?