package
0.0.0-20200821104852-f76c6d292a95
Repository: https://github.com/jvanderl/flogo-components.git
Documentation: pkg.go.dev

# README

TCM Subscriber

This trigger provides your flogo application the ability to start a flow via TIBCO Cloud Messaging

Installation

flogo install github.com/jvanderl/flogo-components/trigger/tcmsub

Link for flogo web:

https://github.com/jvanderl/flogo-components/trigger/tcmsub

Schema

Settings, Outputs and Endpoint:

{
  "name": "tcmsub",
  "type": "flogo:trigger",
  "ref": "github.com/jvanderl/flogo-components/trigger/tcmsub",
  "version": "0.0.1",
  "title": "Receive TCM Message",
  "description": "TCM Subscriber",
  "author": "Jan van der Lugt <[email protected]>",
  "homepage": "https://github.com/jvanderl/flogo-components/tree/master/trigger/tcmsub",
  "settings":[
    {
      "name": "url",
      "type": "string"
    },
    {
      "name": "authkey",
      "type": "string"
    },
    {
      "name": "clientid",
      "type": "string"
    }
  ],
  "output": [
    {
      "name": "message",
      "type": "string"
    }
  ],
  "handler": {
    "settings": [
      {
        "name": "destinationname",
        "type": "string"
      },
      {
        "name": "destinationmatch",
        "type": "string"
      },
      {
        "name": "messagename",
        "type": "string"
      },
      {
        "name": "durable",
        "type": "boolean",
        "required" : true
      },
      {
        "name": "durablename",
        "type": "string",
        "required" : false
      }
    ]
  }
}

Settings

SettingDescription
urlThe TIBCO Cloud Messaging URL (wss://nn.messaging.cloud.tibco.com/tcm/xxxxx/channel )
authkeyThe TIBCO Cloud Messaging Authorization Key
clientidA unique client id used to identify the connection to TCM

Ouputs

OutputDescription
messageThe message payload

Handlers

SettingDescription
destinationnameThe identifier of the destination field (listen subject)
destinationmatchDestination value to match when listening to messages
messagenameName of the field that contains the message payload
durableSet to 'true' when using a durable subscription
durablenameName to use for durable subscription

Example Configurations

Triggers are configured via the triggers.json of your application. The following are some example configuration of the TCM Trigger.

Start a flow

Configure the Trigger to start "testFlow". So in this case the "endpoints" "settings" "destination" is "flogo" will start "testFlow" flow when a message arrives on a destination called "flogo" in this case.

{
  "name": "tcmsub",
  "settings": {
    "url": "wss://nn.messaging.cloud.tibco.com/tcm/xxxxx/channel",
    "clientid": "flogo-subscriber",
    "authkey": "XYZXYZXYZXYZXYZXYZ"
  },
  "handlers": [
    {
      "actionId": "local://testFlow",
      "settings": {
        "destinationname": "demo_tcm",
        "destinationmatch": "*",
        "messagename": "demo_tcm",
        "dureable": "false"
      }
    }
  ]
}