Giter VIP home page Giter VIP logo

tibcosoftware / flogo Goto Github PK

View Code? Open in Web Editor NEW
2.4K 152.0 291.0 33.21 MB

Project Flogo is an open source ecosystem of opinionated event-driven capabilities to simplify building efficient & modern serverless functions, microservices & edge apps.

Home Page: http://flogo.io

License: BSD 3-Clause "New" or "Revised" License

HTML 28.13% CSS 52.17% JavaScript 4.44% Shell 6.82% Makefile 0.28% Go 8.15%
flogo iot integration golang edge microservices serverless lambda aws-lambda tensorflow

flogo's Introduction

Project Flogo is an Open Source ecosystem for event-driven apps

Ecosystem | Repos | Core | Flows | Streams | Flogo Rules | Go Developers | When to use Flogo | Contributing | License


Project Flogo is an ultra-light, Go-based open source ecosystem for building event-driven apps. Event-driven, you say? Yup, the notion of triggers and actions are leveraged to process incoming events. An action, a common interface, exposes key capabilities such as application integration, stream processing, etc.


  • App = Trigger(s) + Actions[&Activities]
  • Triggers
    • receive data from external sources.
    • are managed by a configurable threading model
    • have a common interface enabling anyone to build a Flogo trigger.
  • Handlers
    • dispatch events to actions
  • Actions
    • process events in a manner suitable with the implementation
    • have a common interface enabling opinionated event processing capabilities

Project Flogo Ecosystem

All capabilities within the Flogo Ecosystem have a few things in common, they all process events (in a manner suitable for the specific purpose) and they all implement the action interface exposed by Flogo Core.

Some of the key highlights include:

🎈 Ultra-light 20x-50x lighter than Java or Node.js
⚡️ Event-driven Powerful event-driven programming model based on triggers and actions
⚙️ Common core a single, common core enables reuse and flexibility across all eventing constructs
✏️ Golang based Written entirely in Golang for efficiency
💪 Deployment flexibility Deploy as ultra-lightweight serverless functions, containers or static binaries on IoT edge devices
🧠 Native machine learning Purpose built activity for TensorFlow SavedModel inferencing
😍 100% Open Source for your dev & hacking pleasure

  • Integration Flows Application Integration process engine with conditional branching and a visual development environment
  • Stream Processing a simple pipeline-based stream processing action with event joining capabilities across multiple triggers & aggregation over time windows
  • Contextual Decisioning Declarative Rules for Real-time Contextual Decisions
  • Microgateway Microgateway pattern for conditional, content-based routing, JWT validation, rate limiting, circuit breaking and other common patterns

The concept is simple, an event is just that, an event, how it’s processed is what differs. Flogo Core eases the burden by enabling a common set of functionality, such as:

  • threading
  • logging
  • data type coercion
  • data mapping
  • tracing & monitoring hooks

While also exposing a common set of contributions via activities and triggers. For example, all available triggers can be leveraged to dispatch events to any action implementation, that is, flows for application integration, streams for stream processing, rules for contextual rule processing, etc.

Flogo Repos

Project Flogo consists of the following sub-projects available as separate repos under a seperated GitHub Org:

Flogo Core

Flogo Core is an event-driven app framework used to develop apps for the cloud & IoT edge. It can also be thought of as a lightweight app kernel used by open source & commercial solutions.

Flogo Core provides the following key benefits:

Action chaining enables communication between one or more capabilities in a single, sub 10MB binary!
🏗 Common contribution model build activities and triggers that can be leveraged by all capabilities
🔨 Extensible easily extend the capabilities available by building your own action using the common interfaces

Flogo Core Contribution Model

Flogo Core exposes three principal contribution interfaces that enable developers to build common capabilities and functionality. These contribution interfaces include:

  • Trigger Interface a common interface for building event-consumers that dispatch events to one or more actions. The Kafka subscriber is an example of a trigger.
  • Activity Interface a common interface for exposing common application logic in a reusable manner. Think of this as a function, such as write to database, publish to Kafka, etc that can be used by all Flogo apps.
  • Action Interface a common interface for processing events. Actions contain the specific capability logic, such as integration, stream processing, rule processing, etc. Actions have a great deal of flexibility in how they’re developed and how developers leverage actions within their overall applications. For example, flows and streams expose JSON-based DSLs & Go APIs for maximum developer flexibility.

Flogo Flows

Flogo Flows provides application integration capabilities and includes the following key highlights.

🌈 Painless development Visual modeler with step-back debugging capabilities & elegant DSL
⚙️ Ultra-light process engine for conditional flow control

Getting Started

We've made getting started with Flogo Flows as easy as possible. The current set of tooling is designed for:

  • Serverless function developers
  • Cloud-native microservices developers
  • IoT Solutions developers
  • Go Developers

Zero-code Developers

If your background is in or you prefer to develop your apps using zero-coding environments, then read on, because we’ve got something special for you.

Flows Web UI is available via Docker Hub or Flogo.io. The Docker image contains the Flows Web UI along with all required components to begin developing, testing and building deployable artifacts right from your web browser.

To report any issues with the Issue tracker on this project.

Flogo Web In Action

Flogo Streams

Edge devices have the potential for producing millions or even billions of events at rapid intervals, often times the events on their own are meaningless, hence the need to provide basic streaming operations against the slew of events.

A native streaming action as part of the Project Flogo Ecosystem accomplishes the following primary objectives:

  • Enables apps to implement basic streaming constructs in a simple pipeline fashion
  • Provides non-persistent state for streaming operations
    • Streams are persisted in memory until the end of the pipeline
  • Serves as a pre-process pipeline for raw data to perform basic mathematical and logical operations. Ideal for feeding ML models

Some of the key highlights include:

😀 Simple pipeline construct enables a clean, easy way of dealing with streams of data
Stream aggregation across streams using time or event tumbling & sliding windows
🙌 Join streams from multiple event sources
🌪 Filter out the noise with stream filtering capabilities

Getting Started

We’ve made building powerful streaming pipelines as easy as possible. Develop your pipelines using:

  • A simple, clean JSON-based DSL
  • Golang API

See the sample below of an aggregation pipeline (for brevity, the triggers and metadata of the resource has been omitted). Also don’t forget to check out the examples in the project-flogo/stream repo.

  "stages": [
    {
      "ref": "github.com/project-flogo/stream/activity/aggregate",
      "settings": {
        "function": "sum",
        "windowType": "timeTumbling",
        "windowSize": "5000"
      },
      "input": {
        "value": "=$.input"
      }
    },
    {
      "ref": "github.com/project-flogo/contrib/activity/log",
      "input": {
        "message": "=$.result"
      }
    }
  ]

Flogo Rules

Processing Events in real-time to determine next best action is an important function of Event driven applications. With the vast amount of events that are generated from different sources, making sense of the information in a given context can be immensely valuable.

Flogo Rules simplifies the complexity involved with real-time contextual decisions.

Flogo Rules supports

  • Declarative Rules to define conditional logic and trigger result rules
  • Joins/Correlations across multiple Event sources
  • Ability to define Rule Priorities
  • Timer Events; Configurable TTL (time to live) -1 - no expiry, 0 - event expiry set to end of run to completion cycle.
  • Forward chaining for Inferencing

The CLI

The CLI is used to build all applications that leverage the JSON-based DSL. If you’re using the Go API to build your apps, feel free to just go build your stuff without the flogo CLI.

Getting started with the CLI couldn't be any easier (refer to Flogo CLI repo for detail instructions and dependencies):

  • Install the CLI
go install github.com/project-flogo/cli/...@latest
  • Create & build your app

  • flogo the core CLI for creating and building your applications
  • flogogen a scaffolding tool to begin building your Flogo contributions (activities, triggers & actions)

If you're interested in building your own contribution(s), refer to the Flogo Documentation or join us on the project-flogo/Lobby Gitter Channel.

Golang API

Are you the kind of person who would rather code, but would love to leverage the capabilities of the Flogo Ecosystem? Makes total sense, we just ❤️ to code also! We’ve exposed a number of Go APIs for leveraging the various action types, activities and triggers. Getting started is pretty easy, just follow the steps below.

  • Create your new project dir and init your module
mkdir test
cd test
go mod init example.com/m
go get github.com/project-flogo/core
  • Optionally, if you're using any of the Flogo contributions, don't forget to get that repo, as well
go get github.com/project-flogo/contrib
  • Open up your favorite IDE or txt editor and start coding!
package main

import (
	"context"
	"fmt"

	"github.com/project-flogo/contrib/activity/log"
	"github.com/project-flogo/contrib/trigger/rest"
	"github.com/project-flogo/core/activity"
	"github.com/project-flogo/core/api"
	"github.com/project-flogo/core/data/coerce"
	"github.com/project-flogo/core/engine"
)

func main() {

	app := myApp()

	e, err := api.NewEngine(app)

	if err != nil {
		fmt.Println("Error:", err)
		return
	}

	engine.RunEngine(e)
}

func myApp() *api.App {
	app := api.NewApp()

	trg := app.NewTrigger(&rest.Trigger{}, &rest.Settings{Port: 8080})
	h, _ := trg.NewHandler(&rest.HandlerSettings{Method: "GET", Path: "/blah/:num"})
	h.NewAction(RunActivities)

	//store in map to avoid activity instance recreation
	logAct, _ := api.NewActivity(&log.Activity{})
	activities = map[string]activity.Activity{"log": logAct}

	return app
}

var activities map[string]activity.Activity

func RunActivities(ctx context.Context, inputs map[string]interface{}) (map[string]interface{}, error) {

	trgOut := &rest.Output{}
	trgOut.FromMap(inputs)

	msg, _ := coerce.ToString(trgOut.PathParams)
	_, err := api.EvalActivity(activities["log"], &log.Input{Message: msg})
	if err != nil {
		return nil, err
	}

	response := make(map[string]interface{})

	response["id"] = "123"
	response["amount"] = "1"
	response["balance"] = "500"
	response["currency"] = "USD"

	reply := &rest.Reply{Code: 200, Data: response}
	return reply.ToMap(), nil
}
  • Don't forget to tidy your dependencies
go mod tidy
  • Before we can build the app, let's generate the metadata for the triggers
go generate
  • Build the app
go build

When to use Flogo

You’ll look to leverage Flogo if you’re a dev & sick of building all the messy stuff that comes along with coding production apps. Such as connectivity to event-driven messaging platforms, datastores, SaaS apps, etc & want to deploy to a wide range of targets, such as

  • serverless compute
  • IoT edge devices
  • containers

The broader Flogo ecosystem exposes an opinionated perspective on building event-driven apps. If you’re looking to process events in any of the following ways, then read on because the Project Flogo Ecosystem is for you!

  • long running processes with flow-control support geared toward application integration
  • consuming and manipulating large streams of events via a pipeline to act as a pre-processor for time-series data to serve things like machine learning models or to derive simple conclustions via data aggregation
  • contextual, declarative rules for real-time decisioning

In short...

Flogo is... Flogo is not...
an ecosystem of opinionated, event-driven capabilities a front-end web app or analytics framework
a Go lib to increase dev productivity an IoT platform

Contributing

Want to contribute to Project Flogo? We've made it easy, all you need to do is fork the repository you intend to contribute to, make your changes and create a Pull Request! Once the pull request has been created, you'll be prompted to sign the CLA (Contributor License Agreement) online.

Not sure where to start? No problem, here are a few suggestions:

  • flogo-contrib: This repository contains all of the standard contributions, such as activities, triggers, etc. Perhaps there is something missing? Create a new activity or trigger or fix a bug in an existing activity or trigger. Don't forget to check all of the other repositores in the project-flogo org on GitHub, as some contributions are large enough to have their own repo.
  • Browse all of the [Project Flogo repositories] and look for issues tagged kind/help-wanted or good first issue

If you have any questions, feel free to post an issue and tag it as a question, email [email protected] or chat with the team and community:

  • The project-flogo/Lobby Gitter channel should be used for general discussions, start here for all things Flogo!
  • The project-flogo/developers Gitter channel should be used for developer/contributor focused conversations.

For additional details, refer to the Contribution Guidelines.

License

Project Flogo is licensed under a BSD-style license. Refer to LICENSE for license text.

Usage Guidelines

We’re excited that you’re using Project Flogo to power your project(s). Please adhere to the usage guidelines when referencing the use of Project Flogo within your project(s) and don't forget to let others know you're using Project Flogo by proudly displaying one of the following badges or the Flynn logo, found in the branding folder of this project.

flogo's People

Contributors

abramvandergeest avatar anborg avatar ayh20 avatar cdmadrigal avatar dhunt12 avatar eswarabhi avatar fcastill avatar ganitagya avatar haarchri avatar isteerapps avatar jgrotex avatar lixingwang avatar mellistibco avatar mmussett avatar odidev avatar pdhar-tibco avatar philippegabert avatar raji-narayanan avatar ramgrandhi avatar retgits avatar rkozhikk avatar shalinigovindanayak avatar torresashjian avatar tuurleyck avatar vboddeboina avatar vijaynalawade avatar vishwasrao avatar vnalawad-tibco avatar wkarasz avatar zhili-tibco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flogo's Issues

Flow Reply Handler

Add the ability to use a "Reply Handler" in order to reply to an event from a Trigger

Unable to install custom activity using flogo WebUI

Hi Team,

I have successfully created the HelloWorld activity, i.e. go test returns success.
But when I try to install the activity from Flogo WebUi, I get "install fail" message and the cli shows the below error:

[log] Install Activities
[ 'github.com/Ganitagya/Custom_flogo_activity/tree/master/First/HelloWorld' ]
[log] adding activities to test engine...
2017-08-16T09:44:29.087Z - error:  Error: [error] Encounter error to stop test engine.
    at Object.installActivities (/tmp/flogo-web/build/server/api/activities/index.js:131:13)
    at next (native)
    at onFulfilled (/tmp/flogo-web/build/server/node_modules/co/index.js:65:19)
    at process._tickCallback (internal/process/next_tick.js:103:7)

When I try to use the cli to install the activity, I get the below error:

username HelloWorld $ flogo install  github.com/Ganitagya/Custom_flogo_activity/tree/master/First/HelloWorld
FATAL: command "fetch" failed: GetFileAttributesEx C:\Users\username\AppData\Local\Temp\gb-vendor-022114826\tree\master\First\HelloWorld: The system cannot find the path specified.
FATAL: command "vendor" failed: exit status 1
FATAL: command "install" failed: exit status 1

I am using the above commands after updating the flogo cli:
go get -u github.com/TIBCOSoftware/flogo-cli/...

is the flogo-web supposed to be open source at some point ?

Thank you for your great and amazing work!

There seems to be a missing piece in the puzzle in regards to the webui. Is this something on the radar ? Because building on flogo without the infrastructure to create the flow graph from a ui becomes very cumbersome.

Simplify transformation user experience

