This trigger provides your flogo application the ability to start a flow via TIBCO Cloud Messaging
flogo install github.com/jvanderl/flogo-components/trigger/tcmsub
Link for flogo web:
https://github.com/jvanderl/flogo-components/trigger/tcmsub
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 <jvanderl@tibco.com>",
"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
}
]
}
}
Setting | Description |
---|---|
url | The TIBCO Cloud Messaging URL (wss://nn.messaging.cloud.tibco.com/tcm/xxxxx/channel ) |
authkey | The TIBCO Cloud Messaging Authorization Key |
clientid | A unique client id used to identify the connection to TCM |
Output | Description |
---|---|
message | The message payload |
Setting | Description |
---|---|
destinationname | The identifier of the destination field (listen subject) |
destinationmatch | Destination value to match when listening to messages |
messagename | Name of the field that contains the message payload |
durable | Set to 'true' when using a durable subscription |
durablename | Name to use for durable subscription |
Triggers are configured via the triggers.json of your application. The following are some example configuration of the TCM Trigger.
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"
}
}
]
}