## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
##### Activity
• Apr 12 01:04
whitesource-for-github-com[bot] edited #339
• Apr 12 01:04
whitesource-for-github-com[bot] edited #339
• Apr 12 01:04
whitesource-for-github-com[bot] labeled #567
• Apr 12 01:04
whitesource-for-github-com[bot] opened #567
• Apr 12 01:04
whitesource-for-github-com[bot] edited #338
• Apr 12 01:04
whitesource-for-github-com[bot] labeled #347
• Apr 12 01:04
whitesource-for-github-com[bot] edited #563
• Apr 12 01:04
whitesource-for-github-com[bot] opened #347
• Apr 12 01:04
whitesource-for-github-com[bot] edited #563
• Apr 12 01:04
whitesource-for-github-com[bot] labeled #346
• Apr 12 01:04
whitesource-for-github-com[bot] opened #346
• Apr 12 01:04
whitesource-for-github-com[bot] labeled #566
• Apr 12 01:04
whitesource-for-github-com[bot] opened #566
• Apr 12 01:04
whitesource-for-github-com[bot] labeled #345
• Apr 12 01:04
whitesource-for-github-com[bot] opened #345
• Apr 12 01:04
whitesource-for-github-com[bot] labeled #565
• Apr 12 01:04
whitesource-for-github-com[bot] opened #565
• Apr 12 01:04
whitesource-for-github-com[bot] edited #343
• Apr 12 01:04
whitesource-for-github-com[bot] labeled #564
• Apr 12 01:04
whitesource-for-github-com[bot] opened #564
Matt Ellis
@mellistibco
hmm @fcastill
anborg
@anborg
::Persistent<v8::Object,v8::NonCopyablePersistentTraits<T>>' [C:\data\projects_go\flogo-web\node_modules\bufferutil\build\bufferutil.vcxproj]
with
[
T=v8::Object
] (compiling source file ..\src\bufferutil.cc)
c:\data\projects_go\flogo-web\node_modules\bufferutil\node_modules\nan\nan.h(1859): note: see declaration of 'Nan::Persistent<v8::Object,v8::NonCopyablePersistentTraits<T>>'
with
[
T=v8::Object
] (compiling source file ..\src\bufferutil.cc)
c:\data\projects_go\flogo-web\node_modules\bufferutil\src\bufferutil.cc(12): error C2660: 'v8::Value::Int32Value': function does not take 0 arguments [C:\data\projects_go\flogo-web\node_modules\bufferutil\build\bufferutil.vcxproj]
c:\users\pnataraj\appdata\local\node-gyp\cache\14.8.0\include\node\v8.h(2869): note: see declaration of 'v8::Value::Int32Value' (compiling source file ..\src\bufferutil.cc)
c:\data\projects_go\flogo-web\node_modules\bufferutil\src\bufferutil.cc(13): error C2660: 'v8::Value::Int32Value': function does not take 0 arguments [C:\data\projects_go\flogo-web\node_modules\bufferutil\build\bufferutil.vcxproj]
c:\users\pnataraj\appdata\local\node-gyp\cache\14.8.0\include\node\v8.h(2869): note: see declaration of 'v8::Value::Int32Value' (compiling source file ..\src\bufferutil.cc)
gyp ERR! build error
gyp ERR! stack Error: C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\MSBuild\\15.0\\Bin\\MSBuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\apps\scoop\core\apps\nodejs\14.8.0\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:314:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command \"C:\\apps\\scoop\\core\\apps\\nodejs\\current\\node.exe\" \"C:\\apps\\scoop\\core\\apps\\nodejs\\current\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js\" \"rebuild\"
gyp ERR! cwd C:\data\projects_go\flogo-web\node_modules\bufferutil
Fabián Castillo
@fcastill
@anborg Does this happen when running yarn install? Or is it from another command? I’m seeing something similar (in Mac) during yarn install when I use NodeJS v12 and NodeJS v14. However, it’s only a warning about an optional dependency and I can run the app. I can see in your logs that you’re using NodeJS v14.8.0, is there a chance you can downgrade to Node v10 and try?
anborg
@anborg
@fcastill , Right. error was during "yarn install" with master branch on windows.
anborg
@anborg
Is there a component for "Watch folder" if a new file is added, trigger a flow, with that file content as input?
Fabián Castillo
@fcastill
I think we don’t have an official trigger for that but I found some implementations for file watcher triggers from the Flogo comunity in Github https://github.com/search?q=flogo+watcher&type=code
Milos Veljkovic
@milosveljkovic
Any suggestion for solving this error: Post http://localhost:5000/api/arduino/sendData: dial tcp 127.0.0.1:5000: connect: connection refused
I try to do REST(Post) from FLOGO to Asp.Net core ... any ideas?
Samip Kothari
@skothari-tibco
I think it should be like any other connection refused issue. You can start by calling the service not from flogo but from postman itself. Check if the port is open. Check if it has been configured to aceept connections and so forth.
Mark Mussett
@mmussett
I’d say the issue is down to socket binding on the wrong network. Check which network the socket receiver is on. Running something like 'sudo lsof -i -n -P | grep TCP | grep 5000’ will tell you which process (if any) and network they’re listening on.
x0rzkov
@x0rzkov
Hi guys, is it possible to aggregate a json response from parallel requests to a set of restful apis (like krakend) but with flogo ?
4 replies
Samip Kothari
@skothari-tibco
3 replies
@x0rzkov
Reid Lai
@reidlai
[Subject][Please reply to thread] I have alread added grpc trigger in flow and got runtime error "gRPC server services not registered” when I started my flow in docker. Then I use protoc to generate my grpc stub. Should I modify main.go to create gRPC server? Or is there some pre-built service from project-flogo can help me bring up grpc server? Thanks for your advice
Tracy Li
@lixingwang
@reidlai grpc trigger is an shim trigger so it should already generated all nesscery file when you build from cli.
@reidlai Are you trying on flogo-web UI right?
6 replies
Jörg Grote
@JGrotex
searching for a Flogo IMAP Trigger - listening for newly incoming Emails, anyone aware of something like this?
Samip Kothari
@skothari-tibco
Can you check if the imports.go file in the app/src contains grpc import?
@JGrotex
Reid Lai
@reidlai
in project-flogo/cli source code, i found api/build.go will call common.BuildPreProcessors() to create empty array of PreProcessors….now I need to find a way to use build.go to call “git submodule update —init” using preprocessor before build shim trigger. Is there any example showing how to create preProcessor?
Reid Lai
@reidlai
Dear All I have built embeddedapp.go and shim trigger also geneate necessary pb.go and grpc.go. Then what should i do next to build binary and deploy in Docker?
Reid Lai
@reidlai
Guys, when we talk about CI, we usually run local unit test (without server deployed). However when we build our custom trigger and activities with Flogo, we usually need to plug with different backend like MongoDB, MinIO, Elasticsearch, etc…we usually call different backend SDK to prove our trigger/activity method or function working….without server deloyed locally, do we need to spend effort to develop backend mock object? Or is there any faster. and easier method to test our integration code with backend sdk/api? Thanks for your advice
Tracy Li
@lixingwang
@reidlai Today we don’t have easier way to Mock third part servers. what we does for this kinds of use cases we normally do: Using script to start test server over docker or a test env which running test cases after that stop server/ clean up server.
Reid Lai
@reidlai
@lixingwang got it. Just found few mock solution 🤗
Reid Lai
@reidlai
Now I need to run local end2end test is there any way i can run flogo app in test suite setup?
Yueming Xu
@yxuco
The flogo cheesecake tutorial is based on old Flogo APIs. I wonder if the new Flogo core supports something similar, or I should ignore that way of using Flogo? https://tibcosoftware.github.io/flogo/labs/cheesecake-service/
Tracy Li
@lixingwang
@yxuco I think yes, You can take a look here github.com/project-flogo/core/api
Yueming Xu
@yxuco
I have a trigger driven by a shim.go that calls handler.Handle(context.Background(), triggerData.ToMap()) to pass trigger-data to a flow. I noticed the following code that can directly pass trigger-data to the flow if nothing is mapped in the flow input. If I use this feature to make all trigger-data automatically available to the flow activities, would I still have to declare the data fields as trigger output in the descriptor.json? I guess that it is not necessary since I do not expect user to manually map these fields. However, it may be better to declare them in descriptor.json anyway to show user which fields are available. What would you think? It would be better if the Handler API allows me to specify some mappable fields and some auto-mapped fields as well.
// https://github.com/project-flogo/core/blob/master/trigger/handler.go line 180

