Problem Resolution

In this Lesson

  • We will discuss the attributes of Soiree that can assist you with problem resolution
  • We will discuss a general approach to resolving problems
  • You will resolve the problem that was discovered at the end of the Adding rows to a list lesson

Concepts

Problems find their way into our products in spite of our best efforts and when problems are detected it is not unusual for the diagnosis to take longer than the cure.

The Soiree technology stack is your friend when it comes to diagnosing a problem with your solution.

  1. Soiree provides clear lines of responsibility between the various layers of the architecture. This allows you to narrow your search to the problem area more quickly
    • Presentation issues reside in the scene
    • Processing issues reside in the agent layer
    • Data integrity issues reside in the data access layer
  2. Soiree reduces, or in some cases eliminates, leakage across the layers. This improves the probability that the core issue actually resides in the layer you think should be responsible.
    • Scenes only do what scenes do. It is impossible for other types of processing to leak into the visual layer because code cannot be added to scenes.
    • Validation packs and their Message Owners make it easy to keep data integrity concerns in the data access layer.
    • SQL statements are written once and contained in highly reusable datasource. This encourages the team to place SQL in a single place instead of spraying redundant SQL statements throughout the solution.
    • Agents have a very defined role which helps engineers keep the wrong things out of the right places.
  3. Soiree provides consistency
    • The 15 Soiree items and the coding patterns that derive from them provide a high degree of consistency.
    • You can more easily classify problems. If you’ve seen a similar problem in the past it is very likely to be solved in the way, or place, it was previously solved.
    • Solving problems in code written by someone else is easier because everything is constructed similarly – regardless of who is doing the work.
  4. Soiree reduces code complexity
    • The Soiree items and generated code greatly reduce the amount of code that emanates from our fingers. This reduces the opportunity for us to create problems.
    • The ‘glue code’ that choreographs the activities of the solution is often some of the most complex code in a product. With Soiree this code simply falls away – along with the potential of introducing problems through our fingers.
    • Agents are simple creatures that are narrowly focused on a small set of function or data. This makes them easier to create and debug. They are also highly reusable so there is little need to replicate code in multiple places. [ which means we have fewer places to get it wrong ]
  5. Soiree provides a comprehensive logging framework which gives your solution an external voice to speak about issues as they arise
    • This can be used by your team to provide sufficient clues about your internal processes.
    • Soiree uses logging at a very deep level to provide you awareness of what is taking place. Here are two examples:
      • If you believe an agent is confused about the context of a conversation you can turn on logging that details exactly how context is being set and who is responsible.
      • When a query fails to execute successfully Soiree provides not only a Java stack trace telling you which query failed and who called it – you are also given the input parameters that were provided to the query.
  6. Soiree provides a performance monitor
    Some of the more intractable problems are performance related. Your process may be doing the correct thing – it just may be taking too long or pushing your servers too hard.
    • The monitor can give you an indication of overall system health.
    • The monitor can help you find the agents that run the longest.
    • The performance metrics can take you all the way down to a specific query that is misbehaving.

Problem Resolution Tips

Attempt to classify the layer in which the problem is likely to exist

  1. For presentation problems begin looking in the scene definition.
    • If the scene definition is OK then advance to the agents bound to the scene.
  2. For processing problems begin looking in the agent associated with the offending scene.
    • If the agent is OK then work your way down into the datasource or other sub-processes used by the agent.
  3. For data validation problems begin looking in the datasource validation pack and datasource associated with the data in question.
    • If the datasource and validation pack is OK then work your way up to the agents that use it.
    • Eclipse can tell you exactly where a datasource is used. Right click on a class or method name and select References

Regardless of where you begin your search, remember to look carefully at the item definition of the component you are inspecting. The item definition may give you the clues and capability needed to resolve the issue.

If the item definition looks OK then look at the subclass in the src folder for any custom code that may have been added.

It is possible the problem exists because custom code has been installed in the wrong place. The superclass created for each item has many methods designed for you to install custom code. You should acquaint yourself with the superclass structure of agents, datasources, and validation packs in order to understand the best place to add your customization code.

Resolving the problem from the prior lesson

Here is the problem that presented itself in the prior lesson



The steps to resolve this issue are as follows

  1. Is it a presentation issue?
    • Is a node bound to the component? Yes, it appears to be.



    • Is it the correct node? Yes



  2. So, it appears the value is simply not being validated correctly.
    • What agent is involved?



    • Does the agent use a datasource for displaying its information? Yes.



    • Check the datasource validation pack. We have found the problem



    • Repair the problem



    • Restart the server



      Notice
      You must restart the server for it to start using a modified Java class.
    • Restart the solution



    • Retest the issue



That concludes this lesson.