Generic Device Control & Automation: Java Script Handling
Java Script: Main Features
Optional Java Script per each item call:
Before the execution takes place (e.g. to fill HTTP header params with a token, that can be saved in a private file)
After the execution, to process the returned result to a human readable one (, or to e.g. store a credential gathered in a preliminary step of a workflow)
Log Data from java script execution can be created for debugging reasons
Storage and retrieval of private files (only readable/writable within one item and its executions) and public files (readable/writable by/from any item)
Java Script code can return additional information whether to start, not start the execution, or to set to error.
Access to and change of calling parameters within Java Script, like HTTP Header, Bluetooth GATT Service ID, or Mail Subject
Different functions embedded, like Pre-Execute, Execute and Post-Execute
Reading and writing of data to be sent out in different formats, like:
Byte List
String as UTF-8, ASCII, Hex, Byte String
Several complete Item executions in a row can be steered with Java Script usage, using different calling parameters
Storage of an own context between different functions or Item Executions
Access to data from a previous row call, like data sent out, result retrieved
Complete documentation and examples available within the Script template
Documentation of Java Script Template
Java Script Output Processing