Once you have written and successfully stored an expression in the repository, you can turn on XPRESS tracing to determine if the expression is functioning correctly. XPRESS trace messages are sent to the standard output device. Since XPRESS is typically evaluated within the application server, the trace messages are sent to the console window or log file that was active when the application server was started.
There are two forms of XPRESS tracing:
Global trace. When global trace is enabled, all XPRESS expressions are traced.
Block-level trace. When block level tracing is used, only expressions within designated blocks are traced. Block tracing can be set only within a field element in a form or within an expression in a workflow.
Typically, block-level tracing is preferable because it reduces the amount of trace output, which is then easier to analyze.
To enable global trace, set a Waveset.properties file entry named xpress.trace to the value true. If you change the Waveset.properties file while the application server is running, you must either restart the application server, or go to the Debug Page and click Reload Properties.
To perform block-level trace, wrap the expressions you want to trace in a <block> expression and include the attribute trace=’true’ in the block start tag.
<block trace=’true’> <invoke name=’getTime’ class=’java.util.Date’/> </block> or <Default> <block trace = ’true’> <ref>global.accountId</ref> </block> </Default>
Do not use the <block> element in the following ways.
<block trace=’true’> <Field name =’field1’> … </Field> </block> or <Field name=’Field2’> <block trace=’true’> <Default> <ref>global.accounts</ref> </Default> </block> </Field>
The trace messages include the names of the functions, the values of each argument, and the return values.
To turn tracing off for XPRESS, set the xpress.trace value to false, and reload the Waveset.properties file.