Service Studio 6.0 Help
Create the Screen Preparation
When designing your screens, you can create an action that is executed before the screen is rendered; this action is called a Screen Preparation. Typically, it includes the preparation of variables, queries to the database, etc.; in fact, all the logic that must be interpreted before the screen is displayed.
|
How to create a Screen Preparation: |
|
|
Flow of a Screen Preparation
You have a specific editor to design Screen Preparation behavior, that is, its action flow. In this editor, you can select any tool available in the Action Flow Toolbox to be executed in the action flow of your Screen Preparation.
Flow of a Web Screen and Email Screen Preparation
In Web Screens, the Screen Preparation may execute in one of two situations:
While the screen is loading
While the screen is being redrawn, after executing a screen action that ended with the End element.
A Web Screen is loading when it's being entered from:
An
Entry
point (i.e. when typing the url in the browser).
A
,
,
Destination
element in a flow.
A
Button
or
Link
whose Destination property is set to a Web Screen. This applies even if
the chosen destination is the current screen.
Therefore, if there is logic that you exclusively want to execute when the screen is loading (for example, a query to fetch records to display in the screen), you must explicitly test this situation using the built-in function IsLoadingScreen.
On the other side, when the screen preparation is executed after a screen action flow that ended with an End element, all the elements in your scope keep their value.
As in SMS screens the screen
is always loaded before rendering, this section does not apply.
In most cases, the screen preparation action
flow terminates with an
End element. You can have more than one End element
in the action flow, for visualization purposes. In some situations, you
may want to, based on some logic, redirect the flow to a different screen
by using a
Destination
element.
When editing expressions in your screen preparation flow, you have access to the following elements in the scope:
Screen input parameters, screen local variables and the runtime properties of widgets,
Queries invoked in the screen preparation,
Execute Action output parameters of the screen preparation. To use them in, for example, an Assign element, the Execute Action must precede the Assign in all paths to the Assign element in the screen preparation flow.
Anyway, when you're editing your screen preparation flow, all the elements available in the scope are present in the Scope tree of the Expression Editor, in a case where you're editing an expression; or in a case where the variables tree of the Select Variable window, in case you're trying to use a variable.
Executing a Screen Preparation
The Screen Preparation is executed automatically, therefore, you don't
have to explicitly invoke it. However, if you are executing
your screen action using Ajax the Screen Preparation is
not executed when the action flow ends with an
End.
After executing the Screen Preparation, the screen starts rendering.
See Also