Component Operation with websocket connection
:icons:font :hardbreaks: :imagesdir: ../../../assets/images :toc-title: Contents :toc:
Description
Performs one of the operations with a websocket connection of a system user or an external system. The connection must exist and be active. +\
It is possible to send asynchronous messages to the connection, send requests and receive responses. Plugin methods are supported. Two-way file sharing using HTTP is available, as well as providing public temporary links to files via HTTP.
Index |
|
Short name |
|
Script types |
|
Start module |
|
Mode |
Asynchronous |
Icon |
|
Branching type |
Branching, closing |
Properties
| Specification | Description |
|---|---|
Name: Operation Code: Visibility condition: no Default: Send |
Select an operation from the list. Possible options:
|
Name: Connection ID Code: Visibility condition: no Default: — |
Identifier of the active websocket connection. A connection can be established by an external system with any of the web servers in the deployed cluster, even on a different site. The identifier is a long string and can be obtained from the REGISTRAR service by searching for the user and the name of the API extension (capability), or as a parameter of the script that processes incoming connections. |
Name: Direction Code: Visibility condition: no Default: |
Select a direction from the list. Possible options:
|
Name: API extension name Code: Visibility condition: yes Default: — |
The name of the API extension through which the specified message is sent. This can be either a standard module or any connected system plug-in module that implements a software interface for sending messages of the specified type. |
Name: Message code Code: Visibility condition: yes Default: — |
The code of the message sent through the specified API extension. Inserted as the first element of a JSON array representing a message in the websocket protocol. Depending on how this particular message code is implemented in the API extension, an asynchronous message that does not require a response or a synchronous request may be sent. In this case, when you select the option to wait for delivery/response, it becomes possible to receive data from the remote system along with the response. |
Name: Message body Code: Visibility condition: yes Default: — |
Message body. Must conform to JSON format unless otherwise specified by a specific API extension. |
Name: Wait for delivery/response Code: Visibility condition: yes Default: No |
Switch for synchronous waiting mode for message delivery to the recipient’s application. If the selected message code within the API extension is a request, then enabling the mode involves receiving a response and storing it in the specified variable. |
Name: Path to file Code: Visibility condition: yes Default: — |
Special file path accessible to the script engine. Used for the operation of placing a file on a web server. |
Name: Action Code: Visibility condition: yes Default: Get a list of files |
Select an action from the list as part of a file exchange operation with the temporary directory of the session on the web server serving the specified connection (websocktemp category). Possible options:
Used for file operation with category websocktemp. |
Name: Path to file
Code: Default: — |
Special file path accessible to the script engine. Used for file operation with category websocktemp. |
Name: File name Code: Visibility condition: yes Default: — |
File name for performing file exchange operations with a temporary directory on the connection web server within the websocktemp category. Used for file operation with category websocktemp. |
Name: Time, s Code: Visibility condition: yes Default: — |
Timeout for waiting for message delivery, in seconds. |
Name: Result into variable Code: Visibility condition: yes Default: — |
Variable for storing the contents of the response to a sent request, if the delivery/response wait mode is selected and the selected message code is implemented in the specified API extension as a request request format. |
Name: Error in variable Code: Visibility condition: no Default: — |
Variable for storing the error. |
Name: Transition Code: Visibility condition: no Default: — |
The component to which control is transferred if the operation completes successfully. |
Name: Transition, time
Code: Default: — |
The component to which control is transferred if the timeout for waiting for message delivery expires. |
Name: Transition, error Code: Visibility condition: no Default: — |
Component to which control is transferred in case of an error. |