If ThingWorx Remote Access and Control has been installed and you are using the File Transfer functionality, you can configure your system to record your file transfer
history.
To capture file transfer history, perform the following steps for your new or existing things or thing templates:
New Asset Thing or Thing Template
When configuring a new thing or thing template, select one of the following
ThingWorx Utilities templates as the base thing template:
- TW.UTL.RemoteThingWithFileTransfer
- TW.UTL.RemoteThingWithTunnelsAndFileTransfer
Existing Asset Thing or Thing Template
For existing things or thing templates that use the
ThingWorx RemoteThingWithTunnelsAndFileTransfer or RemoteThingWithFileTransfer template as the base thing template, perform the following
steps:
- In ThingWorx Composer, edit your thing or thing template to add the TW.UTL.FileTransferHistory thing shape .
- Configure the file transfer subscription:
- In the left panel, under ENTITY INFORMATION, click Subscriptions.
- Click Edit, and then click Add My Subscription.
- From the Event list, select FileTransfer.
- In the Scripts field, enter JavaScript for your subscription. For example:
// eventData: INFOTABLE dataShape: FileTransferJob
var streamParams = {
assetName : me.name,
fileTransferEventData : eventData
};
me.FileTransferHistoryHandler(params);
- Save your thing or thing template.