project-flogo / flogo-web

Project Flogo Web UI
http://flogo.io
BSD 3-Clause "New" or "Revised" License
65 stars 36 forks source link

GetCategory of custom function not working #1304

Open reidlai opened 4 years ago

reidlai commented 4 years ago

Environment

How are you running Flogo Web?

Describe the bug

I have created custom function with GetCategory method. After import, Web UI show my function under a category which is same as name in descriptor instead of the string returned by GetCategory.

To Reproduce

Steps to reproduce the behavior:

Just create Flogo simple function

Expected behavior

Function should be under category which returned by GetCategory method.

Possible Solution

Workaround is to change the name in descriptor

fcastill commented 4 years ago

Flogo Web only uses the information available in the descriptor json

@fm-tibco any thoughts on this?

reidlai commented 4 years ago

I fixed it by add alias before imported package in flgoo.json.

Here is example of my flogo.json

{
  "name": "xxx",
  "type": "flogo:app",
  "version": "0.5.0",
  "appModel": "1.1.0",
  ...
  "imports": [
   "datetimex github.com/codelity-co/flogo-datetimex-function",
  ...
}

without changing name in descriptor.json

fcastill commented 4 years ago

Okay yeah, that's another option