if act.actionInputMapper != nil {
inputMap, err = act.actionInputMapper.Apply(scope)
if err != nil {
return nil, err
}
} else {
inputMap = triggerValues
}
Tracy Li
@lixingwang
@yxuco
1. Yes, if nothing mapped today we will just pass all trigger data to flow
2. We should show all triggers output to user to show the schemas
3. Unfortunately, today there is no way to copy and update in the mapping.
8 replies
For #3, you can create an request under project-flogo/core
Yueming Xu
@yxuco
Is the flogo-web going to allow user to insert activity in an existing flow? I see a related issue project-flogo/flogo-web#707, but it does not say what we have decided to do. I think that a simple solution might be to add a "insert" button on the side of the current buttons for (delete, branch, config) on an activity tile that would allow developer to insert a new tile before or after the selected tile. Without the insert function, developer would have to use text-editor to add activity and re-import, which is not very friendly.
Fabián Castillo
@fcastill
Hi @yxuco that feature is already implemented but it is currently unreleased. You can give it a try if you use the unstable tag of the docker image (project-flogo/flogo-docker:unstable). Please let us know what you think if you give it a try.
Alternatively, in the current release you can add an activity at the end of a row and then drag it to the position that you want.
Yueming Xu
@yxuco
@fcastill Thanks for the pointer. Did not know that you can drag and insert :-)
Howard Lince III
@Howard3
Hi all, I've tried to persist flogo from docker by mounting /flogo-web/local but this just threw a host of errors. If I want to persist flogo / back it up in the context of docker, how can I?
5 replies
Yueming Xu
@yxuco
When using cli to create an app, can I make it to use my fork of flogo core? The flag --cv allows you to specify a core version, but I hope it allows me to specify a fork repo as well. I can work around it by editing the generated go.mod, although it is an extra-step that I have to script.
Reid Lai
@reidlai
Hey guys, when I review github.com/project-flogo/grpc/activity/grpc...i found that there is shim folder….if my app is using this grpc activity how can I run build —shim? because —shim option is only for trigger…i have no clue how to run shim/build.go. Thanks for any hint
Yueming Xu
@yxuco
The web UI does not validate JSON format correctly while typing. The above figure shows a valid JSON object, but I had to edit the content outside of WebUI, and pasted the whole string into WebUI and save it. If you try to type it in the UI, it'll think it is invalid, and gray out the "Save" button. Do you see this problem?
Yueming Xu
@yxuco
Is there a process to follow for this community to make changes to Flogo projects? I opened a couple of issues and pull requests for core and cli 2 weeks ago, but did not receive any feedback, and no reviewers are assigned to them, so they are basically ignored. Did I miss any step to get repo maintainers to review, accept or reject the pull requests?
Yueming Xu
@yxuco
The above may be an issue for arrays. I am expecting the setting of attributes be an array of strings. However, the following code does not return what I expected:
if attrs, err := coerce.ToArray(values["attributes"]); err == nil && len(attrs) > 0 {
for _, v := range attrs {
if f, err := coerce.ToString(v); err == nil {
the v in the code did not return an item of string, e.g., docType. actually v returned a value {"mapping":["docType","color","name"]}
Yueming Xu
@yxuco
BTW, the values in the code is the config map activity.InitContext, i.e., ctx.Settings(). I would think that the ctx map should have already taken out the nested structure of mapping for the array field.
Reid Lai
@reidlai
Sounds like you declared wrong type in your settings
Yueming Xu
@yxuco
It is declared as array.

The above setting is exported by the Web UI as

  "settings": {
"keyName": "color~name",
"attributes": {
"mapping": [
"docType",
"color",
"name"
]
}
}

It would work if I edit it to remove the nesting of mapping. Compared to trigger handler settings, arrays are actually exported as array without the nesting under mapping. So, to keep it consistent, maybe Web UI should export activity settings as array, e.g.,:

  "settings": {
"keyName": "color~name",
"attributes": [
"docType",
"color",
"name"
]
}
here is the relevant setting in descriptor.json
"settings": [{
"name": "keyName",
"type": "string",
"description": "name of the composite key used to retrieve data"
},
{
"name": "attributes",
"type": "array",
"description": "list of json-path for attributes used to construct composite key"
},