Data Action Tool doesn't take failure path even though it causes default flow error handling

WHen the Data Action returns a value all works correctly but when we don't get any values it triggers the flow default error handling when it should take the failure path.
Here is the data action response in the GUI. Thoughts why it's not taking the failure path?

Hi agilio,

Going to the flow default error handler often means that you are trying to access a null value. As in, the data action is taking the success path, however some of the expected outputs are not set / null. Depending on your situation, here are some things you could do / try:

In the output contract set the outputs you are using to required. This will cause the
data action to fail if required data is missing. One of my general suggestions is to do this early on since it is easy for an output to be subtly wrong and not actually set (like the contract has a "name" variable but the actual output is capital N "Name").

Another option is to use a translation map and default values to make sure that all of your needed outputs have a usable value.

Another way to approach this is to make your architect flow handle null values. This page has some examples:

If this doesn't help you out I would suggest opening up a case with Customer Care so that they can look at the Edge logs to see exactly what is going wrong.

--Jason

1 Like

Hi Jason,

This doesn't make sense. The documentation states:
*Failure This path indicates that there was an error executing the action or there was a problem processing the results from a bridge or data action. *

*Drag the appropriate action below the Failure path to direct the route you want the interaction to take. For example, a play audio action to indicate that the action wasn't successful, a transfer action to send the caller to an agent or representative for assistance. *

Note : If the network experiences connectivity issues, the action automatically takes this failure path.

The data action clearly states there is an error. !Error running action . Why would I try to create null values in my mind the failure path should be taken. Currently the tool is blowing up in a sense as the flows error handling is kicking in.

Thanks

Anthony

My guess is that the action is not failing inside of architect like you are expecting. It is succeeding, but not setting all of the output variables that you think that it is.

The easiest way to prove this out is to put play audio steps on each of the output of the data action and have them say "Success" / "Failure" / "Timeout" to see which path is being taken.

No matter what happens in a Data Action, it should not be able to cause your flow to go to the global error handler. If none of the play audio steps are being hit before the global error handler then please open a case with customer care to further diagnose what is going on.

Or I guess another possibility is that it is taking the failure path and your flow is still trying to use one of the variables that would only be set if the Data Action succeeded.

Hey Anthony, were you able to resolve this issue?

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.