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