Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jan 13 08:54
    whitesource-for-github-com[bot] labeled #344
  • Jan 13 08:54
    whitesource-for-github-com[bot] opened #344
  • Jan 12 18:31
    whitesource-for-github-com[bot] edited #339
  • Jan 12 18:31
    whitesource-for-github-com[bot] edited #338
  • Jan 12 18:31
    whitesource-for-github-com[bot] labeled #343
  • Jan 12 18:31
    whitesource-for-github-com[bot] opened #343
  • Jan 12 18:31
    whitesource-for-github-com[bot] edited #336
  • Jan 12 18:31
    whitesource-for-github-com[bot] labeled #342
  • Jan 12 18:31
    whitesource-for-github-com[bot] opened #342
  • Jan 12 18:31
    whitesource-for-github-com[bot] edited #335
  • Jan 12 18:31
    whitesource-for-github-com[bot] edited #337
  • Jan 11 17:07
    webfrank opened #558
  • Dec 20 2021 11:59
    prasadrao82 opened #557
  • Jul 23 2021 16:34
    lixingwang closed #341
  • Jul 23 2021 16:34

    lixingwang on master

    Fix issue timer issue for futur… Merge branch 'master' into time… Merge pull request #341 from TI… (compare)

  • Jul 23 2021 15:49
    lixingwang review_requested #341
  • Jul 23 2021 15:49
    lixingwang opened #341
  • Jul 23 2021 15:48

    lixingwang on timer-trigger-issue

    Merge pull request #340 from TI… Fix issue timer issue for futur… Merge branch 'master' into time… (compare)

  • Jul 22 2021 19:00

    lixingwang on master

    fix timer issue when start from… Merge pull request #340 from TI… (compare)

  • Jul 22 2021 19:00
    lixingwang closed #340
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?
1 reply
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?
1 reply
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?
1 reply
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
1 reply
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
    }
1 reply
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
Screen Shot 2020-12-22 at 10.01.27 AM.png
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
Screen Shot 2020-12-24 at 10.45.00 PM.png
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
Show your Settings type here
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"
    },
Reid Lai
@reidlai
Based on your range statement, I can see you are developing activity
Reid Lai
@reidlai
application json sgement is just you use the activity….which activity are u using? I think you are very confused how to use Flogo
Yueming Xu
@yxuco
I am writing my own activity. I believe this is a Web UI bug.
Yueming Xu
@yxuco
Even though I can work around the problem by not using array as a type in settings. I hope someone would check if the UI correctly exports array fields in activity settings. Comparing with how trigger settings are exported, which works because the exported model does not nest array under "mapping", you can see that activity settings are exported differently by nesting arrays under "mapping", which does not work at runtime.
Reid Lai
@reidlai
I don’t have your problem so better to share your source code here
One of the confused area what I observed is why u have golang code in your flow. This is what I don’t understand
And I don’t have any info about which trigger or activity u r using
Tracy Li
@lixingwang
We adding mapping to indicate it is an object mapping. It is an UI issue for sure. If u able to create a issue on project-flogo/flogo-web, it would be awesome.
1 reply
BTW. We will take a look PRs on core and cli on-priority after shutdown.
Yueming Xu
@yxuco
@lixingwang I'll open an issue for Web UI. Yes, it makes sense for input with nested "mapping" to indicate object mapping. But, for settings are constant configuration objects, it would not need nested "mapping". Maybe not many people are using object in activity settings because most trigger/activity require only simple primitive types in configuration. In my case, the configuration is complex enough that I would like to use JSON object so I do not have to escape quotes when configuring the activities. The current Web UI handles such complex configs correctly for triggers, but not for activity settings.
Yueming Xu
@yxuco
trigger.HandlerConfig now specifies array of actions. But OSS Web UI cannot import models with this format. It can import only models with a single action. My app contains a tool for generating Flogo models using app.Config, but the output model contains actions in trigger.HandlerConfig, and thus the model cannot be imported to the Web UI. How can I work around this problem? I guess that I can serialize the app.Config into JSON and then edit the JSON to replace actions with the first action in the handler. Is there an easier way to generate model that conforms with the Web UI? Or is the Web UI going to accept the new app.Config format?
2 replies
Fabián Castillo
@fcastill

We adding mapping to indicate it is an object mapping. It is an UI issue for sure. If u able to create a issue on project-flogo/flogo-web, it would be awesome.

@lixingwang So object mappings are not allowed at all in the activity settings, correct? If so yeah, the UI is wrapping the objects in the "mapping" prop because it is assuming that there could be a mapping inside the object.