Flow Links App crashes on JSON datasets
Posted: Mon Sep 05, 2022 1:15 pm
Hello Everyone,
I would like to warn everybody who is working with the new JSON datasets in Switch 2022 Spring that this will cause issues in combination with Flow Links (Version 6 and lower). You will get errors like this:
Error in line 155 of script : Undefined member function 'getPath' for object 'undefined' of type: 'Undefined'
Flow Links 6 is written in Legacy Javascript and unfortunately Legacy Javascript has no full support for JSON datasets, hence there is no quick code fix for the issue. This requires a complete rewrite using nodejs scripting. Unfortunately I don't have spare time soon to create and test a full rewrite, so it will take some time until a fixed version is available.
If you rely on Flow Links a lot, then I would advise to hold of on using JSON datasets. If you have to use JSON datasets, then you can use the following workaround:
Step 1: transfer the json info to an xml dataset
You can do this either by using JSON Pickup, a payable app from the appstore
Alternatively, you can use Data Mapper and map each of the pieces of info you require from the json to an XML dataset. This is more work, but only uses free apps.
Step 2: Remove the json dataset before it reaches a Flow Links Send element.
This can be done using the Export Metadata tool.
Once I have the time I will create a fixed version and update this thread.
A sample flow to illustrate the problem and a workaround can be downloaded here: The flow uses the latest version of the Webhooks tool to create the JSON dataset. It can be triggered using Postman like this:
I would like to warn everybody who is working with the new JSON datasets in Switch 2022 Spring that this will cause issues in combination with Flow Links (Version 6 and lower). You will get errors like this:
Error in line 155 of script : Undefined member function 'getPath' for object 'undefined' of type: 'Undefined'
Flow Links 6 is written in Legacy Javascript and unfortunately Legacy Javascript has no full support for JSON datasets, hence there is no quick code fix for the issue. This requires a complete rewrite using nodejs scripting. Unfortunately I don't have spare time soon to create and test a full rewrite, so it will take some time until a fixed version is available.
If you rely on Flow Links a lot, then I would advise to hold of on using JSON datasets. If you have to use JSON datasets, then you can use the following workaround:
Step 1: transfer the json info to an xml dataset
You can do this either by using JSON Pickup, a payable app from the appstore
Alternatively, you can use Data Mapper and map each of the pieces of info you require from the json to an XML dataset. This is more work, but only uses free apps.
Step 2: Remove the json dataset before it reaches a Flow Links Send element.
This can be done using the Export Metadata tool.
Once I have the time I will create a fixed version and update this thread.
A sample flow to illustrate the problem and a workaround can be downloaded here: The flow uses the latest version of the Webhooks tool to create the JSON dataset. It can be triggered using Postman like this: