1 of 20

Saving With Errors (for Tables and Groups)

2 of 20

2

In this tutorial you will learn how to overcome errors in Tables and Groups

  1. This tutorial assumes you have launched an OLDER version of ‘first_demo’ using the Start/Reset Tutorial, and you know how to access Normal Mode and Wiz Mode through your web browser.
    1. Note, as of 8/2020 the latest ots release is v2_5, and you should have reset your tutorial with v2_4!!!
    2. For this tutorial, we start with an older version so that we have example broken tables and groups to fix!
  2. For this tutorial, we will overcome errors from Wiz Mode. Note that you can overcome errors in Normal Mode if you add the Configure web app to your desktop - the Add a Desktop Icon Tutorial will show you how to do that. For help launching Wiz Mode see the Wiz Mode Tutorial.
  3. Launching an old tutorial means your table definitions are likely old. We must update them before launching Wiz Mode. This situation would be indicated by seeing this when launching the tutorial or Wiz Mode:

    • At the command line (you must be setup and compiled) do…

    • A bunch of text should scroll by as your table definitions are repaired.

UpdateOTS.sh --tables

Could not verify successful ots wiz context launch, relaunching ots wiz context...

3 of 20

3

Launching Wiz Mode and open the Configure App

  • After repairing your tables, launch Wiz Mode from the command line:

    • Hopefully you now see this, and can connect your browser:

  • Once in Wiz Mode you should see these icons:

ots -w

Verified successful ots wiz context launch...

3. Click the Configure icon

4 of 20

4

The Configure web app looks like this:

Note: We are missing an Active Context group! This is because we started from an old tutorial database and it has errors from the perspective of the latest version of ots and the latest table definitions.

Let’s fix this.

5 of 20

5

Identifying errors in Table Groups

  • It is often easier to find errors in your configuration from the top-down (bottom-up would be looking for individual errors at the row and column table level).
  • The very top perspective of your configuration is the “System View”
    • Clicking System View resets your Configuration Editor and presents you with any errors in your active configuration groups.
  • Click System View now and see the errors:
  • Errors in otsdaq are comprised of the C++ exception handling error messages
    • So you get a history trail back to the source of the issue, complete with source files and line numbers.
  • In this case, we see that there were errors activating table group “testContext” with key 2.
    • We now know, from the top-down, that this group has problems, so we can target that group to make some fixes.

6 of 20

6

  • Go to Group View at the top of the web app:
  • To find “testContext(2)” click “All” to see all group names in your system
    • Then select “testContext” in the search box
    • Then select key 2 from the Selected Group existing valid keys.
    • You will be redirected to the “testContext(2)” Specific Group View.

Finding the problematic Table Group

Note: the search icon

7 of 20

7

  • If there are a lot of errors, you may want to download them to read them in your favorite text viewer.
  • Or just scroll down:

  • Once in the “testContext(2)” Specific Group View, you are immediately confronted with errors!
    • These errors are useful and, often, the best approach is to read them and fix them one by one. Then refresh the view you are in.

Identify the Table Group errors

8 of 20

8

  • If you have a big display, you may want to move or resize the error box, within the web app, using the gray areas of the popup.

  • And hitting the ESC (escape) key will close the popup and SHIFT+ESC will restore the popup.
    • There is a reminder of this under the “Close Errors” at the top.

Repositioning the error box

9 of 20

9

  • The first error to fix is that this group is an “incomplete match to a Context group”
    • This happened because we added a member table to Context group types in v2_5 of ots.
  • To add a table to this group click “Add/Remove/Modify Member Tables”

  • Click the “Context” member table preset.
    • This will check the boxes of all member tables that are part of the Context group type.

Fixing the Table Group errors

  • Then click “Create the new Group” and “Save Group” in the resulting dialog. You will get errors, but they should be different now!

10 of 20

10

  • Our top-down approach has now led us to some Table errors, specifically in “DesktopIconTable v2” according to the error message.
    • For more on tables, see the Creating and Editing Tables Tutorial.
  • Click “Close Errors” and “Cancel” at the top of the popups.

  • Locate the member table “DesktopIcon” name (note v2 is already selected) and click “goto”:

  • “Goto” takes you to the Specific Table View for “DesktopIconTable v2” and you should see Warnings:

Identifying member Table errors

11 of 20

11

  • We know that these warning lead to group errors, so we need to fix them. If you read the warnings you will see that the column definitions for this table must have changed in v2_5 of ots.

  • Sometimes to fix a table, you need inside information as to what the table and its columns do.
    • There is often extra info in the Table Description. For more, see the Table Definition Tutorial.
    • Click “show” to view the Table Description.

Identifying member Table errors continued...

12 of 20

12

  • To fix a broken table, you must save a new version of the table.
  • Often you can just blindly click “Save Changes as New Version” but if you do that in this instance you will lose some useful info.
    • Check the “LinkToParameterGroupID” column and notice all the values are DEFAULT even though some rows have a link defined in the related “LinkToParameterTable” column. This is strange.
      • What happened was ots could not figure out how to map the source column data onto the new column definition.
  • To recover the lost data, click “Reload v2 with loose column matching”

    • This will ignore the column names with fetching the source data.
      • The lost data was recovered!
      • The bottomline logic to follow is this:

If new columns were added or old columns were repositioned, likely you can blindly save to create the new version; if column names changed you likely will need to reload with loose column matching. If both occurred, you may need to get clever (e.g. download the loosely matched table and permute with Excel, then upload).

Fixing member Table errors

13 of 20

13

  • Now click “Save Changes as New Version.”
    • In the popup, uncheck all the boxes so we do not change any parent table groups (Remember, we know our Context group was short a table too, so trying to save the group with just this one table changed will fail)
    • The click “Save Table.”

      • You should now have a version 3 of the DesktopIconTable with no warning/errors.
  • Click Back to return to the Table Group Creation view.

Fixing member Table errors continued...

14 of 20

14

  • You should be back in the Table Group Creation view for group name “testContext”:

  • In a future ots, it would be nice if this view remembered the steps you already did to fix this group.. But alas, currently ots does not. So you have to remember to repeat the steps we did before (i.e. if you end of fixing 5 tables in the group, you will have to remember the names/versions of those 5 tables.. sorry!)
    • Click “Context” to select all Context type tables.
    • Then for the DesktopIcon table select your new version (should be version 3)

Choosing a fixed member Table

  • Then click “Create the new Group” at the top
    • And “Save Group” in the popup

15 of 20

15

  • This tutorial wouldn’t be fun if we were done. Now we get to do it all again, but for “GatewaySupervisorTable:v2.”

  • Remember the steps to fix a table:
    • Close Errors and hit Cancel in the save popups.
    • Click “goto” to go to the Specific Table View for GatewaySupervisor v2.
    • Note the Warnings that pop up.
    • If Column names changed, reload with loose matching. Otherwise, blindly saving will probably work.
      • In this case columns were added, so blindly saving will work! Click “Save Changes as New Version.”
    • Uncheck “Save Affected Groups as New Keys” since we have a multi-step group problem.

We still get errors!

    • Then click “Save Table” to get v3 of the GatewaySupervisorTable.
    • Finally, click “Back” to return to the group creation view.

16 of 20

16

  • You should be back AGAIN in the Table Group Creation view for group name “testContext”:

  • Now you can see why it would be nice if this view remembered the steps you already did to fix this group.. Sorry again.
    • Click “Context” to select all Context type tables.
    • Then for the DesktopIcon table select your new version (should be version 3)
    • Then for the GatewaySupervisor table select your new version (should be version 3)

Choosing a fixed member Table AGAIN!

  • Then click “Create the new Group” at the top
    • And “Save Group” in the popup

17 of 20

17

  • If it were easy, everyone would get to the end of this tutorial. Haha.

  • Hopefully you now you are getting comfortable with the steps to fix a table:
    • Close Errors and hit Cancel in the save popups.
    • Click “goto” to go to the Specific Table View for XDAQContextTable v2.
    • Note the Warnings that pop up.
    • If Column names changed, reload with loose matching. Otherwise, blindly saving will probably work.
      • In this case columns were removed, so blindly saving will work! Click “Save Changes as New Version.”
    • Uncheck “Save Affected Groups as New Keys” since we have a multi-step group problem.

We still get errors, AGAIN!

    • Then click “Save Table” to get v3 of the XDAQContextTable.
    • Finally, click “Back” to return to the group creation view.

18 of 20

18

  • You should be back AGAIN in the Table Group Creation view for group name “testContext”:

  • We have beaten the horse as to why it would be nice if this view remembered the steps you already did to fix this group...
    • Click “Context” to select all Context type tables.
    • Then for the DesktopIcon table select your new version (should be version 3)
    • Then for the GatewaySupervisor table select your new version (should be version 3)
    • Then for the XDAQContext table select your new version (should be version 3)
    • Or “Latest” at the top would choose your new versions in one click (if you know all tables should be latest)

Choosing a fixed member Table FOR THE LAST TIME!

  • Then click “Create the new Group” at the top
    • And “Save Group” in the popup

19 of 20

19

Eureeka! You now know how to Save Groups and Tables with Errors!

  • For more on error handling while activating groups, see the Activating with Errors (for Tables and Groups) Tutorial.
  • Your group with errors has now been saved as a fresh new, error-free, group named “testContext” with key 3:

20 of 20

Related Tutorials

20