Click or drag to resize
Pre-processing

[This is preliminary documentation and is subject to change.]

Pre-processing is used, when you want some code to be executed, whenever a user opens a dynamic form.

Example uses
  • You need to execute some code to compute default values (retrieved from an external system) for fields in the dynamic form.

    [If you need to compute default values from the current environment / database, you could accomplish that by using TOPICA Basic, so you would not use pre-processing in this case]

  • In a hypothetical example, you could use pre-processing to initiate some action in an external system whenever a user in the TOPICA application opens some specific form(s).

Implementation

A pre-process is implemented as a an .ASPX-file. The developer of the .ASPX may choose whether to use "code behind" or not.

This .ASPX-file should not emit any user interface. The TOPICA framework ensures, that any user interface displayed by the pre-process is discarded. The form containing the pre-process specification is displayed normally no matter what.

The TOPICA framework ensures, that necessary context information is passed as parameters in the querystring starting the pre-process URL.

The .ASPX-file (together with an optional "code behind" file, e.g. .ASPX.CS file) must be placed in the PreProcess folder in the Configuration folder Structure.

If the purpose of the pre-process is to compute default values (retrieved from an external system) for fields in the dynamic form, these values should be returned as an XML document. The returned values may transferred to fields in the dynamic form using XPath expressions, or retrieved using JavaScript and jQuery cline-side.

Configuration

The configurator must write TOPICA Basic code to compute the URL referring to the pre-process .ASPX.

Example code
Caution note Caution

TODO: Add sample code with explanation.