Open portal (Action)
See also: Open portal (Behaviour type), Open view (Action)
Event action – Abstract
Purpose: This opens a portal to which a data object can be passed and optionally waits for the return of a data object.
The Open portal (Action) event action opens a portal to which a data object can be passed and optionally waits for a data object to be returned.
Configuration
The configuration of the Open portal (Action) event action covers a wide range of application scenarios and therefore offers numerous parameters. These are presented below in a table and grouped by focus. The right column of the table always shows the relevant section of the configuration dialog.
Selection or definition of the portal to be opened |
|
The portal to be opened can either be selected under Portal name or provided as XML structure via the parameter Portal XML. If only the Portal name parameter is used, then the selected portal will open – if it exists, has been published at least once, and is applicable at runtime (see Association criteria, Company authorizations). If, on the other hand, the Portal XML parameter is used to provide the XML structure for a portal definition (see master field of a Portal entity) as a direct text input or as a return value of a resolver, then the corresponding portal appears at runtime. The Portal name parameter can then be used to override the default title ('Portal') in the portal. In doing so, the opened portal may also inherit the relevant help context (see Online help). |
►NOTE◄ By clicking on the gray arrow at the bottom left of the input field for the Portal XML parameter, it is possible to switch from direct input mode to the definition of a value resolver. |
Data association for the portal to be opened |
|
The value resolver in the Entity parameter defines a data object that is passed to the portal to be opened as form data if no Prepare profile is selected. If a Lobster_data profile is selected by Prepare profile, it is called synchronously with the data object as input data in SERVER XML format, waiting for a response from the profile in a selectable Profile output format (JSON, SERVER, CLIENT, TEXT, CSV, BYTE_ARRAY), which the portal to be opened receives as form data. |
|
Data return from the portal (optional) |
|
The optional Name of result variable can be used to specify the name of a variable that can be used to access return data from the opened portal, provided that:
If the Wait time (>0 seconds) elapses without Request close being executed, the portal is automatically closed and the return data is empty. If, on the other hand, the value 0 (default) is set as the Wait time, event processing is continued immediately after the portal is opened and without waiting for return data. |
►IMPORTANT◄ The Wait time must be >0 for the portal to be called 'synchronously' at all. Only then will return data from a Request close action be waited for in the portal. If the portal is closed without executing the Request close data action, the result variable remains empty. (see the Closable option below). |
Display behaviour of the portal |
|
If the Modal option is not checked (default), the portal should appear in a standalone view when opened. Then the Unique option decides whether the portal will be opened even if (at least) one instance of the portal is already open non-modally – i.e. as a standalone view. If the Modal option is checked, the portal will be displayed within the current view when it is opened. The Unique option will then be ignored. Additional options also appear in the configuration:
|
|
Example
Display'detailed information' on demand
In the following example, a portal is used to display certain detailed information on request in a dialog box when the user performs a certain action.
Specifically, the user of an overview for business objects is shown details of the user who last changed certain business objects in a 'business card' form.
Runtime example:
|
The 'business card' should display a text concatenation of the values from the 'user name' (username) and 'Name 1', 'Name 2' and 'Name 3' fields from the address of the user (address.name1/2/3) who last modified the business object in question. The text field below should display the 'Name 1' from the address of the company that owns this user account. In addition, an Image/Icon element (on the left) should reflect the user's profile picture (see Change profile picture), if one has been uploaded. |
The portal call should be controlled by a Custom action event in an event handling, so that it can be triggered by different actions (e.g. by clicking into a 'Custom column' of the overview or a ribbon macro).
Configuration:
After creating a Custom action event named 'Whois' (WHOIS), it can be assigned to an event handling as a Triggering event. A Check type is selected as the Validating rule, which is based on the type of Business transaction object, which is superior to all business objects. The 'business card' can be displayed with this configuration for Orders, Shipments, Manifests as well as for a Common business object. Since the portal is supposed to combine a few pieces of information from different entities (user and company accounts), these are then first 'assembled' and passed in variables:
|
|
Now another Execute with event action follows, whose Object resolver creates a new 'Client object' as a reference object via the Create instance value resolver. This data structure, which is undefined in terms of type and content, is then assigned the fields and values that the portal expects through a series of Set value event actions:
|
|
The 'Client object' contains – with the data from the runtime example – the data structure shown on the right in JSON format. |
{ "function": "Last modifier", "name": "Q - ☺ Karola Mustermann", "context": "Xflow AG", "pic": " img://avatar/user_avatar_1901.png?c=1583340638977 " } |
This data is still passed to the portal within the same Execute with event action:
|
|