When designing your screens, you can create actions where the execution is triggered by an event such as clicking on a link or a button. These actions are called Screen Actions and are normally used to implement the business logic that implements business rules, for example, to validate and submit a purchase order.

How to Create a Screen Action

  1. In the eSpace tree, under the Interface layer, right-click on the screen and select Add Screen Action;
  2. Rename it as desired. Service Studio automatically opens the action flow on the Content Canvas. Design the behavior of the screen action.

A Screen Action can have input parameters and local variables. There are no output parameters in a Screen Action.

Flow of a Screen Action

You have a specific editor to design the behavior of Screen Actions, that is, their 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 Action.

Ending a Screen Action with an End

Most of the time, you'd like your web screen or web block action to simply end and "stay" in the same screen, keeping current execution context. This behavior is especially useful when submitting a web form. When validating the inputs provided by the end-user, you want to provide visual feedback to the end-user, preserving the values he/she typed in the screen (unless they have bee explicitly changed by your logic).

For this purpose, you must use the End element to end the screen action flow. When ending a screen action in this way, the screen will not be reloaded and will be redrawn according to the way that the Screen Action is being executed (for further details see below the section Executing a Screen Action):

There are some exceptions to the behavior described above for the end-user typed values:

When the form is finally submitted, you may want to reload your screen or simply flow to a different screen that, for example, lists all the records of a particular entity. In this situation, you must use a Destination element in your screen action, as you'll see in next section.

Redirecting a Screen Action to a Destination

When a particular path of a flow of any type needs to reload the current screen, or to redirect the flow to a different screen, or even to an external site, you must use the Destination element to end that path of the flow. This means that the destination screen is always loaded even if it is the current screen.

After dragging a Destination tool to the canvas, an (Undefined)Destination element is created in your flow. You must specify where the flow goes from here, by setting its Destination property. The possibilities are: All the screens and external sites that are graphically connected to the current screen, all the screens and external sites that were created as a Frequent Destination and the current screen itself.

Screen Action Scope

Screen Actions are executed in the scope of the screen. Therefore, when editing expressions in your screen action flow, you have access to the following elements in the scope:

Anyway, when you're editing your screen action 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 the variables tree of the Select Variable window, in a case where you're trying to use a variable.

Executing a Screen Action

Screen Actions must be explicitly invoked by its interactive elements, just by setting the Destination property of these elements:

See Also

About Actions | Action Flow Editor | Widgets with Ajax Capabilities