wsmessage

package
v0.5.7-rc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2018 License: BSD-3-Clause Imports: 4 Imported by: 0

README


title: WebSocket Message weight: 4621

Send WebSocket message

This activity allows you to send a message to a WebSocket server.

Installation

Flogo Web

This activity comes out of the box with the Flogo Web UI

Flogo CLI

flogo add activity github.com/TIBCOSoftware/flogo-contrib/activity/sendwsmessage

Schema

Inputs and Outputs:

{
"input":[
    {
      "name": "Server",
      "type": "string",
      "value": ""
    },
    {
      "name": "Channel",
      "type": "string",
      "value": ""
    },
    {
      "name": "Destination",
      "type": "string",
      "value": ""
    },
    {
      "name": "Message",
      "type": "string",
      "value": ""
    },
    {
      "name": "Username",
      "type": "string",
      "value": ""
    },
    {
      "name": "Password",
      "type": "string",
      "value": ""
    }
  ],
  "output": [
    {
      "name": "output",
      "type": "string"
    }
  ]
}

Settings

Setting Required Description
Server False The WebSocket server to connect to (e.g. localhost:9191)
Channel False The channel to send the message to (e.g. /channel)
Destination False The destination to send the message to (e.g. sample)
Message False The message to send
Username False The username to connect to the WebSocket server (e.g. user)
Password False The password to connect to the WebSocket server (e.g. user)
output False A string with the result of the action

Configuration Examples

The below example sends a message Hello World

{
  "id": "wsmessage",
  "name": "Send WebSocket Message",
  "description": "This activity sends a message to a WebSocket enabled servers",
  "activity": {
    "ref": "github.com/TIBCOSoftware/flogo-contrib/activity/wsmessage",
    "input": {
      "Server": "localhost:9191",
      "Channel": "/channel",
      "Destination": "sample",
      "Message": "Hello World",
      "Username": "user",
      "Password": "passwd"
    }
  }
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewActivity

func NewActivity(metadata *activity.Metadata) activity.Activity

NewActivity creates a new WsMsgActivity

Types

type WsMsgActivity

type WsMsgActivity struct {
	// contains filtered or unexported fields
}

WsMsgActivity is a stub for your Activity implementation

func (*WsMsgActivity) Eval

func (a *WsMsgActivity) Eval(context activity.Context) (done bool, err error)

Eval implements activity.Activity.Eval - Sends a message to a WebSocket enabled server like TIBCO eFTL

func (*WsMsgActivity) Metadata

func (a *WsMsgActivity) Metadata() *activity.Metadata

Metadata implements activity.Activity.Metadata

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL