Debugging exercise

Estimated duration: 1-2 hours

Introduction

When running the application or testing new features, like buttons and the processes behind these buttons, unexpected behaviour can occur. That’s why it is critical to know: where fields/processes come from, how to debug expressions, processes, how to check filters/conditions that are set on pages, grids, forms, buttons, etc.

What you are about to learn

  • How to find out what the source component is for text fields, buttons and grids.
  • How to follow processes step by step

Prerequisites

  • A personal training environment.

Contact your Novulo consultant if you do not have access to a personal training application for exercises yet. Most exercises only work in combination with a selected set of training data and not in any application.


1. Field names

Check what the database field names are for Code, Name and Product description long of a product. Also note from which component the fields originate.

If you get stuck at some point, read the following posts:

Solutions

Solution
  • M3391;
  • code,
  • name,
  • description_long.

If you have the trace formatter browser extension installed, you can enable “architect links”. By hovering over fields in your application, you can find out their database name:


2. Page analytics

Use the page analytics (or the Trace formatter) to find the ID of the product with the code BLE.

If you get stuck at some point, read the following posts:

Solutions

Solution
  1. Go back to the grid overview of Products and add the ID column.
  2. Use the trace formatter to hover over a field to see the ID number of the parent object.
  3. Use the page analytics in top right (when enabled) to view the current display values.


3. Process debugging

A customer reported that the “Clean up component name” button on the product page does not work as expected and that sometimes when it works the name is not updated, but the description.
You have been asked to fix it. The exercises below will guide you to the solution.

If you get stuck at some point, read the following posts:

A) Find the button on the product page and try it yourself, then give the input for a service request: Expected behaviour, actual behaviour and steps to reproduce based on the following sub questions:

  1. What is the expected behaviour of this button?
  2. Does the result of the button align with the expected behaviour? What is the difference, or what is the result you see?
  3. What are the steps to reproduce this bug? Give 1 or more steps required to trigger the unexpected behaviour.

B) What is the number and the name of the component that contains the bug?

C) What is the name of the process that contains the bug?

Hint: Use a trace analysis

D) What is the workaround that does not require a component change to get the process to work as intended?

Bonus question if you have architect knowledge
E) Which changes would you make to the process to solve the bug(s)? If possible, give an improved expression and make detailed suggestions.

Solutions

A)
  • Expected behaviour: When the product code is “ABC” and the product name is “ABC Product name 123” then after clicking the button the new product name should be “Product name 123”
  • Actual behaviour: When clicking the button, the product name stays the same
  • Steps to reproduce: Choose a product where the code is part of the name and click the button.
B)

M10906 - Novulo Training for debugging

C)

N_Product - Clean up product name

D)

A workaround is to set the date time “Last successful clean up” to a date time that is lower than the last time when the product was modified. Another workaround is to press the button to fill in the “Last successful clean up” date time. Then modify some other field of the product and save it. Click the button again, and at least something should happen.

E)

Bug1: The decision step “Has been modified after the last clean up?” is not complete. The problem is that this expression results in false when any of the dates are NULL. So, when a product has not been modified yet or when no clean-up has been executed yet, nothing will happen except that the date is set. To account for any of the values being NULL, the expression should look like this:

Boolean:or([trigger.product.modifiedat.isgreater(trigger.product.last_succesful_clean_up), trigger.product.last_succesful_clean_up.isnull(), trigger.product.modifiedat.isnull()])

Bug2: The wrong field is updated. Instead of setting the “description_long” the EDIT action in the process should update the “name”.

1 Like