Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Oct 28 12:34
    Ensam57 opened #572
  • Oct 17 18:59
    Shadab995 closed #571
  • Oct 08 12:14
    Shadab995 opened #571
  • Oct 06 10:36
    Shadab995 closed #131
  • Oct 04 12:11
    Shadab995 opened #131
  • Sep 01 16:53
    mend-for-github-com[bot] closed #343
  • Sep 01 16:53
    mend-for-github-com[bot] edited #343
  • Sep 01 16:53
    mend-for-github-com[bot] opened #349
  • Sep 01 16:53
    mend-for-github-com[bot] labeled #349
  • Aug 26 23:05
    mend-for-github-com[bot] closed #342
  • Aug 26 23:05
    mend-for-github-com[bot] edited #342
  • Aug 26 23:05
    mend-for-github-com[bot] closed #337
  • Aug 26 23:05
    mend-for-github-com[bot] edited #337
  • Aug 09 14:34

    mellistibco on readme-updates

    (compare)

  • Aug 09 14:34
    mellistibco closed #570
  • Aug 09 14:34

    mellistibco on master

    Readme updates (#570) * Update… (compare)

  • Aug 09 14:33
    mellistibco opened #570
  • Aug 09 14:33

    mellistibco on readme-updates

    Update README.md (compare)

  • Aug 09 14:23

    mellistibco on readme-updates

    Update README.md (compare)

  • Aug 09 14:13

    mellistibco on readme-updates

    Update README.md (compare)

Matt Ellis
@mellistibco
flogo —version
Asadullah Farooqi
@afarooqi8
the default one mention
flogo cli version 0.10.0
Matt Ellis
@mellistibco
hmm, seems to work for me
Asadullah Farooqi
@afarooqi8
how is your gopath and goroot set up?
Matt Ellis
@mellistibco
flogo plugin install github.com/project-flogo/cli-plugins/devtool Installing plugin: github.com/project-flogo/cli-plugins/devtool Installed plugin: github.com/project-flogo/cli-plugins/devtool
go env GO111MODULE="on" GOARCH="amd64" GOBIN="" GOCACHE="/Users/mellis/Library/Caches/go-build" GOENV="/Users/mellis/Library/Application Support/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GONOPROXY="" GONOSUMDB="" GOOS="darwin" GOPATH="/Users/mellis/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/local/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64" GCCGO="gccgo" AR="ar" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="/Users/mellis/flogo/cli/go.mod" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/t9/2d315wj12g5f6pw50k0pw5dm0000gp/T/go-build758199665=/tmp/go-build -gno-record-gcc-switches -fno-common”
Asadullah Farooqi
@afarooqi8
~/work/repos/edge-sdk:$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/asd/.cache/go-build"
GOENV="/home/asd/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/asd/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/asd/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.16.2"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/asd/work/repos/edge-sdk/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1497462169=/tmp/go-build -gno-record-gcc-switches"
~/work/repos/edge-sdk:$
Matt Ellis
@mellistibco
try export GO111MODULE=on
Asadullah Farooqi
@afarooqi8
sure
still not working :)
Matt Ellis
@mellistibco
can you try removing /home/asd/go/bin/flogo and reinstalling the cli?
perhaps a permissions issue on the /home/asd/go/bin/flogo bin?
Asadullah Farooqi
@afarooqi8
sure i did it yesterday and i'll do it again, btw I just remove the bin file and del the mod dir
Asadullah Farooqi
@afarooqi8
now i'm getting some reasonable error
~/work/repos/flogo/cli-plugins/devtool:$ flogo plugin install github.com/project-flogo/cli-plugins/devtool --verbose
Installing plugin: github.com/project-flogo/cli-plugins/devtool
# github.com/project-flogo/cli/common
../../common/pluginlist.go:8:2: undefined: pluginPkgs
error: 
/home/asd/go/pkg/mod/github.com/spf13/cobra@v0.0.3/bash_completions.go:11:2: no required module provides package github.com/spf13/pflag; to add it:
    go get github.com/spf13/pflag
Error adding plugin:
Asadullah Farooqi
@afarooqi8
hi guys @mellistibco @skothari12
i tried it on my other machine and some other machines as well
but the result is the same the text file busy error
skothari12
@skothari12
Can you try on a container ? I tried same thing and I didn’t face any issue. So there’s definetly something going on with your env. Although I just cannot narrow down the issue.
Asadullah Farooqi
@afarooqi8
i tried it on the vagrant machine,
btw how do you install the cli and the plugin?
i 1st run go get -u github.com/project-flogo/cli/... and then flogo plugin install github.com/project-flogo/cli-plugins/devtool
the cli-plugin it requires the 0.9 version of cli
ShaliniGovindaNayak
@shaliniGovindaNayak
Hai all, I have building a flogo activity to read data from csv file, the output of this will be two dimensional array how to map this in the output section do anybody have suggestion on this
11 replies
Ray Hindman
@rayhindman_gitlab
Peformance of TCI as development utility - in the past few weeks I have started to notice significant performance degradation while using TCI to edit/review flogo applications. The problem is very sporadic and unpredictable, but sometimes opening a Flogo application hangs for minutes at a time on the ‘open validation' window. Also anytime one renames an activity or property that causes a several ( > 20 ) validation errors, the user experience is less than usable, where every edit operation continually re-evaluates the entire flow and can take 15 - 30 seconds for each keystroke … Should there not be monitoring in flogo to determine if/when the validation process is taking excessive cpu cycles, the auto-validate-the-world feature can be disabled ? many thanks from a flogo fan
Tracy Li
@lixingwang

Peformance of TCI as development utility - in the past few weeks I have started to notice significant performance degradation while using TCI to edit/review flogo applications. The problem is very sporadic and unpredictable, but sometimes opening a Flogo application hangs for minutes at a time on the ‘open validation' window. Also anytime one renames an activity or property that causes a several ( > 20 ) validation errors, the user experience is less than usable, where every edit operation continually re-evaluates the entire flow and can take 15 - 30 seconds for each keystroke … Should there not be monitoring in flogo to determine if/when the validation process is taking excessive cpu cycles, the auto-validate-the-world feature can be disabled ? many thanks from a flogo fan

Hi @rayhindman_gitlab if you are using TCI, Could you please go-ahead to create a support ticket on this?

Tracy Li
@lixingwang

Peformance of TCI as development utility - in the past few weeks I have started to notice significant performance degradation while using TCI to edit/review flogo applications. The problem is very sporadic and unpredictable, but sometimes opening a Flogo application hangs for minutes at a time on the ‘open validation' window. Also anytime one renames an activity or property that causes a several ( > 20 ) validation errors, the user experience is less than usable, where every edit operation continually re-evaluates the entire flow and can take 15 - 30 seconds for each keystroke … Should there not be monitoring in flogo to determine if/when the validation process is taking excessive cpu cycles, the auto-validate-the-world feature can be disabled ? many thanks from a flogo fan

Hi @rayhindman_gitlab if you are using TCI, Could you please go-ahead to create a support ticket on this?

Hi @rayhindman_gitlab We are actively looking into this issue, Could you please share more info here.

  1. How many flows in your apps
  2. Do you use any user extensions?
  3. If possible, could you please share the app to us and help us reproduce the issue?

Thanks.

Asadullah Farooqi
@afarooqi8
@lixingwang and here is the app part, currently I have written the trigger and app in a single file just to understand it better
// app start
func main() {

    app := myApp()
    e, err := api.NewEngine(app)

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

type timerStruct struct{}

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

    trg := app.NewTrigger(&Trigger{}, timerStruct{})
    h, _ := trg.NewHandler(&HandlerSettings{})
    h.NewAction(RunActivities)
    //store in map to avoid activity instance recreation
    logAct, _ := api.NewActivity(&logg.Activity{})
    activities = map[string]activity.Activity{"log": logAct}
    return app
}

var activities map[string]activity.Activity
type reply struct {
    code int
}

func RunActivities(ctx context.Context, inputs map[string]interface{}) (map[string]interface{}, error) {
    fmt.Println("hello fellow !!", inputs)
    m := make(map[string]interface{})
    m["message"] = "Bonjour"
    return m, nil
}
Tracy Li
@lixingwang
@afarooqi8 The call flow should done at printXMLToConsole
Tracy Li
@lixingwang
Something like below @afarooqi8
package main

import (
    "context"
    "fmt"

    logg "github.com/project-flogo/contrib/activity/log"
    "github.com/project-flogo/core/activity"
    "github.com/project-flogo/core/api"
    "github.com/project-flogo/core/engine"
    "github.com/project-flogo/core/support/log"
    "github.com/project-flogo/core/trigger"

    "errors"
    "github.com/edgexfoundry/app-functions-sdk-go/appcontext"
    "github.com/edgexfoundry/app-functions-sdk-go/appsdk"
    "github.com/edgexfoundry/app-functions-sdk-go/pkg/transforms"
    "os"
)

// trigger starts here
type HandlerSettings struct{}

var triggerMd = trigger.NewMetadata(&HandlerSettings{})

func init() {
    _ = trigger.Register(&Trigger{}, &Factory{})
}

type Factory struct{}

// Metadata implements trigger.Factory.Metadata
func (*Factory) Metadata() *trigger.Metadata {
    return triggerMd
}

// New implements trigger.Factory.New
func (*Factory) New(config *trigger.Config) (trigger.Trigger, error) {
    return &Trigger{}, nil
}

type Trigger struct {
    logger   log.Logger
    handlers []trigger.Handler
}

// Init implements trigger.Init
func (t *Trigger) Initialize(ctx trigger.InitContext) error {
    t.logger = ctx.Logger()
    t.handlers = ctx.GetHandlers()
    return nil
}

// Start implements ext.Trigger.Start
func (t *Trigger) Start() error {
    fmt.Println("flogo trigger just started")
    //Assume you just have one handler.
    go edgexEventCatcher(t.handlers[0])
    return nil
}

// Stop implements ext.Trigger.Stop
func (t *Trigger) Stop() error {
    fmt.Println("flogo trigger stopped")
    return nil
}

type callHandler struct {
    handler trigger.Handler
}

// edgex
func edgexEventCatcher(handler trigger.Handler) {
    // turn off secure mode for examples. Not recommended for production
    os.Setenv("EDGEX_SECURITY_SECRET_STORE", "false")
    // 1) First thing to do is to create an instance of the EdgeX SDK, giving it a service key
    edgexSdk := &appsdk.AppFunctionsSDK{ServiceKey: "sampleFilterJSON"}
    // 2) Next, we need to initialize the SDK
    if err := edgexSdk.Initialize(); err != nil {
        edgexSdk.LoggingClient.Error(fmt.Sprintf("SDK initialization failed: %v\n", err))
        os.Exit(-1)
    }
    // 3) Shows how to access the application's specific configuration settings.
    deviceNames, err := edgexSdk.GetAppSettingStrings("DeviceNames")
    if err != nil {
        edgexSdk.LoggingClient.Error(err.Error())
        os.Exit(-1)
    }
    edgexSdk.LoggingClient.Info(fmt.Sprintf("Filtering for devices &v", deviceNames))
    // 4) This is our pipeline configuration, the collection of functions to
    // execute every time an event is triggered.
    callHandler := &callHandler{handler: handler}
    if err = edgexSdk.SetFunctionsPipeline(
        transforms.NewFilter(deviceNames).FilterByDeviceName,
        transforms.NewConversion().TransformToJSON,
        callHandler.printXMLToConsole,
    ); err != nil {
        edgexSdk.LoggingClient.Error(fmt.Sprintf("SDK SetPipeline failed: %v\n", err))
        os.Exit(-1)
    }
    // 5) Lastly, we'll go ahead and tell the SDK to "start" and begin listening for events to trigger the pipeline.
    err = edgexSdk.MakeItRun()
    if err != nil {
        edgexSdk.LoggingClient.Error("MakeItRun returned error: ", err.Error())
        os.Exit(-1)
    }
    os.Exit(0)
}

