|
This section assumes that you have completed the prerequisites to create an instruction-based package.
|
By default, the major version number is populated with a 1 and the remaining fields are considered to have a value of 0. The following are examples of invalid values: • If you have a value for the last field in the Version field, an empty value for the preceding fields is invalid, and it is highlighted in red as shown below: Instead of leaving the fields blank, enter the following values (or any other values) in the empty fields: • If you enter a negative value in any of the fields, that particular field is highlighted in red as shown below: Fix the error by entering only non-negative integers in the fields. • If you enter an alphabet or an alphanumeric string in any of the fields, that particular field is highlighted in red as shown below: Fix the error by entering only non-negative integers in the fields. |
You cannot create two packages with the same name and version number. If a message is displayed that states that the package name and version exist, provide a unique name and version combination. |
Instruction | Task | ||||||
Download | Select a file from the ThingWorx repository that you want to download to the agent. Complete the following steps to add a file from the ThingWorx repository: a. The Target Repository field displays the configured Download Target Repository on the Deployment Configuration page. Click to modify the configured download repository. For more information, see Deployment Settings. b. The Directory Structure section displays the contents of the selected repository. You can perform the following actions under the Directory Structure section: ◦ If the file that you want to deliver to the asset is not available in the selected repository, click to upload a file to the ThingWorx repository. ◦ Click to download the file to the default download location on your machine. ◦ Click to delete the file from the repository. c. Under the Directory Structure section, navigate to the file that you want to download to the asset, and under the Directory Content section, select the file to display its name in the Selected Content Zip File Name field. Under the Directory Content section, the following information is available for each file: ◦ Name—If the file is available in the ThingWorx repository, it specifies the name of the file with its extension. If the file is uploaded to the repository, then the timestamp (in Epoch time) is appended to the file name. This timestamp distinguishes between two files with the same name. ◦ Upload Date—Specifies the date and time at which the file was added to the ThingWorx repository. ◦ Size—Specifies the size of the file in bytes. ◦ Path—Specifies the absolute path of the file in the ThingWorx repository. d. In the Destination Directory field, specify the location on the asset where you want to download the file. e. If you provided an absolute path in the Destination Directory field, select the Destination directory is absolute check box. This is optional. By default, this is not selected. f. If you want the edge device to uncompress the file after it is downloaded, select the Agent should uncompress this file after downloading check box. This is optional. By default, this is not selected.
g. Select the Overwrite existing files when this file is downloaded to the given directory check box if you want the existing files to be overwritten when the file is downloaded to the specified directory. This is optional. By default, this is not selected. h. Click Add to add the instruction to the instruction list. | ||||||
Execute | Executes a command on the remote thing. a. In the Executable field, enter the command that you want to execute. b. In the Arguments field, specify the arguments of the command that you defined in the Executable field. This field is optional.
c. If the path of the executable is absolute, select the Executable path is absolute check box. By default, this option is not selected. d. If you want the commands to be asynchronous which means that they are independent of each other while execution, select the Execute this command asynchronously check box. By default, the check box is not selected and the executions are synchronous. e. Click Add to add the instruction to the instruction list. | ||||||
Register Script | Allows you to add instructions as script which can be deployed for an asset or multiple assets for an Axeda agent. For steps to Register Script see: Execute Scripts for Deployment | ||||||
Restart | Restarts the agent. a. Select the Hard Restart. Uncheck for a Soft Restart check box to terminate the current agent process and start a new agent process. By default, Hard Restart. Uncheck for a Soft Restart is selected. If you do not want to terminate the current agent process but only reinitialize all the components and reload data from the disk, ensure that you clear the Hard Restart. Uncheck for a Soft Restart check box. This is a soft restart. b. Click Add to add the instruction to the instruction list.
| ||||||
Run Script | Allows you to run the registered script that can be deployed for an asset or multiple assets for an Axeda agent. For steps to Run Script see: Execute Scripts for Deployment | ||||||
Set Property | Sets the specified property value on the remote edge device. a. In the Property Name and Property Value fields, specify the name and value of the property.
b. Click Add to add the instruction to the instruction list. | ||||||
Unregister Script | Allows you to unregister a registered script for an asset or multiple assets for an Axeda agent. For steps to Unregister Script see: Execute Scripts for Deployment | ||||||
Upload | Allows Axeda eMessage agents to upload one or more files to the ThingWorx platform. a. In the Target Repository field, click to select the repository that you want to upload the files to. You could create a file repository for uploads and select that file repository, for example, UploadRepository. b. In the Target Path field, specify the location in the repository where you want to save the uploaded files. For example: /UploadFiles saves the files to the /UploadRepository/UploadFiles directory. A value of / saves the uploaded files to the UploadRepository directory.
c. In the field next to , type the name of the file that you want to upload and click . You can include wild-card entries such as * or ? in your file names. Use * to represent multiple characters and ? to represent a single character. Ensure that this file exists in the relative path of your device. Wild card characters (*,?) are allowed for Linux agents. For agents running on Windows, the ? character has the same effect as the * character.
The File(s) to Upload grid displays the list of files that must be uploaded to the ThingWorx platform along with their delete flag status. If you want to delete any file from the list, select the entry in the list, and click . d. After adding a file for upload, you have the option to delete the file from your repository after the package is deployed successfully. To delete a file after upload, select the file and toggle the Table Row Actions button. This changes the Delete File After Upload status totrue and the file is deleted after the package is successfully deployed. You can select individual files by selecting each file on the grid, or select all the files added for upload by selecting the File Name check box. By default Delete File After Upload status is false. The toggle button can change status from true to falseor fromfalse to true e. Click Add to add the instruction to the instruction list. |
You can add multiple instructions to a single instruction-based package. |
Ensure that there is only one Restart instruction in the list of instructions and the Restart instruction is the last instruction in the list of instructions. |