When you edit your ESQL file, you can save it both to preserve
the additions and modifications that you have made and to force the editor
to validate the file's content.
Before you start
To complete
this task, you must have completed the following task:
- Switch to the Broker Application Development
perspective.
- Create a new ESQL file or open an existing ESQL file.
- Make the changes to the contents of the ESQL file.
- When you have finished working, save the file to retain all your
changes by clicking or (the menu always shows the current filename
correctly).
When you save the file, the validator is invoked
by the editor to check that the ESQL obeys all grammar and syntax rules (specified
by the syntax diagrams and explanations in ESQL reference).
You
can request additional validation when you set ESQL preferences. Click .
The Preferences dialog is displayed:
- Expand the item for ESQL and Mapping on the left and click Validation. You can choose a value of warning (the default), error, or ignore for
the following four categories of error:
- Unresolved identifiers
- Message references do not match message definitions
- Database references do not match database schema
- Use of deprecated keywords
Validating message definitions can impact response times in the editor,
particularly if you have complicated ESQL that makes many references to a
complex message definition. You might choose to delay this validation. Invoke
validation when you have finished developing the message flow
and are about to deploy it, to avoid runtime errors.
For
each error found, the editor writes an entry in the Tasks view, providing
both the code line number and the reason for the error.
- If you double-click the error, the editor positions your cursor
on the line in which it found that error. The line is also highlighted
by the error icon
in the margin to the left. The
editor might also find potential error situations, that it highlights as warnings
(with the warning icon
), which it also writes to the
tasks view. For example, you might have included a BROKER SCHEMA statement
that references an invalid schema (namespace).
Check your code, and
make the corrections required by that statement or function.