Package
Create Package
 Note
There is a sample-scripts directory available on the ThingWorx server in which 5 sample scripts are listed. You can download them, modify them, and include them in a package as the Lua instruction file. Sample scripts are available for the following package actions:
  • Run an Application
  • Transfer File (to agent)
  • Transfer File (from agent)
  • Restart Agent
  • Set Agent Property
 
To execute these scripts on the agent, you must add the script to the zipped package content and upload the package to the ThingWorx Platform server through this page. Then, once you have created a package with the desired sample script, you must configure the deployment (test or production) with the expected script parameters. To do this with a test deployment, see Creating a Test Deployment. To do this with a production deployment, see Creating the Deployment.
  1. From the left pane in the ThingWorx Software Content Management, navigate to Package  Create package.
  2. Enter information for the following fields:
    Field
    Description
    Package Name
    Name of the package.
    Package Description
    Brief description of the package.
    Version
    Version for the package. A version number is required. You must enter at least a first number.
    Expiration
    Indicates if the package has an expiration date.
    • Never—Package will not expire. By default, this option sets the expiration date to 100 years from the date the package was created.
    • Date—Select a date from the calendar.
     Note
    You cannot create two packages with the same name and version numbers. If a message displays stating that the package name and version already exist, provide a unique name and version combination.
     
  3. Use the Directory Structure tree to navigate to the file you want to deliver to the asset, and select it in the Directory Content list.
    The following information is available for each file in the Directory Content list:
    • Name
    • Path
    • Upload Date
    • Size
    Once you have selected a file, it appears in the Selected Content Zip File Name field.
    You can also upload or download a file using the Image Download File and Image Upload File actions.
  4. Type the full name of the instructions file (Lua file) that is contained in the selected ZIP file in the Instruction File Name in Zip File field.
  5. Click Save. The Create Test Deployment page appears. For more information, see Test.
Once you have created a package, you can edit it at any time by using the Find Packages page to find the package. Double-click the package entry in the list to edit it. All of the information that you enter when creating a package can be modified.
Find Packages
The Find Packages page allows you to view a list of available packages. You can find and select packages to test for deployment, and to edit, copy, publish, or delete packages. You can use the package name, description, or version to narrow the search results, or filter the results by a last updated date range or the user that updated the package.
You can also choose to search for only published or unpublished packages, or both. Once you find the package you are looking for, you can edit the package by double-clicking the package entry.
Image
The following information is available for each package in the list:
Column
Description
Name
The name of the package.
Published
Icon that indicates whether or not the package has been published:
  • Image—The package has not been published and is still editable. The package should not yet be used for a production deployment.
  • Image—The package has been published and is ready for production deployment. You cannot edit, delete, or re-publish the package.
     Note
    To modify a published package, make a copy of that package and edit the copy.
To publish a package, use the Image publish action in the Table row actions menu.
Version
Version defined for the package.
Description
Description of the package.
Expiration Date
The date and time that the package will expire, if applicable. When a package expires, it can no longer be used for deployment.
Package File
The name of the zip file that contains the instructions file.
Instructions File
The name of the instructions file (.lua) contained in the package file.
Updated By
The user that last updated the package.
Updated Time
The date and time that the package was created, or last modified.
Double-click any package in the list to view more details for that package. From the View Package Details page, you can also Edit, Publish, or Test the package.
My Recent Packages
The My Recent Packages page shows all packages you have updated recently, with the most recent packages shown first. Find and select the packages you want to test for deployment, or to edit, copy, or publish.