ION Scripting
The ION Scripting functionality enables you to customize scheduling logic using the Python scripts based on the specific requirements. These scripts can be used to modify the schedule in Production Scheduling. Scripts can be executed through the Run Script macro.
When Production Scheduling executes a Run Script macro, the process is as follows:
- Production Scheduling collects data related to the selected batches and sends to the Python script in the ION scripting environment.
- The Python script uses data to create a series of commands and messages.
- The generated commands and messages are sent back to the Production Scheduling application.
- Production Scheduling executes generated commands and displays the messages in a message log.
The Python script follows a consistent structure using variables, to facilitate communication between the Production Scheduling application and ION scripting environment.
These are the available variables:
input_data
: Contains the initial data sent to the script.output_data
: Contains the commands and messages created by the script.
After a script is added and approved in the ION Scripting framework, you can run the script using these menus in the Production Scheduling application:
- Macros or Run Macro option and run the required script in the
Automation.Run
action.
: Select - Run Script option and run the required script. : Click the
An error message is displayed, and the execution stops, if:
- The SCP application is not running in the cloud environment.
- The specified script name is invalid or does not exist.
- The script contains errors or generates invalid output.