Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

string.concat mapper function not found #151

Closed
mellistibco opened this issue Mar 23, 2018 · 4 comments · Fixed by #153
Closed

string.concat mapper function not found #151

mellistibco opened this issue Mar 23, 2018 · 4 comments · Fixed by #153
Assignees
Milestone

Comments

@mellistibco
Copy link
Collaborator

Trying to use the string.concat mapper function, as follows in the app json:

              "mappings": {
                "input": [
                  {
                    "type": "expression",
                    "value": "string.concat(\"Photo URL: \", $activity[rest_2].result.photoUrls[0])",
                    "mapTo": "message"
                  }
                ]
              }

The following error is thrown:

2018-03-23 07:45:56.228 ERROR  [function] - Execution failed for function [string.concat] error - No function string.concat found
2018-03-23 07:45:56.228 ERROR  [engine] - Execution failed for Activity[Log Message (2)] in Flow[Eval] - Expression mapping failed, due to Execution failed for mapping [string.concat("Photo URL: ", $activity[rest_2].result.photoUrls[0])] due to error - No function string.concat found
2018-03-23 07:45:56.228 ERROR  [flowmodel-simple] - Error evaluating activity 'log_4'[github.com/TIBCOSoftware/flogo-contrib/activity/log] - Expression mapping failed, due to Execution failed for mapping [string.concat("Photo URL: ", $activity[rest_2].result.photoUrls[0])] due to error - No function string.concat found
@lixingwang
Copy link
Contributor

As we designed the function is part of contribution. So you need import function in import.go same with what activity/trigger does.

@mellistibco
Copy link
Collaborator Author

mellistibco commented Mar 23, 2018

ok... we will need to fix that, since the functions aren't a contribution and they are in lib... This also means that you cannot build from webui using functions, as you'll have no way to add the import...

@lixingwang
Copy link
Contributor

Yes, If that case. We need enhance cli to preload all fucntion we have so far, today we can manual add onto import.go file.

@mellistibco
Copy link
Collaborator Author

We need to register the default functions. If they are in lib the cli shouldn't need to do something special to import it... Will keep this open as a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants