ThingWorx Flow > ThingWorx Flow 安裝與管理 > 管理 ThingWorx Flow > 使用 ThingWorx Flow 設定檔案傳輸聯合
使用 ThingWorx Flow 設定檔案傳輸聯合
先決條件
請遵循 配置 ThingWorx 聯合中的步驟來設定 ThingWorx 聯合。
完成下列步驟以設定在 ThingWorx Flow 中的檔案傳輸:
1. 在內部部署系統中,使用 FileRepository 物範本建立物件,例如 WindchillSystemRepository
2. 在內部部署系統中建立流程服務,其會從 Windchill 下載文件,然後再使用 ThingWorx「上載檔案」動作將該文件上載至 WindchillSystemRepository
3. 在雲端系統中,使用 RemoteThingWithFileTransfer ThingTemplate 建立 RemoteThing。欲將此 RemoteThing 與內部部署 WindchillSystemRepository 繫結,您需要填入「識別元」欄位。「識別元」欄位的格式為 nameOfThing@ServerIdentificationName。例如,如果內部部署聯合子系統的伺服器識別名稱為 publisher,且物件名稱為 WindchillSystemRepository,則「識別元」欄位將為 WindchillSystemRepository @publisher。
4. 欲核對連線是否已成功,請導覽至 RemoteThingWithFileTransfer Thing 內容頁,並確保 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 帳戶,如下圖所示: