When an Ftscript is run, each activity passes through the following states:
initialization
execution
end
(error)
Initialization
The context is provided.
Execution
In the case of external activities, the openFT functionality is executed.
In the case of internal activities, the corresponding statement is executed.
If an error occurs during the execution of an activity than an error (or fault) is output together with an error code. The activity switches to the "error" state.
End
The end of the activity is reached if execution is terminated without an error. Data may be displayed in the higher-level context.
The activity is terminated. Processing continues with the next activity.
If there are no further activities then the Ftscript is terminated.
Error
The "error" state may be caused by:
an error occurring during the execution of the activity itself
an error in a child activity which is not intercepted by a faulthandler
A suitable faulthandler is searched for in the current context (see section “faulthandler”). The activity is replaced by the content of the faulthandler. In this case, the context objects of the activity are displayed in the faulthandler. All the activity's child activities are aborted and their contexts are lost. If these child activities have started file transfer requests then these are also aborted.
If no suitable faulthandler is found then the error is passed to the parent activity. The parent activity switches to the "error" state.
If no suitable faulthandler is found in any of the higher-level activities then the entire Ftscript is terminated.
Diagnostic information
You can activate a trace in order to conduct a precise analysis of the Ftscript run (including restart, see section “Restart”):
ftscript -t <Ftscript file name>
The trace logs every action in the request.