func (c *callHandler) printXMLToConsole(edgexcontext *appcontext.Context, params ...interface{}) (bool, interface{}) {
    if len(params) < 1 {
        // We didn't receive a result
        return false, errors.New("No Data Received")
    }
    println(params[0].(string))
    // Leverage the built in logging service in EdgeX
    edgexcontext.LoggingClient.Debug("JSON printed to console")

    //Here go and call flows, and data goes to flow
    triggerData := map[string]interface{}{}
    triggerData["jsonData"] = params
    results, err := c.handler.Handle(context.Background(), triggerData)
    //You can handle returned result and possible error. 
    println(err)
    println(results)
    return true, nil
}
Asadullah Farooqi
@afarooqi8
yeah thanks @lixingwang I really appreciate it, I figured out the solution but still thanks. the SetFunctionPipeline fails on a method function but that is a totally a different issue(
I'm thinking to use a global channel for that problem).
thanks a lot :slight_smile:
Tracy Li
@lixingwang

yeah thanks @lixingwang I really appreciate it, I figured out the solution but still thanks. the SetFunctionPipeline fails on a method function but that is a totally a different issue(
I'm thinking to use a global channel for that problem).
thanks a lot :slight_smile:

Welcome :)

Amarnath Patro
@amarnath262
Hi, Does anyone have any idea about authentication of URL,username and password using flogo connector ?
1 reply
Tracy Li
@lixingwang
@amarnath262 Do you using Flogo Open Source or Flogo on TCI?
1 reply
Asadullah Farooqi
@afarooqi8

hi @lixingwang,
i'm facing this error while piping the data to the handler,

Error invoking action : unsupported trigger data: &{{"apiVersion":"v2","id":"c4a72616-07e1-4300-a928-1bf764814c79","deviceName":"Random-Integer-Device","profileName":"Random-Integer-Device","sourceName":"Int16","origin":1627408154564184234,"readings":[{"id":"15f855a8-bd4b-4155-9e68-0e76a48deb6e","origin":1627408154564184234,"deviceName":"Random-Integer-Device","resourceName":"Int16","profileName":"Random-Integer-Device","valueType":"Int16","binaryValue":null,"mediaType":"","value":"23047"}]}}

I have tried to pass the data as a string then as a struct pointer but still facing the same error.

Asadullah Farooqi
@afarooqi8
nevermind I have resolved the issue :)
Asadullah Farooqi
@afarooqi8
I wrote a trigger and tried to install it through UI and it fails(installation failed).
now i thought install it through cli and volah, the cli is giving me this error
vagrant@vagrant:~/tryflogo/tryingCliInstallation$ flogo create newapp
Creating Flogo App: newapp
Installing: github.com/project-flogo/core@latest
Error creating project: open pkg/mod/github.com/project-flogo/core@v1.4.0/examples/engine/main.go: no such file or directory
vagrant@vagrant:~/tryflogo/tryingCliInstallation$
can anyone help!
Asadullah Farooqi
@afarooqi8
@lixingwang the different modules are using different versions of golang that's why the trigger is failing to build
debug: [01:14:16.092] Installation of 'github.com/afarooq8/trigger' failed in 'undefined' step.
debug: [01:14:16.093] Starting engine recovery.
debug: [01:14:16.093] Resource cleaning: removing the backup folder.
info: [01:16:43.848] [log] Install : 'github.com/afarooqi8/trigger'
debug: [01:16:43.849] Backing up 'src' to 'backupsrc'.
debug: [01:16:43.854] Started installing 'github.com/afarooqi8/trigger' to the engine.
info: [01:16:43.855] Exec command: flogo install github.com/afarooqi8/trigger in /flogo-web/local/engines/flogo-web
info: [01:16:43.860] run command: flogo install github.com/afarooqi8/trigger
engine:install:contribution: 1279911.114ms
debug: [01:38:03.777] Building engine.
info: [01:38:03.782] [log] Build flogo: "flogo build " compileOpts:
info: [01:38:03.789] run command: flogo build
warn: [01:38:48.910] command exited with code 1: flogo build
error: [01:38:48.920] [error] Encountered error while installing the 'github.com/afarooqi8/trigger' to the engine: 
error: [01:38:48.921] Error building project: # github.com/edgexfoundry/go-mod-core-contracts/v2/errors
/go/pkg/mod/github.com/edgexfoundry/go-mod-core-contracts/v2@v2.0.0/errors/types.go:79:6: undefined: errors.As
note: module requires Go 1.16
# github.com/pebbe/zmq4
/go/pkg/mod/github.com/pebbe/zmq4@v1.2.7/reactor.go:10:4: undefined: State
/go/pkg/mod/github.com/pebbe/zmq4@v1.2.7/reactor.go:11:9: undefined: State
note: module requires Go 1.16
# go.uber.org/multierr
/go/pkg/mod/go.uber.org/multierr@v1.7.0/error.go:249:6: undefined: errors.As
/go/pkg/mod/go.uber.org/multierr@v1.7.0/error.go:262:6: undefined: errors.Is
note: module requires Go 1.14
Asadullah Farooqi
@afarooqi8
can anyone help me a little, try to install that trigger on your end, i'm facing the flogo cli problems so can't try that on that as well(where i may see some more details to resolve it myself)
12 replies
Tracy Li
@lixingwang
@afarooqi8 Sorry, lost most of you message.
Are you still have any issue?
Yes, our web UI still using older version of Golang
Fabián Castillo
@fcastill
@afarooqi8 hi, what steps are you following to build the docket image?
Fabián Castillo
@fcastill
@afarooqi8 sorry if you were trying to build the dev.Dockerfile image, we haven't use that in a long time. I've removed it from the project. I tried the local mode using yarn server and yarn client and setting it up from scratch and that works fine for me.
2 replies
The prod docker image should be built using docker build -t flogo/flogo-web -f tools/docker/Dockerfile . -> that's failing for me when I upgrade the golang version to 1.16 (in the Dockerfile), something in the out of the box activities/triggers seems to be incompatible. I'm seeing:
#13 2036.0 [release:build-engines    ] [configure-engines] Error building project: /go/pkg/mod/github.com/project-flogo/contrib/activity/xml2json@v0.10.0/activity.go:7:2: missing go.sum entry for module providing package github.com/basgys/goxml2json (imported by github.com/project-flogo/contrib/activity/xml2json); to add:
#13 2036.0 [release:build-engines    ] [configure-engines]     go get github.com/project-flogo/contrib/activity/xml2json@v0.10.0
#13 2036.0 [release:build-engines    ] [configure-engines] /go/pkg/mod/github.com/project-flogo/contrib/trigger/timer@v0.10.0/timer.go:8:2: missing go.sum entry for module providing package github.com/carlescere/scheduler (imported by github.com/project-flogo/contrib/trigger/timer); to add:
#13 2036.0 [release:build-engines    ] [configure-engines]     go get github.com/project-flogo/contrib/trigger/timer@v0.10.0
#13 2036.0 [release:build-engines    ] [configure-engines] /go/pkg/mod/github.com/project-flogo/contrib/activity/jsexec@v0.10.0/activity.go:7:2: missing go.sum entry for module providing package github.com/dop251/goja (imported by github.com/project-flogo/contrib/activity/jsexec); to add:
#13 2036.0 [release:build-engines    ] [configure-engines]     go get github.com/project-flogo/contrib/activity/jsexec@v0.10.0
#13 2036.0 [release:build-engines    ] [configure-engines] /go/pkg/mod/github.com/project-flogo/stream/service/telemetry@v0.0.0-20200124014152-d2d7c82a602d/service.go:11:2: missing go.sum entry for module providing package github.com/gorilla/websocket (imported by github.com/project-flogo/stream/service/telemetry); to add:
#13 2036.0 [release:build-engines    ] [configure-engines]     go get github.com/project-flogo/stream/service/telemetry@v0.0.0-20200124014152-d2d7c82a602d
#13 2036.0 [release:build-engines    ] [configure-engines] /go/pkg/mod/github.com/project-flogo/contrib/function/json@v0.10.0/path.go:4:2: missing go.sum entry for module providing package github.com/oliveagle/jsonpath (imported by github.com/project-flogo/contrib/function/json); to add:
#13 2036.0 [release:build-engines    ] [configure-engines]     go get github.com/project-flogo/contrib/function/json@v0.10.0
#13 2036.0 [release:build-engines    ] [configure-engines] /go/pkg/mod/github.com/project-flogo/contrib/function/datetime@v0.10.0/formatdate.go:9:2: missing go.sum entry for module providing package github.com/tkuchiki/parsetime (imported by github.com/project-flogo/contrib/function/datetime); to add:
#13 2036.0 [release:build-engines    ] [configure-engines]     go get github.com/project-flogo/contrib/function/datetime@v0.10.0
oh also, for some reason the build is using more memory, I had to update my docker config to allow it to use 4GB , otherwise the build was failing during the compilation of the client app
agg24ankit
@agg24ankit
Hi all, is there any activity available for Salesforce and SFTP
5 replies
agg24ankit
@agg24ankit
Is there any activity to write custom go code in between the flow
4 replies
Amarnath Patro
@amarnath262
Hi, Does anybody has an idea on building a flogo connector for salesforce?
agg24ankit
@agg24ankit

I am getting below error while trying to build aws lambda. Followed the steps from https://tibcosoftware.github.io/flogo/faas/how-to/
Tried few things. I am using same example given on https://tibcosoftware.github.io/flogo/faas/how-to/

D:\Flogo\app\myapp2>flogo build -e --shim aws_lambda_trigger --verbose
Embedding configuration in application...
Creating shim support files...
Preparing shim...
Using build.go to build shim......
Running build script for the Lambda trigger
Cleaning up previous executables
Building a new handler file
go: main: package github.com/aws/aws-lambda-go/lambda imported from implicitly required module; to add missing requirements, run:
go get github.com/aws/aws-lambda-go/lambda@v1.10.0
exit status 1Zipping the new handler file
Failed to compress file: open D:\Flogo\app\myapp2\src\handler: The system cannot find the file specified.Cleaning up shim support files...

1 reply
Davor Sauer
@d-sauer
hi gents, what would be best way to contribute Flogo Activity?
next to creating PR it self: project-flogo/contrib#153
1 reply