The transformation user experience has to be simplified for end users by:

  • Hiding unnecessary JSON details in the middle column
  • Providing a tabular representation of the map function

aws_iot sample

Hi,
Did anyone try executing the aws iot sample recently?

As per readme,command to mount things folder is as below:
docker run -it -p 3303:3303 -v ${thingsFolderPath}:/tmp/flogo-web/build/server/test-engine/bin/things flogo/flogo-web

On my machine, "/Users/anshul/Downloads/flogo" dir contains things dir with root-CA.pem.crt & a "flogo" dir with device.pem.crt & device.pem.key.
I am running below cmd to start docker container:
docker run -it -p 3303:3303 --name testflogo -v /Users/anshul/Downloads/flogo:/tmp/flogo-web/build/server/test-engine/bin/things flogo/flogo-docker eula-accept

I am getting below error:

Error evaluating activity 'Update'[github-com-tibco-software-flogo-contrib-activity-awsiot] - open things/flogo/device.pem.crt: no such file or directory

What am I missing? Is the mount directory inside the container i.e.

/tmp/flogo-web/build/server/test-engine/bin/things

still same or has changed recently?

Unknown command add

Hi again, now onto creating an app, via this example:

https://tibcosoftware.github.io/flogo/iot/how-to/

So I just created the app via flogo create myIotApp "somewhere" - in this case in my $home but that part worked as expected. But the first command to add the activities that are described in the reqcounter.json file already fails:

d061237:~/myIotApp>$ flogo add activity github.com/TIBCOSoftware/flogo-contrib/activity/log
FATAL: unknown command "add"

Any idea?

Documentation: glossary, APIs & JSON schemas

I opened this issue in the main flogo repository as the documentation sits here but if you consider it belongs to another repository such as flogo-contrib I will move it.

I will list a couple things that I think that are missing from the documentation and that would help to build an ecosystem around Flogo:

  • Glossary: a definition of each term so that a new developer knows what he should develop and to get a basic understanding of the engine. I believe that you do not trully understand something in deep until you are able to explain it in an easy way to someone who doesn't know anything about it.
    • Trigger
    • Mappings as described in the first Flogo Happy Hour
    • Action
    • Flow
    • Activity
    • Task
    • Runner
    • ...
  • API: a full definition of methods that could be needed by a developer to make a new contribution to the project.
    • Trigger
      • trigger.Factory
        • NewFactory(*trigger.Metadata) trigger.Factory
        • MyFactory.New(*trigger.Config) trigger.Trigger
      • trigger.Trigger
        • MyTrigger.Metadata() *trigger.Metadata
        • MyTrigger.Init(action.Runner)
        • MyTrigger.Start() error
        • MyTrigger.Stop() error
    • Activity
      • activity.Activity
        • NewActivity(*activity.Metadata) activity.Activity
        • MyActivity.Metadata() *activity.Metadata
        • MyActivity.Eval(activity.Context) (bool, error)
    • ...
  • JSON: defining the JSON schemas for the different files. I find that the official JSON schemas are not very clear, an example with a short description including information about requred vs optional fields and types may be more clear.
    • Applications
      • name
      • type
      • version
      • description
      • properties
        • ...
      • triggers
        • name
        • id
        • ref
        • settings
          • ...
        • output
          • ...
        • handlers
          • ...
        • outputs deprecated
      • actions
        • ...
    • Triggers
      • name
      • type
      • ref
      • version
      • title
      • description
      • author
      • settings
      • outputs
      • handler
      • ...
    • Activities
      • name
      • type
      • ref
      • version
      • title
      • description
      • author
      • inputs
      • outputs
      • ...

Some of the info in the above list may be outdated as it has been extracted from examples and the source code.

Provide a packaging mechanism for extensions like activities & triggers

Installing individual extensions activities & triggers is onerous in real-world usecases. Several Flogo extension are logically related to each other include MQTT (Pub activity, OnMessage Trigger, Subscribe), HTTP (Request Trigger, Send Request, etc.). In addition, activities and triggers could also be physically related to each other (e.g.: AN HTTP Reply Activity that replies to a request received on an HTTP Trigger)

Flogo should provide a packaging & distribution mechanism for collections of extensions/add-ons like Flogo activities and triggers. This is similar to "plugins" in BusinessWorks. Users can pick one or more such extension or add-on packs that extend the out of the box functionality.

Types of Flogo extensions/add-ons:

  • Flow Triggers in Golang
  • Flow Activities in Golang
  • [Planned in the future] Sensors/SmartTriggers in C/C++/ASM
  • [Planned in the future] Actuators/SmartActuators in C/C++/ASM

Developers can build these add-ons from scratch or fork already published add-ons (as source code) to build new derivatives.

Out of scope:

  • Binary-only extension distribution

While importing the flogo.jsons, the mapping of the params for rest activity is not being displayed in the Flogo UI.

  1. import the attached flogo.json in app.
  2. Check the params mapping in the two rest activities, the transformed values are not being displayed.
{
	"name": "TempCheck",
	"type": "flogo:app",
	"version": "0.0.1",
	"description": "",
	"triggers": [{
		"name": "Receive HTTP Message",
		"ref": "github.com/TIBCOSoftware/flogo-contrib/trigger/rest",
		"description": "Simple REST Trigger",
		"settings": {
			"port": "8080"
		},
		"id": "receive_http_message",
		"handlers": [{
			"settings": {
				"method": "GET",
				"path": "/temperature",
				"autoIdReply": "true",
				"useReplyHandler": "true"
			},
			"actionId": "temp"
		}]
	}],
	"actions": [{
		"name": "Temp",
		"data": {
			"flow": {
				"type": 1,
				"attributes": [],
				"rootTask": {
					"id": 1,
					"type": 1,
					"tasks": [{
						"id": 2,
						"name": "Log Message",
						"description": "Simple Log Activity",
						"type": 1,
						"activityType": "github-com-tibco-software-flogo-contrib-activity-log",
						"activityRef": "github.com/TIBCOSoftware/flogo-contrib/activity/log",
						"attributes": [{
							"name": "message",
							"value": null,
							"required": false,
							"type": "string"
						}, {
							"name": "flowInfo",
							"value": "true",
							"required": false,
							"type": "boolean"
						}, {
							"name": "addToFlow",
							"value": "true",
							"required": false,
							"type": "boolean"
						}],
						"inputMappings": [{
							"type": 1,
							"value": "{T.queryParams}.city",
							"mapTo": "message"
						}]
					}, {
						"id": 3,
						"name": "Invoke REST Service",
						"description": "Simple REST Activity",
						"type": 1,
						"activityType": "github-com-tibco-software-flogo-contrib-activity-rest",
						"activityRef": "github.com/TIBCOSoftware/flogo-contrib/activity/rest",
						"attributes": [{
							"name": "method",
							"value": "GET",
							"required": true,
							"type": "string"
						}, {
							"name": "uri",
							"value": "http://api.openweathermap.org/data/2.5/weather",
							"required": true,
							"type": "string"
						}, {
							"name": "pathParams",
							"value": null,
							"required": false,
							"type": "params"
						}, {
							"name": "queryParams",
							"value": {
								"APPID": "6231d08ce5469ffd47f0cd92f4b9af3e"
							},
							"required": false,
							"type": "params"
						}, {
							"name": "content",
							"value": null,
							"required": false,
							"type": "any"
						}],
						"inputMappings": [{
							"type": 1,
							"value": "{T.queryParams}.city",
							"mapTo": "queryParams.q"
						}]
					}, {
						"id": 4,
						"name": "Log Message (2)",
						"description": "Simple Log Activity",
						"type": 1,
						"activityType": "github-com-tibco-software-flogo-contrib-activity-log",
						"activityRef": "github.com/TIBCOSoftware/flogo-contrib/activity/log",
						"attributes": [{
							"name": "message",
							"value": "",
							"required": false,
							"type": "string"
						}, {
							"name": "flowInfo",
							"value": "true",
							"required": false,
							"type": "boolean"
						}, {
							"name": "addToFlow",
							"value": "true",
							"required": false,
							"type": "boolean"
						}],
						"inputMappings": [{
							"type": 1,
							"value": "{A3.result}.main.temp",
							"mapTo": "message"
						}]
					}, {
						"id": 5,
						"name": "Log Message (3)",
						"description": "Simple Log Activity",
						"type": 1,
						"activityType": "github-com-tibco-software-flogo-contrib-activity-log",
						"activityRef": "github.com/TIBCOSoftware/flogo-contrib/activity/log",
						"attributes": [{
							"name": "message",
							"value": "Too Hot",
							"required": false,
							"type": "string"
						}, {
							"name": "flowInfo",
							"value": "true",
							"required": false,
							"type": "boolean"
						}, {
							"name": "addToFlow",
							"value": "true",
							"required": false,
							"type": "boolean"
						}]
					}, {
						"id": 6,
						"name": "Invoke REST Service (2)",
						"description": "Simple REST Activity",
						"type": 1,
						"activityType": "github-com-tibco-software-flogo-contrib-activity-rest",
						"activityRef": "github.com/TIBCOSoftware/flogo-contrib/activity/rest",
						"attributes": [{
							"name": "method",
							"value": "GET",
							"required": true,
							"type": "string"
						}, {
							"name": "uri",
							"value": "http://api.openweathermap.org/data/2.5/weather",
							"required": true,
							"type": "string"
						}, {
							"name": "pathParams",
							"value": null,
							"required": false,
							"type": "params"
						}, {
							"name": "queryParams",
							"value": {
								"APPID": "6231d08ce5469ffd47f0cd92f4b9af3e"
							},
							"required": false,
							"type": "params"
						}, {
							"name": "content",
							"value": null,
							"required": false,
							"type": "any"
						}],
						"inputMappings": [{
								"type": 1,
								"value": "{T.queryParams}.lat",
								"mapTo": "queryParams.lat"
							},
							{
								"type": 1,
								"value": "{T.queryParams}.lon",
								"mapTo": "queryParams.lon"
							}]
					}, {
						"id": 7,
						"name": "Log Message (5)",
						"description": "Simple Log Activity",
						"type": 1,
						"activityType": "github-com-tibco-software-flogo-contrib-activity-log",
						"activityRef": "github.com/TIBCOSoftware/flogo-contrib/activity/log",
						"attributes": [{
							"name": "message",
							"value": null,
							"required": false,
							"type": "string"
						}, {
							"name": "flowInfo",
							"value": "true",
							"required": false,
							"type": "boolean"
						}, {
							"name": "addToFlow",
							"value": "true",
							"required": false,
							"type": "boolean"
						}],
						"inputMappings": [{
							"type": 1,
							"value": "{A6.result}.main.humidity",
							"mapTo": "message"
						}]
					}, {
						"id": 8,
						"name": "Log Message (4)",
						"description": "Simple Log Activity",
						"type": 1,
						"activityType": "github-com-tibco-software-flogo-contrib-activity-log",
						"activityRef": "github.com/TIBCOSoftware/flogo-contrib/activity/log",
						"attributes": [{
							"name": "message",
							"value": "Its Normal,Enjoy your day!!",
							"required": false,
							"type": "string"
						}, {
							"name": "flowInfo",
							"value": "true",
							"required": false,
							"type": "boolean"
						}, {
							"name": "addToFlow",
							"value": "true",
							"required": false,
							"type": "boolean"
						}]
					}],
					"links": [{
						"id": 1,
						"from": 2,
						"to": 3,
						"type": 0
					}, {
						"id": 2,
						"from": 3,
						"to": 4,
						"type": 0
					}, {
						"id": 3,
						"from": 4,
						"to": 5,
						"type": 1,
						"value": "${A3.result}.main.temp>305"
					}, {
						"id": 4,
						"from": 5,
						"to": 6,
						"type": 0
					}, {
						"id": 5,
						"from": 6,
						"to": 7,
						"type": 0
					}, {
						"id": 6,
						"from": 4,
						"to": 8,
						"type": 1,
						"value": "${A3.result}.main.temp<=305"
					}],
					"attributes": []
				}
			}
		},
		"id": "temp",
		"ref": "github.com/TIBCOSoftware/flogo-contrib/action/flow"
	}]
}

Issue pulling Flogo container from Docker

Hi I just installed the Docker Toolbox for Windows 7 successfully. But when I try to run following command I get an error. Any ideas what I could be doing wrong?

   docker run -it -p 3303:3303 flogo/flogo-docker:latest eula-accept

I'm getting this error:
$ docker run -it -p 3303:3303 flogo/flogo-docker eula-accept
Unable to find image 'flogo/flogo-docker:latest' locally
C:\Program Files\Docker Toolbox\docker.exe: Error response from daemon: Get http
s://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 10.0.2.3:
53: no such host.
See 'C:\Program Files\Docker Toolbox\docker.exe run --help'.

timer trigger failed with "panic: interface conversion: interface {} is nil, not string"

I exported project from flogo docker UI with timer (repeating=false) and log message(msg=hello world~~~~) as below(flogo.json) and execution failed with "panic: interface conversion: interface {} is nil, not string" in both Windows and Centos 7.

===== flogo.json ====
{
"name": "runonce",
"type": "flogo:app",
"version": "0.0.1",
"description": "",
"triggers": [
{
"name": "Timer",
"ref": "github.com/TIBCOSoftware/flogo-contrib/trigger/timer",
"description": "Simple Timer trigger",
"settings": {},
"id": "timer",
"handlers": [
{
"settings": {
"repeating": "false",
"notImmediate": null,
"startDate": null,
"hours": null,
"minutes": null,
"seconds": null
},
"actionId": "flow_1"
}
]
}
],
"actions": [
{
"name": "flow1",
"data": {
"flow": {
"type": 1,
"attributes": [],
"rootTask": {
"id": 1,
"type": 1,
"tasks": [
{
"id": 2,
"name": "Log Message",
"description": "Simple Log Activity",
"type": 1,
"activityType": "tibco-log",
"activityRef": "github.com/TIBCOSoftware/flogo-contrib/activity/log",
"attributes": [
{
"name": "message",
"value": "hello world ~~~~",
"required": false,
"type": "string"
},
{
"name": "flowInfo",
"value": "false",
"required": false,
"type": "boolean"
},
{
"name": "addToFlow",
"value": "false",
"required": false,
"type": "boolean"
}
]
}
],
"links": [],
"attributes": []
}
}
},
"id": "flow_1",
"ref": "github.com/TIBCOSoftware/flogo-contrib/action/flow"
}
]
}

==== error msg ===
D:\dev\go\src\github.com\lwlwlwlw\flogo-project\runonce\bin>runonce.exe
2017-10-23 19:37:24.178 DEBUG [engine] - Registering action factory: 'github.com/TIBCOSoftware/flogo-contrib/action/flow'
2017-10-23 19:37:24.190 DEBUG [engine] - Registering activity: 'github.com/TIBCOSoftware/flogo-contrib/activity/log'
2017-10-23 19:37:24.191 DEBUG [engine] - Registering trigger factory: 'github.com/TIBCOSoftware/flogo-contrib/trigger/timer'
2017-10-23 19:37:24.192 INFO [engine] - Engine: Starting...
2017/10/23 19:37:24 In init, id: 'timer', Metadata: '&{ID:github.com/TIBCOSoftware/flogo-contrib/trigger/timer Handler:0xc0420c0d20 Settings:map[] Output:map[params:0xc04206f950 content:0xc04206f9b0] Reply:map[]}', Config: '&{Name:Timer Id:timer Ref:github.com/TIBCOSoftware/flogo-contrib/trigger/timer Settings:map[] Output:map[] Handlers:[0xc042102090] Outputs:map[]}'
2017-10-23 19:37:24.193 DEBUG [engine] - Uncompressed flow with id 'flow_1' added
2017-10-23 19:37:24.194 DEBUG [engine] - ActionRunner Service: Starting...
2017-10-23 19:37:24.194 DEBUG [engine] - Starting worker with id '1'
2017-10-23 19:37:24.194 DEBUG [engine] - Starting worker with id '2'
2017-10-23 19:37:24.194 DEBUG [engine] - Starting worker with id '3'
2017-10-23 19:37:24.195 DEBUG [engine] - Starting worker with id '4'
2017-10-23 19:37:24.195 DEBUG [engine] - Starting worker with id '5'
2017-10-23 19:37:24.195 DEBUG [engine] - ActionRunner Service: Started
2017-10-23 19:37:24.196 INFO [engine] - Engine: Starting Services...
2017-10-23 19:37:24.196 INFO [engine] - Engine: Started Services
2017-10-23 19:37:24.196 DEBUG [engine] - Trigger [ 'timer' ]: Starting...
2017/10/23 19:37:24 Start
2017/10/23 19:37:24 Processing handlers
2017/10/23 19:37:24 Repeating: false
2017/10/23 19:37:24 Scheduling a run one time job
panic: interface conversion: interface {} is nil, not string

goroutine 1 [running]:
github.com/TIBCOSoftware/flogo-lib/core/trigger.(*HandlerConfig).GetSetting(...)
D:/dev/go/src/github.com/lwlwlwlw/flogo-project/runonce/vendor/src/github.com/TIBCOSoftware/flogo-lib/core/trigger/config.go:115
github.com/TIBCOSoftware/flogo-contrib/trigger/timer.getInitialStartInSeconds(0xc042102090, 0xc0420314a0)
D:/dev/go/src/github.com/lwlwlwlw/flogo-project/runonce/vendor/src/github.com/TIBCOSoftware/flogo-contrib/trigger/timer/timer.go:176 +0x122d
github.com/TIBCOSoftware/flogo-contrib/trigger/timer.(*TimerTrigger).scheduleOnce(0xc0421103c0, 0xc042102090)
D:/dev/go/src/github.com/lwlwlwlw/flogo-project/runonce/vendor/src/github.com/TIBCOSoftware/flogo-contrib/trigger/timer/timer.go:97 +0xac
github.com/TIBCOSoftware/flogo-contrib/trigger/timer.(*TimerTrigger).Start(0xc0421103c0, 0xf, 0xc0420313b0)
D:/dev/go/src/github.com/lwlwlwlw/flogo-project/runonce/vendor/src/github.com/TIBCOSoftware/flogo-contrib/trigger/timer/timer.go:65 +0x5a6
github.com/TIBCOSoftware/flogo-lib/util.StartManaged(0xc0420deec0, 0x13, 0x36a8680, 0xc0421103c0, 0xc0421103c0, 0xc0420deec0)
D:/dev/go/src/github.com/lwlwlwlw/flogo-project/runonce/vendor/src/github.com/TIBCOSoftware/flogo-lib/util/managed.go:62 +0xf6
github.com/TIBCOSoftware/flogo-lib/engine.(*EngineConfig).Start(0xc04206c550, 0xa1c380, 0xc04206c550)
D:/dev/go/src/github.com/lwlwlwlw/flogo-project/runonce/vendor/src/github.com/TIBCOSoftware/flogo-lib/engine/engine.go:143 +0x419
main.main()
D:/dev/go/src/github.com/lwlwlwlw/flogo-project/runonce/src/runonce/main.go:37 +0xac

1)Could not use condition branching using strings.2)When condition branching is used in flogo.json,the routing is not happening as specified.Irrespective of the given inputs, the latest branch is being selected always.

Issue 1:
We are not able to implement condition branching using strings. The given condition is not working.
"${T.pathParams}.id=='pet'"

{ "name": "condition string", "type": "flogo:app", "version": "0.0.1", "description": "", "triggers": [ { "name": "Receive HTTP Message", "ref": "github.com/rameshpolishetti/triggerhttpnew", "description": "Simple REST Trigger", "settings": { "port": "9096" }, "id": "receive_http_message", "handlers": [ { "settings": { "method": "GET", "path": "/test/:type", "autoIdReply": "true", "useReplyHandler": "true", "Condition": null }, "actionId": "check" } ] } ], "actions": [ { "name": "check", "data": { "flow": { "type": 1, "attributes": [], "rootTask": { "id": 1, "type": 1, "tasks": [ { "id": 2, "name": "Log Message", "description": "Simple Log Activity", "type": 1, "activityType": "tibco-log", "activityRef": "github.com/TIBCOSoftware/flogo-contrib/activity/log", "attributes": [ { "name": "message", "value": "", "required": false, "type": "string" }, { "name": "flowInfo", "value": "true", "required": false, "type": "boolean" }, { "name": "addToFlow", "value": "true", "required": false, "type": "boolean" } ], "inputMappings": [ { "type": 1, "value": "{T.pathParams}.type", "mapTo": "message" } ] }, { "id": 3, "name": "Log Message (2)", "description": "Simple Log Activity", "type": 1, "activityType": "tibco-log", "activityRef": "github.com/TIBCOSoftware/flogo-contrib/activity/log", "attributes": [ { "name": "message", "value": "pet", "required": false, "type": "string" }, { "name": "flowInfo", "value": "true", "required": false, "type": "boolean" }, { "name": "addToFlow", "value": "true", "required": false, "type": "boolean" } ] }, { "id": 4, "name": "Log Message (3)", "description": "Simple Log Activity", "type": 1, "activityType": "tibco-log", "activityRef": "github.com/TIBCOSoftware/flogo-contrib/activity/log", "attributes": [ { "name": "message", "value": "weather", "required": false, "type": "string" }, { "name": "flowInfo", "value": "true", "required": false, "type": "boolean" }, { "name": "addToFlow", "value": "true", "required": false, "type": "boolean" } ] } ], "links": [ { "id": 1, "from": 2, "to": 3, "type": 1, "value": "${T.pathParams}.type=='pet'" }, { "id": 2, "from": 2, "to": 4, "type": 1, "value": "${T.pathParams}.type=='weather'" } ], "attributes": [] } } }, "id": "check", "ref": "github.com/TIBCOSoftware/flogo-contrib/action/flow" } ] }

Issue 2:
Steps to produce:

  1. Create the flogo app using the attached flogo.json. Command: flogo create -f flogo.json condition
  2. Go to condition folder and build. Command:flogo build
  3. Go to bin folder and run the condition app.

Run the App with the two Urls:
For first branch: localhost:9096/test/10
For second branch: localhost:9096/test/43

The url for the first branch also redirects to the second branch.

{ "name": "flogo", "type": "flogo:app", "version": "0.0.1", "description": "", "triggers": [ { "name": "Receive HTTP Message", "ref": "github.com/rameshpolishetti/triggerhttpnew", "description": "Simple REST Trigger", "settings": { "port": "9096" }, "id": "receive_http_message", "handlers": [ { "settings": { "method": "GET", "path": "/test/:id", "autoIdReply": "true", "useReplyHandler": "true", "Condition": null }, "actionId": "condition" } ] } ], "actions": [ { "name": "condition", "data": { "flow": { "type": 1, "attributes": [], "rootTask": { "id": 1, "type": 1, "tasks": [ { "id": 2, "name": "Log Message", "description": "Simple Log Activity", "type": 1, "activityType": "tibco-log", "activityRef": "github.com/TIBCOSoftware/flogo-contrib/activity/log", "attributes": [ { "name": "message", "value": "", "required": false, "type": "string" }, { "name": "flowInfo", "value": "true", "required": false, "type": "boolean" }, { "name": "addToFlow", "value": "true", "required": false, "type": "boolean" } ], "inputMappings": [ { "type": 1, "value": "{T.pathParams}.id", "mapTo": "message" } ] }, { "id": 3, "name": "Log Message (2)", "description": "Simple Log Activity", "type": 1, "activityType": "tibco-log", "activityRef": "github.com/TIBCOSoftware/flogo-contrib/activity/log", "attributes": [ { "name": "message", "value": "pet", "required": false, "type": "string" }, { "name": "flowInfo", "value": "true", "required": false, "type": "boolean" }, { "name": "addToFlow", "value": "true", "required": false, "type": "boolean" } ] }, { "id": 4, "name": "Log Message (3)", "description": "Simple Log Activity", "type": 1, "activityType": "tibco-log", "activityRef": "github.com/TIBCOSoftware/flogo-contrib/activity/log", "attributes": [ { "name": "message", "value": "weather", "required": false, "type": "string" }, { "name": "flowInfo", "value": "true", "required": false, "type": "boolean" }, { "name": "addToFlow", "value": "true", "required": false, "type": "boolean" } ] }, { "id": 5, "name": "Invoke REST Service", "description": "Simple REST Activity", "type": 1, "activityType": "tibco-rest", "activityRef": "github.com/TIBCOSoftware/flogo-contrib/activity/rest", "attributes": [ { "name": "method", "value": "GET", "required": true, "type": "string" }, { "name": "uri", "value": "http://api.openweathermap.org/data/2.5/weather?APPID=6231d08ce5469ffd47f0cd92f4b9af3e&q=vizag", "required": true, "type": "string" }, { "name": "pathParams", "value": null, "required": false, "type": "params" }, { "name": "queryParams", "value": null, "required": false, "type": "params" }, { "name": "content", "value": null, "required": false, "type": "any" } ] }, { "id": 6, "name": "Log Message (4)", "description": "Simple Log Activity", "type": 1, "activityType": "tibco-log", "activityRef": "github.com/TIBCOSoftware/flogo-contrib/activity/log", "attributes": [ { "name": "message", "value": "", "required": false, "type": "string" }, { "name": "flowInfo", "value": "true", "required": false, "type": "boolean" }, { "name": "addToFlow", "value": "true", "required": false, "type": "boolean" } ], "inputMappings": [ { "type": 1, "value": "{A5.result}", "mapTo": "message" } ] } ], "links": [ { "id": 1, "from": 2, "to": 3, "type": 1, "value": "${T.pathParams}.id<15" }, { "id": 2, "from": 2, "to": 4, "type": 1, "value": "${T.pathParams}.id>15" }, { "id": 3, "from": 4, "to": 5, "type": 0 }, { "id": 4, "from": 5, "to": 6, "type": 0 } ], "attributes": [] } } }, "id": "condition", "ref": "github.com/TIBCOSoftware/flogo-contrib/action/flow" } ] }

Params of type Object not manipulated correctly by inputMappings/Context

I attached a flow json to reproduce the problem.
Running this flow, you will that the rest activity is sending the string "null" as the body, whereas it should send "{ "name": "my pet"}", which is set by the inputMappings settings.

2 notes:

  1. If you set 'content' as an attribute of the rest activity, the configured value is handled and passed correctly
  2. I modified the rest activity to set type of 'content' to 'string', and the value set by inputMappings is passed and handled correctly

Thanks,
Eric
testrest.json.zip

Flogo UI launch

Hi,

Flogo project looks amazing.
I am interested in UI part of Flogo.

I will be creating and contributing integrations for

  1. Scripting or function block. There are lots of native GO scripting interfaces available.
  2. With our recently purchased IoT Cloud and Edge platform ( Litmus Loop and LoopEdge ).

Goal is create seamless REST API based ingestion / run script / send it to cloud.

Thanks,
Mark

Create Custom Activity

Hi,

While creating a custom activity as described in Building your first activity, I ran the below command
flogogen activity HelloWorld

The "activity_test.go" thus created has below import statement:
"github.com/TIBCOSoftware/flogo-lib/flow/test"
which is not present in the master branch.

Because of this go test fails.

Can anyone please tell what changes has to be done in the activity_test.go file ?

Docker image using old version of go

I tried to create my first activity using a third party lib but it won't import to the docker image/UI due to:

Activity: https://github.com/jezrsmith/flogo-activities/whatlanggo

[log] Installation results
[1] { success: [], fail: [] }
[1] [log] Build flogo: "flogo build " compileOpts:
[1] [info] run command: flogo build
[1] [log] command exited with code 1: flogo build
[1] 2017-08-07T16:31:43.838Z - error: InternalServerError: # github.com/abadojack/whatlanggo
[1] detect.go:120: undefined: sort.SliceStable
[1] trigrams.go:31: undefined: sort.SliceStable
[1] FATAL: command "build" failed: exit status 2
[1] FATAL: command "build" failed: exit status 1
[1]
[1] at Object.module.exports.throw (/tmp/flogo-web/build/server/node_modules/koa/lib/context.js:89:23)
[1] at Object. (/tmp/flogo-web/build/server/api/error/index.js:41:19)
[1] at throw (native)
[1] at Object.dispatch (/tmp/flogo-web/build/server/node_modules/koa-router/lib/router.js:334:12)
[1] at throw (native)
[1] at Object.serve (/tmp/flogo-web/build/server/node_modules/koa-static/index.js:43:14)
[1] at throw (native)
[1] at Object.compress (/tmp/flogo-web/build/server/node_modules/koa-compress/index.js:42:12)
[1] at throw (native)
[1] at onRejected (/tmp/flogo-web/build/server/node_modules/co/index.js:81:24)

On closer inspection it appears this is because sort.SliceStable needs go version 1.8 or later.

Can we get the docker image updated - also is there a way for me to update the version of go on my docker?

flogo create -f flogo.json failed with FATAL

Can not create application from existing application definition file:

D:\tmp\flogo\ht>flogo create -f flogo.json
FATAL: command "create" failed: Cannot create project, directory 'D:\tmp\flogo\ht' already exists

