Exercise 3 Debugging a Workspace
Data GPS Roads data (JSON)
Overall Goal Fix the bugs in someone else's workspace
Demonstrates Debugging Best Practice
Start Workspace C:\FMEData2017\Workspaces\DesktopBasic\BestPractice-Ex3-Begin.fmw
End Workspace C:\FMEData2017\Workspaces\DesktopBasic\BestPractice-Ex3-Complete.fmw

As President of your local FME user group, you are responsible for checking projects that are submitted for presentation at your monthly meetings. One day you receive this in an email:


Mr Flibble says...
I love driving across bridges! This workspace takes a set of GPS points, converts them to road lines, and then shows where I drove across a bridge by clipping it against the Vancouver land boundary.

Unfortunately Mr Flibble is seriously in error, and has produced a very poor workspace. Rather than turn down his presentation, let's help him debug the problems so it is worth sharing.


1) Set Rejected Feature Handling
Start FME Workbench and open the starting workspace. It looks like this:

Because we're trying to test a workspace - we're not trying to pick up on errors that occur in production - it's probably better to have the Rejected Feature Handling not terminate the translation just because a feature has been rejected. We want the workspace to continue and find what other issues might occur.

So, check the Workspace Parameters section of the Navigator window and set the Rejected Feature Handling parameter to Continue Translation:

Now the Rejected ports on transformers will lose their "stop" icon and look like this:


2) Debug Workspace
Run/debug the workspace to track down all the problems in it (I count five). Remember the order of debugging operations should be something like the following:

  • Set the log file parameters before running the translation
  • Run the translation. Examine the log for warnings and errors
  • Inspect the output datasets, if the translation wrote any
  • Check feature counts in the Workbench canvas to locate where problems occurred
  • Check reader, writer, or transformer parameters at the point of failure
  • Test the workspace by adding Inspector transformers to view data at different points
  • If necessary, run the workspace in feature debug mode

Be sure to fix any problems that you find!

Once the workspace is fixed, the output should look like this in the FME Data Inspector:


CONGRATULATIONS
By completing this exercise you have learned how to:
  • Set the Rejected Feature parameter
  • Read the translation counts to locate a workspace problem
  • Used Inspector transformers to identify problems
  • Interpret a log file to ensure everything is correct

results matching ""

    No results matching ""