Python Script Editor

Python language based Script Editor

Node Definitions

Python Script Editor has no unique node definition to be configured, you can give it a name and a description:

Input Ports

You can define input ports to the Python Script Editor, and use these inputs' value in your Rule Editor with the function getInputValueById

Output Ports

Your output port values are set in your Rule Editor with the function setOutputValueById When you define your input and output ports, each of those will have unique IDs and will be visible in your Rule Editor page.

System Ports

For more information read here

Rule Editor

Rule Editor has two sections. On the left-hand side you can see your Input & Output ports with their id written and a copy button.

Input ports will copy getInputValueById(that-ports-id) which you can use in your code section to get that input port's value.

Output ports will copy setOutputValueById(that-ports-id, value)which you can use in your code to set that output port's value.

In your code section in the Rule Editor you can use python libraries by importing them (e.g. from random import randint).

⚠️ This is a python script, therefore adhere to the indentation rules, otherwise script will not run as expected.

Working Example

Last updated