Skip to main content
Matrix42 Self-Service Help Center

Actions

Overview

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.

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)

ActionUIZone.png

 

Regardless from the defined Action UI Zone, the most popular actions can appear in the Dataset View Context menu (mouse right click)
 

Predefined Actions

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. 

 

Properties

General

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

Appearance

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.

Implementation

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)
    ServiceOperation
  • 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.
    OpenCreateDialog
  • 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.
    OpenEditDialog
  • Open Url
  • Custom Controller
  • Run Wizard
    RunWizard
  •  

Apply for Objects

4.png

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

Filter Javascript Expression, javascript  logical expression which evaluates the selected objects, and only when expression result is true, the Action is displayed for the object, For more details read Actions Filter

 

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:  

ActionFilter.png

Action Javascript Filters

The Filtering JavaScript Expression box at the bottom of the New/Edit Action dialog allows users to specify additional filtering conditions for the Action. The Action will be available only when ALL the conditions specified in the Action dialog, including the one(s) provided in the Filtering JavaScript Expression, are met. The Filtering JavaScript Expression box allows for two contexts: current object and current user. The Action will be available only when the provided logical JavaScript Expression is true. 

ActionFilter1.jpg

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).

ActionFilter2.jpg

The Object Preview and Dataset View have different data sources. Provide a JavaScript Expression for each of the UI Zones where you need this Action to be displayed.

ActionFilter3.jpg

To understand better the structure of the $object which is used in Javascript Expression, you can type the expression
console.log($object) == 1
You can see the expression result in browser console (press F12)

Example 
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:

  1. 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.
  2. 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.
  3. Set Filtering JavaScript Expression for the action.
    Make sure to replace 'UsageDetectionEnabled' with your validation property name.
  • Was this article helpful?