Parameters for Sample Scripts
If you chose to modify and use a sample script when you created the package associated with this test deployment, you need to add the appropriate parameters and values when you create a test deployment.
The parameters required for each sample script are outlined in the table below:
Deployment Action
Script Name
Parameters
Run an Application
run_app_sample.lua
  • exec_path—The file system path (including the file name) of the application being executed.
Transfer File (to agent)
transfer_to_agent_sample.lua
  • sourcePath—The relative path to the file, where the agents repository is the root.
  • sourceFile—The name of the file to transfer.
  • targetRepo—The name of the repository thing on the ThingWorx server.
  • targetPath—The relative path to where the file will be transferred to in the ThingWorx repository.
  • targetFile—The name of the file that will be created in the target repository.
Transfer File (from agent)
transfer_from_agent_sample.lua
  • sourceRepo—The name of the repository thing on the ThingWorx server.
  • sourcePath—The relative path to the file, where the ThingWorx repository is the root.
  • sourceFile—The name of the file to transfer.
  • targetPath—The relative path to where the file will be transferred to on the agent.
  • targetFile—The name of the file that will be created on the agent.
Restart Agent
restart_ems_sample.lua
  • twems_service_name—The name of the service that the EMS has been registered under on the agent’s operating system.
Set Agent Property
set_property_sample.lua
  • property_name—The name of the property being updated.
  • property_value—The value to set for the property.