Giter VIP home page Giter VIP logo

edge-contrib's People

Contributors

pointlander avatar skothari-tibco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

edge-contrib's Issues

MQTT activity has uncaught empty result

Trying to publish messages with MQTT activity hangs after the first completion.

2020-01-28T16:54:20.010+0100	DEBUG	[flogo.activity.mqtt] -	Applying InputMapper
2020-01-28T16:54:20.010+0100	DEBUG	[flogo.activity.mqtt] -	Published Message: {"message":"Hello World"}
2020-01-28T16:54:20.010+0100	DEBUG	[flogo.activity.mqtt] -	Applying OutputMapper
2020-01-28T16:54:20.010+0100	DEBUG	[flogo.flow] -	Task 'mqtt_3' is done
2020-01-28T16:54:20.010+0100	DEBUG	[flogo.flow] -	Notifying flow that end task 'mqtt_3' is done
2020-01-28T16:54:20.010+0100	DEBUG	[flogo.flow] -	Checking if all tasks done or skipped
2020-01-28T16:54:20.010+0100	DEBUG	[flogo.flow] -	All tasks done or skipped
2020-01-28T16:54:20.010+0100	DEBUG	[flogo.flow] -	Flow Done
2020-01-28T16:54:20.010+0100	DEBUG	[flogo.flow] -	Done Executing flow instance [a008dc42525a066c4a0785dba93a6109] - Status: 500
2020-01-28T16:54:20.010+0100	INFO	[flogo.flow] -	Instance [a008dc42525a066c4a0785dba93a6109] Done
2020-01-28T16:54:20.010+0100	DEBUG	[flogo] -	Action-Worker-1: Received result: &runner.ActionResult{results:map[string]interface {}{}, err:error(nil)}
2020-01-28T16:54:20.010+0100	DEBUG	[flogo] -	Action-Worker-1: Completed Request
2020-01-28T16:54:20.010+0100	DEBUG	[flogo] -	Action 'github.com/project-flogo/flow' returned

Example Flow:

{
  "name": "Edge",
  "type": "flogo:app",
  "version": "0.0.1",
  "appModel": "1.1.0",
  "description": "Edge Metrics MQTT",
  "imports": [
    "github.com/project-flogo/contrib/activity/log",
    "github.com/project-flogo/edge-contrib/trigger/mqtt",
    "github.com/project-flogo/flow",
    "mqtt_1 github.com/project-flogo/edge-contrib/activity/mqtt"
  ],
  "triggers": [
    {
      "id": "receive_mqtt_message",
      "ref": "#mqtt",
      "name": "Receive MQTT Message",
      "description": "Simple MQTT Trigger",
      "settings": {
        "broker": "tcp://localhost:1883",
        "id": "mqtt_subscribe",
        "cleanSession": true
      },
      "handlers": [
        {
          "settings": {
            "topic": "test",
            "qos": 0
          },
          "action": {
            "ref": "#flow",
            "settings": {
              "flowURI": "res://flow:mqtt"
            },
            "input": {
              "message": "=$.message"
            }
          }
        }
      ]
    }
  ],
  "resources": [
    {
      "id": "flow:mqtt",
      "data": {
        "name": "MQTT",
        "description": "Reads MQTT device readings, and publishes to cloud VIA MQTT",
        "metadata": {
          "input": [
            {
              "name": "message",
              "type": "string"
            }
          ]
        },
        "tasks": [
          {
            "id": "log_2",
            "name": "Log",
            "description": "Logs a message",
            "activity": {
              "ref": "#log",
              "input": {
                "message": "=$flow.message",
                "addDetails": true
              }
            }
          },
          {
            "id": "mqtt_3",
            "name": "MQTT Activity",
            "description": "Send MQTT message",
            "activity": {
              "ref": "#mqtt_1",
              "input": {
                "message": "=$flow.message"
              },
              "settings": {
                "broker": "tcp://localhost:1883",
                "id": "flogo_publish",
                "qos": 0,
                "topic": "flogo",
                "retain": false,
                "cleanSession": true
              }
            }
          }
        ],
        "links": [
          {
            "from": "log_2",
            "to": "mqtt_3"
          }
        ]
      }
    }
  ]
}

mqtt trigger only outputs mqtt payload

as paho mqtt message defined:

type Message interface {
	Duplicate() bool
	Qos() byte
	Retained() bool
	Topic() string
	MessageID() uint16
	Payload() []byte
	Ack()
}

I think its better to output these fields too

topic is missing in Trigger Output list

Hi,

I am new to the flogo. Please forgive me if I make naive issue.

Observed
topic is listed as one of three output in the readme file of the MQTT trigger. (others are message, topic, topicParams)
I expect all three output parameters should be listed in the trigger configuration of flogo web. However, topic is missing and message and topicParams are there as below.
issue

How to reproduce

  • Ubuntu 18.04 in VirtualBox
  • Flogo v0.10.1 from docker
  • Local MQTT broker mosquito
  • Installed github.com/project-flogo/edge-contrib/trigger/mqtt
  • Add topic, message and topicParams as string type in Input Output
  • Add and configure the MQTT trigger, switch to Map to flow inputs tab. it shows the screenshot above.

Question
Maybe this is not mqtt trigger issue but a flogo web issue. Please let me know, I will create it there.

Thanks.

Cheers,
Paul

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.