Carl Bourne Posted October 15, 2019 Posted October 15, 2019 Hi, I'm currently evaluating Flogo (Web UI) and can't seem to find a way to properly handle JSON data or indeed any data that gets returned from my API's. I'm used to using Node-Red that enables you easily define a custom function to do anything I need. How does this get handled in Flogo Do I need to drop down to the command line to build my own functions outside of the UI Is there at least an easy way to query the JSON data. I noticed there's a JSON.path() utility but that doesnt seem to be fully implemented. i.e. The wildcard in this expression is not supported.$.Books[*].Name Regrds, Carl
Ketaki Anilkumar Lolage Posted October 16, 2019 Posted October 16, 2019 I have a simple flow that invokes a REST API hosted athttps://my-json-server.typicode.com/tibcosoftware/tci-flogo/Book. To query the JSON response data, I provided a response schema to the InvokeRESTService activity, and then iterated over the response in LogKeys. I have also usedarrays.forEach() in GetNonSignedBooks (a Mapper) to filter out unsigned books. Alternatively, there is the ParseJSON activity but I have not used it yet. Maybe you're looking for more complex examples, but hope this helps you out.
Carl Bourne Posted October 16, 2019 Author Posted October 16, 2019 Thanks for this. However, the example seems to use several activities that reside at "git.tibco.com". Are these available publicly
Ketaki Anilkumar Lolage Posted October 16, 2019 Posted October 16, 2019 Yes, they are available OOTB with Flogo WebUI.
Carl Bourne Posted October 16, 2019 Author Posted October 16, 2019 Hmm, they dont seem to be in the docker image. Is there somthing I'm missing Contribution missinggit.tibco.com/git/product/ipaas/wi-contrib.git/contributions/General/activity/rest - You will need to install this contribution before you can use it in an app Contribution missinggit.tibco.com/git/product/ipaas/wi-contrib.git/contributions/General/activity/log - You will need to install this contribution before you can use it in an app Contribution missinggit.tibco.com/git/product/ipaas/wi-contrib.git/contributions/General/activity/mapper - You will need to install this contribution before you can use it in an app Contribution missingrest_1 git.tibco.com/git/product/ipaas/wi-contrib.git/contributions/General/trigger/rest - You will need to install this contribution before you can use it in an app Contribution missinggithub.com/project-flogo/contrib/function/array - You will need to install this contribution before you can use it in an app
Ketaki Anilkumar Lolage Posted October 17, 2019 Posted October 17, 2019 That's odd. This README says they are: https://github.com/TIBCOSoftware/flogo-contrib/tree/master/activity/log
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now