The UNICOM® Digital Transformation Toolkit (UDTT™) Functional Trace is intended for functional developers, and it records execution and error information when code is being tested during the development phase.
Configuring the functional trace
By default, the functional trace is configured in the btt.xml file as shown here:
<kColl id="settings"> <kColl id="trace"> ... <field id="enableTechnicalTraces" value="false" description="Adapt traces to functional developer (if false) or technical developer (if true). Defaults to true if not present." /> ... <kColl id="requestersComponents"> ... <traceRequester id="#FUNC" trace="yes" functional="true"traceLevels="INFO" /> <!-- Functional data traces --> <traceRequester id="#FUNCDATA" trace="yes"functional="true" traceLevels="INFO" /> </kColl> </kColl> ... </kColl>
Parameters for functional trace
enableTechnicalTraces
Specifies whether a technical trace is enabled. The default value is “false”. If you do not specify the enableTechnicalTraces parameter in the btt.xml file, the default value is set to “true” to ensure compatibility with the previous UDTT tracing mechanisms. If a technical developer needs to diagnose an application problem, it is recommended that the value of the enableTechnicalTraces parameter is set to “true” so that stack exception can be retrieved.
traceRequester id="#FUNC"
This parameter is used to generate general transaction traces for flow and operation information. It has these attributes:
trace
Indicates whether to generate the related trace. Default value is “yes”.
functional
Indicates whether to throw exception dump to functional developer. The default value is “true”.
traceLevel
Indicates the trace level. Possible values are “FATAL, ERROR, WARN, INFO, DEBUG”. The default value is “INFO”.
traceRequester id="#FUNCDATA"
This parameter is used to generate page post context data information.
Components affected
Tracing messages are generated for the following components:
▪ Flow processor
▪ Flow start/end
▪ Trace flow ID.
▪ State enter/leave: trace state information
▪ State ID
▪ State type-specific information: page ID/operation ID/subflow ID/condition evaluation and so on.
▪ Transition trigger
▪ Trace event ID.
▪ Trace source and destination states.
▪ Data Mapping. For each mapping rule, trace:
▪ Source expression/element.
▪ Target element.
▪ Mapped value.
▪ Condition state evaluation
▪ For each condition, trace: condition expression, evaluation result and associated event.
▪ Condition evaluation loop stops when a true condition is met.
▪ Operation execution
▪ Trace operation ID.
▪ Trace operation completed event.
▪ If WS operation, trace WS input and output data.
▪ Page post data
▪ Trace context data updated from page request.
Example function trace
This example shows a functional trace of the execution of a flow.
2011-8-3 16:30:22 FunctionalTraceHel INFO: Processing page request - no application data 2011-8-3 16:30:23 FunctionalTraceHel INFO: => Starting flow 'tableScenario1Flow' at initial state 'initial' 2011-8-3 16:30:23 HtmlRequestHandler INFO: no error page specified 2011-8-3 16:30:23 FunctionalTraceHel INFO: Transition caused by event 'start', from state 'initial' to 'GetTableDataOp' in flow 'tableScenario1Flow' 2011-8-3 16:30:23 FunctionalTraceHel INFO: Entering state 'GetTableDataOp' in flow 'tableScenario1Flow' 2011-8-3 16:30:23 FunctionalTraceHel INFO: State 'GetTableDataOp' is an operation state, launching operation 'GetTableDataOp' 2011-8-3 16:30:23 FunctionalTraceHel INFO: => About to execute operation 'GetTableDataOp' 2011-8-3 16:30:23 FunctionalTraceHel INFO: <= Operation 'GetTableDataOp' executed 2011-8-3 16:30:23 FunctionalTraceHel INFO: => Begin output mapping from context 'tableCtx' to context 'tableCtx' 2011-8-3 16:30:23 FunctionalTraceHel INFO: Mapping from '*' to '*' 2011-8-3 16:30:23 FunctionalTraceHel INFO: <= End of mapping 2011-8-3 16:30:23 FunctionalTraceHel INFO: Transition caused by event 'ok', from state 'GetTableDataOp' to 'tablePagination01' in flow 'tableScenario1Flow' 2011-8-3 16:30:23 FunctionalTraceHel INFO: Entering state 'tablePagination01' in flow 'tableScenario1Flow' 2011-8-3 16:30:23 FunctionalTraceHel INFO: State 'tablePagination01' is a page state, showing page 'Pagination/tablePagination01' 2011-8-3 16:30:23 FunctionalTraceHel INFO: Rendering page 'Pagination/tablePagination01'