Action is the User Interface element of the UUX, which is representing some operation which allowed to be run in current execution context. The SolutionBuilder conceders multiple variables to define the execution context, like current UUX Application, or concrete selected Management Area, selected Object or multiple Objects and their statuses. Analyzing the Action configurations and current context, the SolutionBuilder dynamically renders the available Actions and various possible UUX UI Zones.
Actions are entities outlined in red in the screenshot below. As you can see, Actions can be located in different UI Zones: in the Application Toolbar (at the top of the screen) (3), in the Side Panel (Preview Toolbar or Grid Context Menu) (2), in the Edit dialog, and in the Floating Action Buttons (1).
Regardless from the defined Action UI Zone, the most popular actions can appear in the Dataset View Context menu (mouse right click)
There are certain predefined Actions in the platform which cannot be modified. Examples of such Actions are Add, Edit, Save, Done, and Delete. Visibility of predefined Actions is determined by:
- for Add, Edit, Save - availability of dialog of type Add/Edit AND User Role permissions to create, update, insert the Configuration Item.
- for Delete - User Role permission to delete the Configuration Item.
Specifies the general settings of the Action
Title, the action display string, which appears in UUX. The value is localizable
Icon, the icon, associated with the Action
Internal Name, unique name of the Action
Position, setups the ordering position of the Action. The Actions with smaller Position value appears on the top of the list (or first in Toolbar panel).
Device Visibility, allows restrict the Action presence depending on the used device. In some particular cases, the Action could have sense only on Desktop decides, or otherwise around, only for Mobile. For instance, when Action triggers opening a massive wizard which cannot be displayed on Mobile, this action could be allowed only for Desktop, and for Mobile version, the Action could be either omitted or more lightweight version be introduced (in this case, the Action for Mobile device, be disabled for Desktop)
Applications, defines the list of UUX Applications where the Action is allowed. For instance, for the same Object "Order" action "Withdraw" can be present for the End User in Self Service Portal, but it should not be present for Service Catalog Manager in Service Catalog.
If no Application is specified for the Action, the Action is available for all Applications
UI Zones, specifies the UUX area where the Action appears. See the UI Zones
Enabled, indicates whether the Action is enabled.
The section allows to configure an operation which will be executed on clicking the Action in UUX.
- Run Workflow (the advantage of such approach is that you can create workflows in the Workflow Studio without any coding by using the rich Workflow Activity library. You can use any workflow with the Action Integration Context in actions. A workflow takes the list of selected objects as an input argument and can be used to process these objects in a sequence or as a batch)
- Service Operation (action can be configured to execute service and show confirmation text before. It is possible to change text to other than standard also it is possible to setup automatic related object dialog opening if action succeeded)
- Open Create Dialog to create any new object available in the System.
Use Case Example: Create KnowledgeBaseArticle from a Problem, i.e. you create an Action available for Problem that opens the Create Dialog of the KBA.
- Open Edit dialog for action's context to open the Edit dialog for editing an object relevant to context with the highest priority. You can also specify a dialog (optional) from filtered list by chosen Configuration Item. In this instance, Type Filter 'Specified Only' as well as only one chosen Configuration Item are mandatory.
Use Case Example: Create Dialog with single attribute with lower priority and use it in the action for changing single attribute for selected object.
- Open Url
- Custom Controller
- Run Wizard
Apply for Objects
The Section allows setup additional filtering criteria, which more accurate check the present execution context, to identify whether the Action is relevant and has to be displayed in UI.
Target, specifies the Object context required for the Action
- No Object Context (to execute business logic without any context),
- Single Object (to execute business logic in the context of one selected object),
- Multiple Objects (to execute business logic in the context of at least one selected object);
Filter by, define the filtering type of the selected Objects. In case the selected Objects are standard Configuration Items objects, the option "Configuration Item" need to be used.
Type Filter, specify the list of Object types (Configuration Items) for which the Action is applicable.
State Filter, Status Values, both attributes specifies the statuses of the context Objects for which the Action is relevant. Usually Status of the Object is represented by property SPSCommonClassBbase.Status, but the Status attribute can be changed in the appropriate Configuration Item Dialog, on Advanced Tabulator.
If the Statuses are configured for Action, the Action be visible only when the selected object(-s) status fits the Action configuration
Calculating Action Availability
The SolutionBuilder in runtime automatically decide which Action is available in current execution context, and as soon as the Context is changed, it immediately recalculates the actions and displays only the relevant, to avoid the End-User see and run an Action which is not applicable .
For each Action, enabled in Solution Builder, the System uses the following flow to decide whether the Action is permitted:
One and the same Action can be configured to appear in several places, for example, if you select the Side Panel UI Zone for an Action, it can be configured to be available both in the Toolbar of the Object Preview and in the context menu which appears when you right-click the object in the grid (Dataset View).
console.log($object) == 1
You can see the expression result in browser console (press F12)
Please check the standard action "Accept" for Tickets as an example. The Action "Accept" has to be present for all not-closed Tickets, but should not be visible if the Ticket is already accepted by current user.
HOW TO: Filter an Action based on a Data Attribute
To allow filtering an action based on some data attribute, please follow the steps:
- Add a filter condition as extra column to Data Query used in data view for corresponding object.
Use Display = None to leave the column hidden in all cases but available in data view model.
- Add a calculated property with the same name to entity source data model of preview widget template.
Provide the required validation expression in property definition.
Both column and calculated property values must return true or 1 to show action and false or 0 to hide it.
Make sure to replace 'UsageDetectionEnabled' with your validation property name.
HOW TO: Filter an Object Preview Action based on a Data Source
To allow filtering an Object Preview action based on data source, please follow the steps:
- Add Recalculate Actions (non visual controls) on object preview layout designer.
- Apply Recalculate Source State and Recalculate Conditions properties with source state.