-
Notifications
You must be signed in to change notification settings - Fork 0
Logic File
This file has a .node.ts extension and defines what the node will do when it starts running. It is the functional part of the node.
There are some important built-in functions you should know when you are creating node class:
-
getParameter(name: string)
It is used to get the data in a desired input of the node. When you give the name of the value input as a parameter, you can get the relevant input value.
-
getAllParameters()
It is used to get all input parameters. You get them all as an object.
-
getAllNodeConfig()
It is used to get all configuration parameters. You get them all as an object.
-
execute()
The function where the main function of the node is defined. You can create any methods you want in the node class you create, but the main method that the system will use to run the node is the execute method.
-
registerEvent(eventName: string, customEventFunc: CustomEventFunc)
All nodes can have event inputs and outputs. start, end, error are built-in event handles. You may need to create custom event handles depending on the function of your node. For example, if you are writing a Counter node, you can write a clear event handle and have the counter stop when triggered. This function is used to introduce similar custom event outputs to the node.
-
returnOutput(data: OutputData)
It is used to send values to the output ends of the node. After the function written inside the execute method is finished, it will transfer the result of the function to the node outputs. At this point, the desired value can be transferred to the desired output by using the returnOutput method and giving the node's output object as a parameter.
OriginZero - Collaborative low-code workflow automation tool
About | Code of conduct | Discord | Github Discussions | Linkedin