Upgrading from ThingWorx Utilities to ThingWorx Apps
You can upgrade your ThingWorx Utilities instance to ThingWorx Apps by completing the following steps.
1. Upgrade your ThingWorx Utilities instance to 8.5.x.
3. For each thing template used for equipment that you want to see in
ThingWorx Apps, define an equipment type in the
EquipmentTypeSettings configuration table on the
Configuration page of the
PTC.Factory.C_LaunchPointconfigurationThing_[ReleaseVersion] following the instructions in
Creating Custom Equipment Types and Structures.
4. Update each thing template which is used for equipment that you want to see in ThingWorx Apps.
a. In ThingWorx Composer, find and edit the thing template.
b. Add the required thing shapes to your thing template as
Implemented Shapes, as listed in
Creating Custom Thing Templates for Equipment Types. If your thing template is not editable, then you need to create a new thing template that extends from your existing thing template, and add the required thing shapes on the new thing template. Ensure that your things extend from this new thing template.
c. Make the following additional changes as needed, to avoid conflicts:
▪ If your thing template has the vncPassword property defined, such as the following thing templates, do not implement the PTC.SCA.SCO.RemoteTunnelingThingShape:
▪ TW.RSM.Template.AssetWithTunnels
▪ TW.RSM.Template.AssetWithTunnelsAndFileTransfer
▪ TW.RSM.TemplateRemoteAsset
▪ If your thing template implements the TW.UTL.FileTransferHistory thing shape, then do not implement the PTC.SCA.SCO.FileTransferHistoryHandlerThingShape.
d. Save the thing template.
5. Associate a value stream to each of your things, if they do not have an associated value stream.
6. For equipment to display appropriately in ThingWorx Apps, each associated thing must have the displayName property specified in ThingWorx Composer.
7. The ThingWorx Apps use the PTC.SCA.SCO.AssetRemoting.FileTransferHistoryStream stream to record file transfer events, while the ThingWorx Utilities use the TW.RSM.FileTransferHistoryStream. If you are using the File Transfer functionality available with the optional Remote Access and Control extension, complete the following actions in ThingWorx Composer:
◦ Edit the TW.RSM.FileTransferHelper thing. Under Configuration. Set the File History Stream Thing to PTC.SCA.SCO.AssetRemotingFileTransferHistoryStream. Click Save.
◦ Copy the data from the TW.RSM.FileTransferHistoryStream thing to the PTC.SCA.SCO.AssetRemotingFileTransferHistoryStream thing.
▪ If you have more than fifty thousand rows of data, use a native SQL script appropriate for your ThingWorx database, similar to the following example. Back up your ThingWorx database before running the script.
INSERT INTO stream (entity_id,source_id,time,field_values,location,source_type,tags)
SELECT 'PTC.SCA.SCO.AssetRemoting.FileTransferHistoryStream',source_id,time,field_values,location,source_type,tags
FROM <YOUR_THINGWORX_SCHEMA_NAME>.stream
WHERE entity_id= 'TW.RSM.FileTransferHistoryStream'
8. The ThingWorx Apps use the modelNumber and serialNumber properties, while the ThingWorx Utilities use the ModelNumber and SerialNumber properties. If you need to copy the ThingWorx Utilities ModelNumber and SerialNumber properties on your thing to the ThingWorx Apps modelNumber and serialNumber properties, then create a ThingWorx service using the following code, and execute the service.
var assets = ThingShapes["PTC.ISA95.IdentifierThingShape"].GetImplementingThings();
var assetCount = assets.rows.length;
for (varx = 0; x < assetCount; x++) {var thing = Things[assets.rows[x]["name"]];var params =
{
category: undefined /* STRING */ ,
type: undefined /* BASETYPENAME */ ,
dataShape: undefined /* DATASHAPENAME */};// result: INFOTABLE dataShape: "PropertyDefinition"
varproperties = thing.GetPropertyDefinitions(params);foreach(property in properties.rows) {if (property.name == "ModelNumber" && thing.ModelNumber !== null)
{
thing.modelNumber = thing.ModelNumber;
}if (property.name == "SerialNumber" && thing.SerialNumber !== null)
{
thing.serialNumber = thing.SerialNumber;
}
}
}
9. If you intend to use the Software Content Management functionality, see
Software Content Management for additional configuration information.