Script
This context lets you access and manage a single script.
Unique Actions
Execute Script
This action causes the server to compile and launch the script. If any errors occur during compilation or are produced by the script itself, they are reported to the user using the Show Error UI Procedure.
Action Name: | execute |
Non-Interactive Mode: | Not Supported |
Permissions: | Accessible at Engineer permission level |
Configure
This action is used to edit Script properties. Note, that Administrator permission level in the Script context is required to change script text.
![]() | Changing Name field during this operation will cause renaming of current context. This may lead to malfunctioning of other system components that use context name/path as a primary identifier. |
Action Type: |
Edit Source
This action starts the built-in text editor (with syntax highlighting) and allows the user to edit the script source. The text editor available in Iotellect Client is described here.
Action Name: | editSource |
Non-Interactive Mode: | Not Supported |
Permissions: | Accessible at Administrator permission level |
Common Actions
Delete, Make Copy, Replicate, Edit Context Permissions, Monitor Related Events, View Status
Context States and Icons
This context has no states. It is always represented by the icon.
Advanced Information |
Context Information
Context Type: script
Context Name: provided by user
Context Description: provided by user
Context Path: users.USER_NAME.scripts.SCRIPT_NAME
Context Mask: users.*.scripts.*
Context Permissions
Level | Description |
None | No access allowed. |
Observer | Basic event monitoring. Status browsing. |
Operator | Configuration browsing. |
Manager | Script configuration and removal. |
Engineer | Script execution. |
Administrator | Script source editing. |
Public Variables (Properties)
Common Variables: groupMembership (Group Membership), activeAlerts (Active Alerts)
Script
Properties
See description of the variable and its fields here.
Variable Name: | childInfo |
Records: | 1 |
Permissions: | Readable at Observer permission level, writable at Manager permission level |
Record Format:
Field Name | Field Type | Notes |
name | String | 1 - 50 characters |
description | String | 1 - 50 characters |
scriptLanguage | Integer | |
text | String | Text can only be changed under Administrator permission level. |
rText | String | Text can only be changed under Administrator permission level. |
pythonText | String | Text can only be changed under Administrator permission level. |
autorun | Boolean |
Public Functions
Execute Script
Executes the script and returns the data it generates. A list of parameter objects passed to the script as input is constructed from the function input Data Table by taking the values of its cells field-by-field, starting from the first row. If the script returns a Data Table object, this function will return it unchanged. If the script returns another value type that is supported by the Data Table format, this object is wrapped into a single-cell table with a field of a corresponding format. If script returns a value of a type that is not supported by the Data Table format, this value is converted to a string (by calling Java Object.toString()
method) and wrapped into a single-cell Data Table with a string field.
Function Name: | execute |
Permissions: | Accessible at Engineer permission level |
Input Records: | 0...unlimited |
Input Format: | Dynamic |
Output Records: | 0...unlimited |
Output Format: | Dynamic |
Public Events
Common Events: info (Information)
Was this page helpful?