Troubleshooting: Simple Data Workflow Errors

Issue

Using Data Workflow, you can build complex functionality and manipulate data. But, you might run into issues in your configuration. In this article, you'll learn some of the common problems that occur in Data Workflows. Then, you'll learn the steps to troubleshoot them.

Solutions

The basic steps to troubleshoot errors in your Data Workflow are:

Investigate and Replicate

The first step is to understand your Data Workflow and what's failing. Investigate the unexpected behavior before looking for the root cause. This is especially challenging if the person reporting the issue doesn't provide specific details.

Think of the natural progression of what leads someone to the error. Think of the customer's mindset, and ask yourself how they arrived at this issue. Following the flow of the application or module often leads to the page with the error.

More complex errors can seem elusive at times. You'll need to be meticulous and creative. Think of the possibilities that lead up to the unexpected behavior. This comes down to your understanding of Data Workflows. It's important to know what your Data Workflow does. Try different combinations of events and values. Note your results and write down observations. 

Here are some questions you can ask yourself when investigating unexpected behavior:

  • Do I understand the issue?

  • Do I know what's actually happening?

  • What series of events led up to this unexpected result?

  • Do I understand what's supposed to happen based on the configuration or requirements?

  • What environment is the client in?

  • What role is that person?

  • Are they using test data or production data?

You need to see the failure and understand the context of unexpected behavior. It's a repeatable process that ends in the same behavior over and over again. 

NOTE  Be mindful when replicating a behavior. Only replicate an error if you can do it without causing issues in production. 

Can you vocalize what the issue is versus how the application should behave? If appropriate, can you replicate the issue? If yes, great. It's time to Isolate the unexpected behavior.

Isolate the Issue

The next step is to narrow down the location of the issue. Some helpful questions to ask yourself are:

  • Can I determine where the behavior is diverging from what's supposed to happen?

  • Where are the two branches starting to break away from each other?

Sometimes, finding the root cause of an issue is like finding a needle in a haystack. Ask yourself the following questions when a problem occurs in your Data Workflow:

1. Is my Data Workflow running?

Remember, it's crucial your Data Workflow triggers. When you set your trigger type to Watch, it triggers automatically. If you set it to Manual, you need to trigger it yourself. This trigger can be as simple as using a Button component.

2. Do all my required inputs have non-zero values?

This is one of the more common pitfalls of Data Workflows. Remember, you can inspect your Data Workflow's DevTools Console. If a circular reference error is present, it displays after triggering.

3. Do I see my expected input values in the DevTools Console when I trigger my Data Workflow?

Attach Console operators to each of your Data Workflow operators. Start with the inputs and work your way to the outputs. This process helps you find and troubleshoot the culprit.

NOTE  The Isolation process can be tedious. Try taking a break or talking out the issue with a teammate. Stepping away for a bit or vocalizing it can help you refocus. 

Terminate

Now that you know what's causing your issue, you get to fix it. The action can be as simple as _arg=0 instead of _arg>0. Or, the solution might be more complex. If you investigated and isolated the issue, you prepared for this step.

Avoid getting too attached when resolving unexpected behavior. Say you're troubleshooting a Get operator. You want the operator to deliver specific behavior, and it's not working. Consider whether this operator is the best option. Is a Pick operator a better option? Rather than getting tunnel vision, keep an open mind to possible workarounds.

Once you take action to fix the problem, take the time to confirm that it's fixed. Make sure that you take care of the root cause. Look at the data. Look at the page. Does everything now look the way you expect? Run the Data Workflow and repeat the steps from the replication phase. Do variations. Make sure that everything still works. It's good to work quickly, but your main priority is to produce high-quality work.

Resources