========== flogo.json =============
{
"name": "myApp",
"type": "flogo:app",
"version": "0.0.1",
"description": "My flogo application description",
"triggers": [
{
"id": "my_rest_trigger",
"ref": "github.com/TIBCOSoftware/flogo-contrib/trigger/rest",
"settings": {
"port": "9233"
},
"handlers": [
{
"actionId": "my_simple_flow",
"settings": {
"method": "GET",
"path": "/test"
}
}
]
}
],
"actions": [
{
"id": "my_simple_flow",
"name": "my simple flow",
"ref": "github.com/TIBCOSoftware/flogo-contrib/action/flow",
"data": {
"flow": {
"name": "my simple flow",
"attributes": [],
"rootTask": {
"id": 1,
"type": 1,
"tasks": [
{
"id": 2,
"type": 1,
"activityRef": "github.com/TIBCOSoftware/flogo-contrib/activity/log",
"name": "log",
"attributes": [
{
"name": "message",
"value": "Simple Log",
"type": "string"
}
]
}
],
"links": [
]
}
}
}
}
]
}

Add actors into docs

Should define and add all actors that interact with flogo ecosystem into docs.

Please consider re-licensing under a true open source license

I love the fact that you consider Flogo as open source, but for people like me who spend much of their time dealing with open source licenses, the license on this package is problematic. (By way of background, I stumbled across this project today and my first thought was "Great, let me package this up for Fedora/RHEL/CentOS", but due the license, I can't.)

In short, the field of use restrictions in the license ("internal business use only") means that this isn't truly open source by the generally accepted guidelines (FSF, OSI, Debian Free Software Guidelines, Fedora Packaging Guidelines, etc.).

Would you please reconsider licensing this software under a more commonly accepted open source license, such as the MIT, Apache 2.0, or GPL licenses?

Flow app directory

Refering to the end of https://tibcosoftware.github.io/flogo/extensions-developer/create-activity/

I was a bit lost and started the docker container with my flogo ui and to my surprise, I discovered my HelloWorld app there. So was flogogen automatically installing the activity somehow? I would have prefered to do this manually but had no idea where my "flow directory" is - where is it? I assume in the docker container or is it linked to an outside volume?

1)Could not use condition branching using strings.2)When condition branching is used in flogo.json using integers,the routing is not happening as specified.Irrespective of the given inputs, the latest branch is being selected always.

Issue 1:
We are not able to implement condition branching using strings. The given condition is not working.
"${T.pathParams}.id=='pet'"

{ "name": "condition string", "type": "flogo:app", "version": "0.0.1", "description": "", "triggers": [ { "name": "Receive HTTP Message", "ref": "github.com/rameshpolishetti/triggerhttpnew", "description": "Simple REST Trigger", "settings": { "port": "9096" }, "id": "receive_http_message", "handlers": [ { "settings": { "method": "GET", "path": "/test/:type", "autoIdReply": "true", "useReplyHandler": "true", "Condition": null }, "actionId": "check" } ] } ], "actions": [ { "name": "check", "data": { "flow": { "type": 1, "attributes": [], "rootTask": { "id": 1, "type": 1, "tasks": [ { "id": 2, "name": "Log Message", "description": "Simple Log Activity", "type": 1, "activityType": "tibco-log", "activityRef": "github.com/TIBCOSoftware/flogo-contrib/activity/log", "attributes": [ { "name": "message", "value": "", "required": false, "type": "string" }, { "name": "flowInfo", "value": "true", "required": false, "type": "boolean" }, { "name": "addToFlow", "value": "true", "required": false, "type": "boolean" } ], "inputMappings": [ { "type": 1, "value": "{T.pathParams}.type", "mapTo": "message" } ] }, { "id": 3, "name": "Log Message (2)", "description": "Simple Log Activity", "type": 1, "activityType": "tibco-log", "activityRef": "github.com/TIBCOSoftware/flogo-contrib/activity/log", "attributes": [ { "name": "message", "value": "pet", "required": false, "type": "string" }, { "name": "flowInfo", "value": "true", "required": false, "type": "boolean" }, { "name": "addToFlow", "value": "true", "required": false, "type": "boolean" } ] }, { "id": 4, "name": "Log Message (3)", "description": "Simple Log Activity", "type": 1, "activityType": "tibco-log", "activityRef": "github.com/TIBCOSoftware/flogo-contrib/activity/log", "attributes": [ { "name": "message", "value": "weather", "required": false, "type": "string" }, { "name": "flowInfo", "value": "true", "required": false, "type": "boolean" }, { "name": "addToFlow", "value": "true", "required": false, "type": "boolean" } ] } ], "links": [ { "id": 1, "from": 2, "to": 3, "type": 1, "value": "${T.pathParams}.type=='pet'" }, { "id": 2, "from": 2, "to": 4, "type": 1, "value": "${T.pathParams}.type=='weather'" } ], "attributes": [] } } }, "id": "check", "ref": "github.com/TIBCOSoftware/flogo-contrib/action/flow" } ] }

Issue 2:
Steps to produce:

  1. Create the flogo app using the attached flogo.json. Command: flogo create -f flogo.json condition
  2. Go to condition folder and build. Command:flogo build
  3. Go to bin folder and run the condition app.

Run the App with the two Urls:
For first branch: localhost:9096/test/10
For second branch: localhost:9096/test/43

The url for the first branch also redirects to the second branch.

{ "name": "flogo", "type": "flogo:app", "version": "0.0.1", "description": "", "triggers": [ { "name": "Receive HTTP Message", "ref": "github.com/rameshpolishetti/triggerhttpnew", "description": "Simple REST Trigger", "settings": { "port": "9096" }, "id": "receive_http_message", "handlers": [ { "settings": { "method": "GET", "path": "/test/:id", "autoIdReply": "true", "useReplyHandler": "true", "Condition": null }, "actionId": "condition" } ] } ], "actions": [ { "name": "condition", "data": { "flow": { "type": 1, "attributes": [], "rootTask": { "id": 1, "type": 1, "tasks": [ { "id": 2, "name": "Log Message", "description": "Simple Log Activity", "type": 1, "activityType": "tibco-log", "activityRef": "github.com/TIBCOSoftware/flogo-contrib/activity/log", "attributes": [ { "name": "message", "value": "", "required": false, "type": "string" }, { "name": "flowInfo", "value": "true", "required": false, "type": "boolean" }, { "name": "addToFlow", "value": "true", "required": false, "type": "boolean" } ], "inputMappings": [ { "type": 1, "value": "{T.pathParams}.id", "mapTo": "message" } ] }, { "id": 3, "name": "Log Message (2)", "description": "Simple Log Activity", "type": 1, "activityType": "tibco-log", "activityRef": "github.com/TIBCOSoftware/flogo-contrib/activity/log", "attributes": [ { "name": "message", "value": "pet", "required": false, "type": "string" }, { "name": "flowInfo", "value": "true", "required": false, "type": "boolean" }, { "name": "addToFlow", "value": "true", "required": false, "type": "boolean" } ] }, { "id": 4, "name": "Log Message (3)", "description": "Simple Log Activity", "type": 1, "activityType": "tibco-log", "activityRef": "github.com/TIBCOSoftware/flogo-contrib/activity/log", "attributes": [ { "name": "message", "value": "weather", "required": false, "type": "string" }, { "name": "flowInfo", "value": "true", "required": false, "type": "boolean" }, { "name": "addToFlow", "value": "true", "required": false, "type": "boolean" } ] }, { "id": 5, "name": "Invoke REST Service", "description": "Simple REST Activity", "type": 1, "activityType": "tibco-rest", "activityRef": "github.com/TIBCOSoftware/flogo-contrib/activity/rest", "attributes": [ { "name": "method", "value": "GET", "required": true, "type": "string" }, { "name": "uri", "value": "http://api.openweathermap.org/data/2.5/weather?APPID=6231d08ce5469ffd47f0cd92f4b9af3e&q=vizag", "required": true, "type": "string" }, { "name": "pathParams", "value": null, "required": false, "type": "params" }, { "name": "queryParams", "value": null, "required": false, "type": "params" }, { "name": "content", "value": null, "required": false, "type": "any" } ] }, { "id": 6, "name": "Log Message (4)", "description": "Simple Log Activity", "type": 1, "activityType": "tibco-log", "activityRef": "github.com/TIBCOSoftware/flogo-contrib/activity/log", "attributes": [ { "name": "message", "value": "", "required": false, "type": "string" }, { "name": "flowInfo", "value": "true", "required": false, "type": "boolean" }, { "name": "addToFlow", "value": "true", "required": false, "type": "boolean" } ], "inputMappings": [ { "type": 1, "value": "{A5.result}", "mapTo": "message" } ] } ], "links": [ { "id": 1, "from": 2, "to": 3, "type": 1, "value": "${T.pathParams}.id<15" }, { "id": 2, "from": 2, "to": 4, "type": 1, "value": "${T.pathParams}.id>15" }, { "id": 3, "from": 4, "to": 5, "type": 0 }, { "id": 4, "from": 5, "to": 6, "type": 0 } ], "attributes": [] } } }, "id": "condition", "ref": "github.com/TIBCOSoftware/flogo-contrib/action/flow" } ] }

Confusing documentation on create activity

Hey!

Today I discovered this project and I find it interesting but the documentation seems a little bit confusing/outdated. I found two (+1 which is flogo_old) different docs on creating an activity:

  1. https://github.com/TIBCOSoftware/flogo-cli/blob/master/docs/activity.md (flogogen works but where is the -with-ui, -no-gb parameter?)
  2. https://github.com/TIBCOSoftware/flogo/blob/master/docs/createactivity.md

What is the current state of the tool? Are the -with-ui, -no-gb parameters deprecated?

Thanks

Documentation is out of date

The documentation for "How-to for IOT" seems to be out of date.

Executing the following commands as indicated in the instructions throws the following errors:

flogo install activity github.com/TIBCOSoftware/flogo-contrib/activity/log
Error: Too many arguments given
Usage:
flogo install [-v version][-p] contribution

flogo add flow reqcounter.json
FATAL: unknown command "add"

Usage:
flogo [arguments]

Rework RaspBi sample to use activity instead of WebIOPI

We need rework the Raspberry Pi sample to use an activity using go-rpio to talk to RaspberryPi's GPIO instead of WebIOPI so that there's:

Better user experience - activity instead of REST API
Fewer moving parts - no python required on RaspBi
Demonstration of Flogo extensibility

web ui not opening

Hi
I obtained the flogo docker image
The terminal/console window indicating that the image is up and the webui is running. It asked me to open http://localhost:3303.

But I get a site cannot be reached error

Any idea what could be wrong?

Thanks

Metadata Type in flogo.json is not being Resolved properly.

If we give an array to string parameter the value is being mapped and the message is being logged in the output.
"metadata": { "input": [ { "name": "id", "type": "array" } ] }
In the above example, "id" is string but when we map it to type array, no error is seen while creating the app and the "id" is still getting logged as string.

Below is the complete json:
{ "name": "test-flogo", "type": "flogo:app", "version": "0.0.1", "description": "", "triggers": [ { "name": "Receive HTTP Message", "ref": "github.com/TIBCOSoftware/flogo-contrib/trigger/rest", "description": "Simple REST Trigger", "settings": { "port": "9096" }, "id": "receive_http_message", "handlers": [ { "settings": { "method": "GET", "path": "/pets/:name", "autoIdReply": null, "useReplyHandler": null }, "actionMappings": { "input": [ { "type": 1, "mapTo": "name", "value": "pathParams.name" } ], "output": [] }, "actionId": "hello" } ] } ], "actions": [ { "data": { "flow": { "name": "Hello", "type": 1, "attributes": [], "rootTask": { "id": 1, "type": 1, "tasks": [ { "id": "log_2", "name": "Log Message", "description": "Simple Log Activity", "type": 1, "activityType": "tibco-log", "activityRef": "github.com/TIBCOSoftware/flogo-contrib/activity/log", "attributes": [ { "name": "message", "required": false, "type": "string" }, { "name": "flowInfo", "value": "true", "required": false, "type": "boolean" }, { "name": "addToFlow", "value": "true", "required": false, "type": "boolean" } ], "inputMappings": [ { "type": 1, "value": "${name}", "mapTo": "message" } ] } ], "links": [], "attributes": [] } } }, "id": "hello", "metadata": { "input": [ { "name": "name", "type": "array" } ] }, "ref": "github.com/TIBCOSoftware/flogo-contrib/action/flow" } ] }

Is it possible to update souce code under vendor folder with command like go get -u

I am learning to develop trigger/activity, and create flogo project to test it.
After updated trigger/activity code I have to delete flogo project and re-generate it from flogo.json file again to download the updated trigger/activity code. So I am wondering if it is possible to update local trigger/activity code required by flogo project using command like "flogo update" or something else.

Thanks.

CF Buildpack for Flogo

A cloud foundry buildpack for Flogo to enable deployments across CF PaaS environments.

Provide OOTB sample flows

Provide the following 3 samples OOTB as part of Flogo Web:

  • Hello Flogo sample: Timer Trigger + Counter + Log
  • Raspberry Pi IoT Example: REST Trigger + Counter + Branch + GPIO/LED
  • AWS IoT Device shadow example: REST Trigger + Log + AWS Activity +

Missing documentation for flow definition file.

It's pretty much clear how to create and configure triggers and actions, however almost no information explaining on how to define the flow without UI . There is flow.json schema but that is not well documented either.

Using Flogo on devices as bare-metal programs

Hello Flogo developers,

I recently started looking at Flogo. While I enjoy its simplicity of use, there's still something I don't get.
The project targets small devices with limited memory resources, but I can only generate ELF executables. Hence we need an ELF loader on the device to make it run, correct? Or does Flogo still need an underlying OS beneath it?

Thanks for your help!

integration into tibco products

Looks interesting....

Can i ask some high ball questions ?

  1. Your planning to write extensiosn that feed into the current tibco enterprise products ? Maybe some message queues or data analytics ?

  2. Are you planning on open sourcing anything related to the management of IOT devices. Updates, security, etc.

thansk you ..

Errors in helloworld sample readme.md

Hi,

I found two errors when trying the helloworld sample following
https://github.com/TIBCOSoftware/flogo/blob/master/samples/helloworld/README.md

The project misses the counter activity. This can be fixed by replacing the line:
flogo add activity github.com/TIBCOSoftware/flogo-contrib/activity/app
with
flogo add activity github.com/TIBCOSoftware/flogo-contrib/activity/counter

The link to helloWorld.json fails with a 404 error. This can be fixed by replacing the link: https://github.com/TIBCOSoftware/flogo/blob/master/samples/helloworld/cli/helloworld.json
with
https://github.com/TIBCOSoftware/flogo/blob/master/samples/helloworld/cli/helloWorld.json
(Capital "W" for helloWorld.json")

Minor details, but it would help people getting an easy start with FloGo.

Doc Enhancement request : create activity using a 3rd party go package

Hi,

I am a newbie at golang and I am struggling managing dependencies and imports correctly.
Using a 3rd party package shall be a very common practice when developing actvities. I followed the createactivity.md doc which is a good step-by-step manual. But, at the end, I fail make it work as my 3rd party package dependencies are clearly not well managed.
Can you please enhance the doc to clearly explain how to manage creating an activity using 3rd party go packages ?

Thanks
Eric

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.