Mostafa_OUDDERHEM | 2020-12-02 08:19:45 UTC | #1
Hi,
We have create a custom data action that create callbacks The inputs are: QueueID, ScriptID, Callback Number and data (passed through variables on the Architect).
All works fine, but only when some variables pass an empty string to the data inupt of this API, it causes failure exit.
Is there any way to handle this case ?
Thank you in advance
Jerome.Saint-Marc | 2020-12-02 10:04:03 UTC | #2
Hello,
By failure exit, I assume that you mean that your Architect flow follows the Call Data Action failure path (i.e. failure branch of the Call Data Action object).
If this is what you mean, I am not sure I understand your question and what the issue is with the failure path.
The flow will take the Call Data Action success path only if the API request (the API request configured via the Data Action) can be made and gets a successful answer (200 OK). Otherwise, it will take the failure path.
What you can do is "optimize" your Data Action (but it will not have an impact on the failure path scenario). If the API request is not to be triggered when some parameters have an empty string value, you can configure your Data Action Input Contract and set a minimum length for your parameters. [You can access these parameters settings clicking on the Pencil icon, next to the input parameter in the Data Action - Setup - Contracts] As an example, you could set a minLength to 1. This will just prevent the API Request to be made if the parameter has an empty string value. But the Call Data Action will still exit via the Failure path.
If you want to manage empty string values so it doesn't take the failure path of the Call Data Action, you would have to test the content of these variables before the Call Data Action block in your Architect flow. I mean doing a test on your variables to check if they contain something different than NOT_SET or Empty string.
Regards,
Mostafa_OUDDERHEM | 2020-12-02 10:31:31 UTC | #3
Hi Jerome,
Thanks for your reply and explanation
Yes, I mean the DA failure path scenario on the Architect, I did some tests and if the variables are having an empty string value, the call with go through the failure branche, otherwise, it will take the success path.
To prevent this, I'm agree with you that the best way is to test on variables if they are empty or not set before set them on the DA, however, I have arround 15 variables to test and the DA action is used in many emplacement on the same flow, so it will be very complicated and big flow.
Thank you.
system | 2021-01-02 10:31:35 UTC | #4
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 9419