JavaScript Node
JavaScript Node
Article summary
Did you find this summary helpful?
Thank you for your feedback
Javascript Node
The JavaScript node performs complicated logic operations and creates new JSON keys using the JavaScript language.
Adding a JavaScript node to your workflow
- First, select your desired solution and navigate to Rayven Workflow.
- Select ‘Functions’ from the left-hand panel.
- Find the JavaScript node and drag it onto the canvas.
- Connect the JavaScript node to your desired input node.
- Double click on the JavaScript node to open its configuration window.
Configuring your JavaScript node
- Give your node a Name. Choose something simple that clearly explains its purpose.
- Select Javascript templates to add to your code. To get the device ID, select 'Add Device ID' from the dropdown list.
- Enter your JavaScript code under 'JavaScript'. The 'Input' should be the value received by the node. The 'Result' is the output the node will send to the next stage of the workflow.
- Select the action from the dropdown menu that the node should perform if there is an error in the code:
- Stop and log the error,
- Continue and ignore the error,
- Continue and add the error to the JSON.
Note: The JavaScript node integrates with the Monaco editor. This enables IntelliSense and syntax colorization.
As of Release: 31.01.2022