ThingWorx Flow > Administrator Tasks > ThingWorx Federation
  
ThingWorx Federation
Set up the federation as outlined in the ThingWorx Help Center.
Setting up the File Transfer
1. In the on-premise system, create a Thing such as WindchillSystemRepository using the FileRepository Thing Template.
2. Create a Flow Service in the on-prem system, which downloads a document from Windchill, and then uploads it to the WindchillSystemRepository using the ThingWorx Upload File action.
3. In your Cloud System, create a RemoteThing using a RemoteThingWithFileTransfer ThingTemplate. To bind this RemoteThing with the on-prem WindchillSystemRepository; you will need to populate the Identifier field. The Identifier field format is nameOfThing@ServerIdentificationName. For instance, if your on-premise Federation Subsystem’s server identification's name is publisher and the name of the Thing is WindchillSystemRepository, the Identifier field will be WindchillSystemRepository @publisher.
4. To verify the connection was successful, navigate to the RemoteThingWithFileTransfer Thing properties page and ensure the isConnected property is true.
5. Perform the following steps to invoke the on-prem's WindchillSystemRepository’s WindChillUploadFileService via the cloud ThingWorx instance:
a. Go to the RemoteThingWithFileTransfer service page, and then click Browse Remote Services. All the Remote Services that are available are displayed.
b. Search for WindchillUploadFileService and drag it to create a new service.
6. Create a flow on the cloud system, which executes the flow in on-prem system using the WindchillRemoteService action (which downloads a Document from Windchill and then uploads it to the On Prem’s WindchillSystemRepository), CopyFileFromOnPremToCloud action that copies the file from on prem’s WindchillSystemRepository to the cloud’s SystemRepository and Box Upload File action which uploads the file to the Box account.
Execution of the flow on the cloud system is as shown in the figure that follows:
This automatically triggers the flow in the on premise system as shown in the figure that follows:
The flow downloads the Windchill Content file to WindchillSystemRepository in an on premise system.
The Flow execution copies the Windchill Content File from the on premise WindchillSystemRepository to the cloud’s SystemRepository.
The Windchill Content File is uploaded to the Box account as shown in the figure that follows: