This property allows you to know what the generator is currently doing about the output of the component being processed at this moment.

There are three values returned by this property:

"checking"

The generator is checking if the component would have any non-empty output in the current context.

In certain cases, long before the generator reaches a component to generate its output, it may needs to know whether that component indeed will have any output at all. This is necessary, because it may be specified in the template that the component's output (or the output of the whole group of components it belongs to) should be preceded by a certain heading. Such a heading should be printed only when there is something it's supposed to head. So, before generating the heading, first, the generator needs to know whether the main output exists.

To find this, the components that generate the main output are processed partially so as to know if they would produce any non-empty output in the current context. If the components contain other components, calls of stock-sections or even subtemplates, everything may be involved in such a check-processing. However, it is never known, how many components will be eventually executed during that. As soon as the generator finds that some of the components would definitely produce an output, the checking is stopped.

The DocFlex generator core is optimized so as to minimize check-processing of the components. Moreover, for each component, a special "Output Checker Expression" may be specified in the template (at Component | Optimization tab in component properties dialog). That expression may be specifically optimized to determine the existence of the output a lot quicker, so the generator will call that expression instead of the check-processing of the component itself.

Although, check-processing of the components allows in certain cases to use declarative constructions instead of procedural programming, it also causes a problem that anything specified in the templates may be repeatedly executed unknown number of times.

For instance, if you need to accumulate some total sum of numbers obtained from elements that are iterated by a certain Element Iterator, you may specify a Step Expression in the iterator's properties that will produce a value by each current context element and add it to the total sum. For example:

price = getAttrValue("Price").toNumber();
incVar("total", price);
Unfortunately, this may work incorrectly, because when the generator check-processes the iterator component to know if it has any output, the step expression may be executed unpredictable number of times, so extra values will be added to the total sum.

However, you can easily fix this! All you need is to enclose the accumulator expression in the "if" block that tests if the generator is not in the output-checking mode:

(output.status != "checking") ? { 
   price = getAttrValue("Price").toNumber();
   incVar("total", price);
}
"estimating"
The generator is estimating the component output.

The estimation of the component output may occur only during the estimation phase (see also estimationPhase property), when the generator partially interprets all the involved templates in order to collect some preliminary information about the whole output that will be produced (for instance, to collect possible locations of hypertext target).

The interpretation of the component during the output estimation is similar to that during the generation of that output. However, no actual output is produced. Moreover, not all the template components that eventually contribute to the result output will be estimated. The generator just needs to know certain specific things about the real output the component will produce in the given context. When from the component settings it is clear that there is nothing special about such an output (e.g. neither hyper-targets are specified in this component nor in those contained in it), the generator just passes that component over.

"generating"
The generator is interpreting the component in order to generate its output.

This is the most straightforward processing mode and, ideally, it would be the only one needed. The other two modes play only auxiliary role to make the whole generation actually work.

Please note, although most of the template components are interpreted for the output generation only during the generation phase (see description for the estimationPhase property), there is some exception.

When a stock-section is called by callStockSection() function from a FlexQuery expression, both the stock-section itself and any components contained in it (as well as called from it, including any subtemplates) are processed to generate an output. Although, the total output produced by the stock-section will not get into the result document, but rather is returned as a string result of the callStockSection() function call, the status property during the output generation will be "generating", no matter what is going outside.

See Also:

GOMOutputInfo.checking, GOMOutputInfo.estimating, GOMOutputInfo.generating, GOMOutputInfo.estimationPhase