If you want to configure the invocation of the GRAVITY application by having a client send a message to a TCP server, you need to select TRIGGERS from the main menu.
By selecting New…, you can add a new configuration for automatically triggering the GRAVITY application.
After selecting New…, you must choose the type of automatic invocation from the list.
If you choose the TCP server mechanism, select the SOCKET option from the list.
In the PROPERTIES section, you must also specify the GRAVITY application (project) that will be associated with the configured invocation from that point onward.
This type of trigger passes the data received by the TCP server to a project parameter. For this reason, at least one parameter must be defined in the project.
To complete the configuration, you must provide the data required for this type of trigger.
- TCP connection → definition of the connection to the TCP server.
- Message Type → the expected type of message sent by the client.
- text → text message
- binary → binary message
- Message end type → defines how the end of the message is identified.
- Const message length → a fixed-length message with the number of bytes specified in the Message length in bytes field.
- Symbol or text → specifies the end-of-message symbol in the End of message symbol field (text messages only).
- Length prefixed → the message contains a header that specifies the message length in bytes (binary messages only). The header size is defined in the Bytes in message field.
- Message to parameter → the process parameter to which the received message will be passed. The parameter type must match the message type.
The server is created by the GRAVITY software based on the selected definition.
The selected method applies both to messages received from the client and to messages sent back to the client.
If you want the system to send an email to specified recipients when a process error occurs, select the Send mail when error option.
If the project uses parameters, you will see them in the Parameters panel as a name–value list. By clicking the value, you can enter a default value for the trigger parameter.
The default value will be used if the trigger does not receive a value for this parameter from the invocation (for example, REST API, database, RabbitMQ, Socket, etc.), and it will be passed to the executed project.