Open topic with navigation

TIBCO Flogo® Connector for WebSockets 1.0.1

# Websocket Server Trigger

Websocket Server trigger acts as a server to WebSocket clients. You can use the Websocket Server trigger to handle messages from WebSocket clients over a WebSocket connection. You can map this received data as a flow input for further processing.

## Trigger Settings

Field | Required | Description
--- | --- | ---
Trigger Settings
Port | Yes | The port on which the trigger listens for requests. Default: 9998 You can change this to use another port that is open. Note: If the app has multiple triggers that require a port to be specified, specify a unique port number for each trigger. Two triggers in the same app cannot run on the same port.
Enable TLS | Yes | By default, it is set to False. If you set this field to True, you can create a secure endpoint by providing Server Key and CA or Server Certificate. CA or Server Certificate: A PEM encoded CA or self-signed server certificate file Server Key: A PEM encoded private key file You can use an application property for the Server Cert and Server Key fields. For more information, see the "App Properties" topic in the TIBCO Flogo® Enterprise documentation.
Handler Settings
URI Path | Yes | The resource path for the operation. By default, the path displayed here is the resource path you had entered when you created the flow. Use {} to configure path parameters. Example: `/users/{id}` This field can also be set by using an application property.
Mode | Yes | Selects one of the following modes from the drop-down list: Data: Use this mode to read data on the WebSocket connection. Data received from each reading, triggers a new flow. Trigger reads on the connection until the connection is closed by the client or there is any connection error. You can map the received data to flow input by using the content field on the Map to Flow Inputs tab. You can map the received connection to flow input by using the wsconnection field. Connection: Use this mode to provide the trigger output as the WebSocket connection. In this mode, each client request triggers a new flow and the connection is closed after the flow execution is completed. You can map the connection to a flow input by using the wsconnection field on the Map to Flow Inputs tab. In this mode, the content field is not available on the Map to Flow Inputs tab.
Message Format | Yes | Selects one of the following formats of the message body: String: String message. JSON: If JSON is selected, a text editor is provided to accept a JSON document.
Schema for JSON value | No | Schema for the received WebSocket message. The Schema for JSON value field is only available when the Message Format field is JSON. This is a free form text editor that accepts any valid JSON document. You can also specify an app-level schema by using the Use app level schema option.

Note: On the Endpoints tab, if you copy the Endpoint URL of the application containing WebSocket Server trigger, by default the URL has `https://`. To connect to this WebSocket server from a WebSocket client, in the URL, change `https://` to `wss://`
Note: If you are using a WebSocket client other than the Websocket Subscriber trigger or Websocket Client activity to connect to the Websocket Server trigger, the WebSocket client must ping the Websocket Server trigger periodically to keep the connection alive.

## Output Settings

The Output Settings tab has the following fields:

Field | Required | Description
--- | --- | ---
Path Params | No | The path parameters for the trigger.
Query Params | No | Query parameters to be appended to the path. To add the query parameters, click the Add row button and press Enter to save your changes. parameterName: Name of the query parameter type: The data type of the query parameter. Supported types are string, number, or boolean. repeating: Set to True if more than one value is expected for the query parameter. required: Set to True if query parameter is a required configuration. The trigger reports an error if no values are provided to the required query parameter.
Headers | No | HTTP request Header parameters for the trigger. To add the header parameter, click the Add row button and press Enter to save your changes. parameterName: Name of the header parameter. type: The data type of the header parameter. Supported types are string, number, or boolean. repeating: Set to True if more than one value is expected for the HTTP header. required: Set to True if header parameter is a required configuration. The trigger reports an error if no values are provided to the required header parameter.

## Map to Flow Inputs

This tab allows you to map the trigger output to flow input.

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO Flogo® Connector for WebSockets

Copyright © 2024. Cloud Software Group, Inc. All Rights Reserved.