JavaScript Node

      JavaScript Node


        Article summary

        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

        1. First, select your desired solution and navigate to Rayven Workflow.
        2. Select ‘Functions’ from the left-hand panel.
        3. Find the JavaScript node and drag it onto the canvas.
        4. Connect the JavaScript node to your desired input node.
        5. Double click on the JavaScript node to open its configuration window.


        Configuring your JavaScript node

        1. Give your node a Name. Choose something simple that clearly explains its purpose.
        2. Select Javascript templates to add to your code. To get the device ID, select 'Add Device ID' from the dropdown list.
        3. 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.
        4. Select the action from the dropdown menu that the node should perform if there is an error in the code:
          1. Stop and log the error,
          2. Continue and ignore the error,
          3. 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