Data processing nodes include page navigation nodes, parallel data processing nodes, serial data processing nodes, sequence execution nodes, and WebSocket nodes. This topic describes how to configure data processing nodes in Blueprint Editor.
Page navigation node
The page navigation node, which can be used to redirect pages. You can open a new browser tab or redirect pages within the current tab. You can also specify custom parameters when you redirect pages.
Scenario: A large number of page navigation nodes are used to navigate to a new page. For example, in the following scenario, you can click an area on the map to go to the lower-level page of the configured area. When you click the map area, you can use the Serial Data Processing node to obtain the value of the adcode field in the current area, and the returned parameter data is return {adcode: data.area_id};
. Then, in the configuration panel of the navigation node, set the link address of the lower-level jump page to https://www.other-page.com
, customize the parameter variable name adcode, and enter the result returned by the serial data processing into the open page of the page navigation node.
Add a page navigation node to the canvas. You can view the events and actions supported by the page navigation node and the configuration parameters. For more information, see Use logical nodes.
Parameter | Feature |
Link Address | The URL of the destination page. |
New page | Turn on the switch to open a new web page to open the jump link address; Turn off the switch to open the jump link address on the original web page. |
request parameters | You can customize the parameter name and parameter value of the request parameters when you jump to the page. Click the or icon on the right to add or remove a request parameters. Click the or icon to configure the arrangement style of multiple request parameters. Click the icon to copy the selected request parameters configurations and add a request parameters with the same configurations. |
The following table describes only the parameters in Other Configurations. For more information about other parameters, see Common parameters.
Output: none.
Parallel Data Processing nodes
A parallel data processing node is used to process multiple events in parallel. Each event does not affect each other.
Scenarios: Parallel data processing nodes are widely used in data distribution scenarios. For example, a widget interface returns {name: 'Blueprint Editor', version: 'v1.0' }
, which is distributed to two common title widgets. One uses the name field and the other uses the version field. You can use this node to add two processing methods, one for return [{value: data.name}]
and the other for return [{value: data.version}]
.
Add a Parallel Data Processing node to the canvas. You can view the events and actions supported by the Parallel Data Processing node and the configuration parameters. For more information, see Use logical nodes.
Event or action | Description |
Processing method | The method for processing data in parallel. You can add multiple processing methods in the configuration panel. After the processing methods are added, they are displayed in the Parallel Data Processing node. Different processing methods can be connected to different upstream nodes to implement data parallel processing. |
Parameter | Feature |
Processing method | Allows you to edit the function body in JavaScript. The return result can be of any type. |
The following table describes only the parameters in Other Configurations. For more information about other parameters, see Common parameters.
Output: The output result of an upstream node is calculated by using its associated processing method.
Serial Data Processing nodes
The Serial Data Processing node processes an event in serial mode.
Scenarios: If you want to convert a decimal number 0.835 to a percentage of an integer 83%, the following operations are required: Change 0.835 to 83.5 based on the conversion of units, round down to 83, and add the percent sign (83%). All of these operations must be performed in a serial fashion.
Add a Serial Data Processing node to the canvas. You can view the events, actions, and configuration parameters that are supported by the Serial Data Processing node. For more information, see Use logical nodes.
Event or action | Description |
Processing method | The method for processing data in a serial fashion. You can add multiple processing methods in the configuration panel. After the processing methods are added, they are displayed in the Serial Data Processing node. All the processing methods work together to process data. |
Parameter | Feature |
Processing method | Allows you to edit the function body in JavaScript. The return result can be of any type. |
The following table describes only the parameters in Other Configurations. For more information about other parameters, see Common parameters.
Output: The output result of an upstream node is calculated by using its associated processing method.
Sequential Processing nodes
If you want to execute actions on downstream nodes in sequence, you can use the Sequential Execution node to ensure that actions are executed in sequence from top to bottom.
Scenarios: Each scenario has multiple data panels. If you need to use the data panels of scenario B instead of the data panels of scenario A, You can use the Sequential Execution node to group data panels in different scenarios, and then execute them in the order of A and B.
Add a Sequence Execution node to the canvas. You can view the events and actions supported by the Sequence Execution node and the configuration parameters. For more information, see Use logical nodes.
Event or action | Description |
Execute | The output result of an upstream node is provided to calculate the result of a Sequential Processing node. |
Data processing | The method used by a Sequential Processing node to process data. You can add multiple processing methods in the configuration panel. After the processing methods are added, they are displayed in the Sequence Execution node. Each method performs data processing in sequence. |
Parameter | Feature |
Processing method | Allows you to edit the function body in JavaScript. The return result can be of any type. You can configure multiple processing methods and they do not affect each other. This is because each processing method uses independent calculations. The output result of the upstream node is used as the input for each method and the calculation result of each processing method is used as the output. |
The following table describes only the parameters in Other Configurations. For more information about other parameters, see Common parameters.
Output: The output result is obtained after the output result of the upstream node is calculated by using the processing methods in sequence.
WebSocket nodes
WebSocket nodes are inter-screen communication nodes. Each message is composed of a message name and data. The message name is customized in configuration parameters, and the data is the output result of the upstream node.
Scenario: WebSocket nodes are used for commands and Data Transmission Service between multiple terminals. For example, data transmission between large screens and mobile terminals or between large screens and touch screens.
Add WebSocket nodes to the canvas. You can view the configuration parameters of WebSocket nodes. For more information, see Use logical nodes.
Parameter | Feature |
Socket Service Address | The address of the socket backend service. The DataV-WS toolkit is provided for you to choose. For more information, see How to use DataV-WS services. |
Screen ID | The ID of the screen where the WebSocket node is located. Enter the ID. |
Screen Name | The name of the WebSocket node on the screen. |
Grouping | WebSocket node messages are broadcast only in the same group under the same socket service. In most cases, one group name is used for one project. |
Receive messages | The name of the message that the WebSocket node receives from the other end. Click the or icon on the right to add or delete an accept message. Click the or icon to configure the arrangement style of multiple received messages. Click the icon to copy the content of the selected message receiving configuration and add a message receiving configuration. |
Send messages | The name of the message that this WebSocket node sends to the other end. Click the or icon on the right to add or delete a message. Click the or icon to configure the arrangement style of multiple sent messages. Click the icon to copy the content of the current message sending configuration and add a message sending configuration with the same configuration. |
The following table describes only the parameters in Other Configurations. For more information about other parameters, see Common parameters.
Output: none.
User-created WebSocket node service
If you have created a WebSocket node service, you can connect this service to the WebSocket node provided by DataV without the need to write any frontend code.
Registration messages
The following code snippet shows the format of a registration message sent by the WebSocket node.
{ event: "register", data: { sid: 407194, //The project ID. name: "Data source control mode test", //The project name. group: "Default group" //The default group. }, callback: "callback_15832235175585251131307383912" //The current timestamp of the registration, which is automatically generated. }
After the WebSocket node service receives the registration message, the following message must be returned before the service registers with the WebSocket node:
{ event: "callback_15832235175585251131307383912", //The same timestamp of the previous registration is returned. data: { isError: false, //Set the value to false. data: "ok" } }
Message sending
The following code snippet shows the format of a registration message sent by the WebSocket node.
{ event: 'broadcast', data: { event: "Sent message 1", //The name of the sent message. data: {} //The data in any format. } }
Receive a message
The following code snippet shows the format of a message received by the WebSocket node.
{ event: "broadcast_Received message 1", //broadcast_${Received message name} data: {} //The data in any format. }
If you cannot connect to the WebSocket server, perform the following steps to troubleshoot the issue:
The WS service cannot be directly accessed over HTTPS. You must use the WSS service and use your own SSL Certificates Service to proxy the WS service address before you can access the WS service over HTTPS.
Use the function key F12 to open the browser debugging page, check the WS tag connection prompt information on the browser network tab, and check whether the cross-domain is not configured and whether there is a setting Sec-WebSocket-Protocol to echo-protocol in the header of the response returned by the connection.
After the connection is successful, you can pass parameters based on the message format in the document.