Home > Platform > SolutionBuilder Guide > User Interface > Actions

Actions

06 Dec 2017Last updated
0votes
73updates
155views

Overview

Actions are buttons in the UI of the Solution Builder and Applications built with the help of the Solution Builder. Actions allow executing business logic either in the context of selected objects or without any context. 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), in the Side Panel (Preview Toolbar), in the Edit dialog, and in the bottom right-hand corner of grids (Floating Action Buttons). 

 

1.png

Creating an Action

To create an Action: 

  • Go to Matrix42 Administration > User Interface > Actions. Here users with appropriate permissions can manage (create new, edit, or delete existing) Actions. 
  • Click the Add Action button in the bottom right-hand corner of the Actions grid. 
     
  • In the Add Action dialog: 
    • Specify Title (this is the button text to be displayed in the Action), Internal Name (for internal use), Description (usually, more detailed than the Title), and select an Icon from the list of available options (to be displayed next to the button text); 
       
    • In the Appearance panel:
      • Position: specify the position the Action will take in the UI Zone you add it to; 
      • Device Visibility: specify whether you want the Action to be visible for Desktops only, for Mobile devices only, or for All devices. 
      • Applications: select Application(s) where the Action will be available (for users with appropriate permissions). 
      • UI Zones: click the field to display the list of available options; then select the UI Zone(s) where you would like the Action to appear: Edit dialog, Side Panel (Preview), Application Toolbar, Floating Action Button (grids, bottom right-hand corner). 
      • Enabled: leave selected for the Action to be displayed. Deselect the checkbox to hide the Action from the UI. 
        image.png
         
    • In the Implementation panel, select an action to perform when the button is clicked by selecting one of the radio buttons: 
      • Run Wizard
        3.png
      • Custom Controller
      • Open Url
      • Open Dialog
      • 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)
        WSO_IMPL.png
      • 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)

    Fill out the rest of the fields in the Implementation panel. Fields that follow depend on the above selected radio button.

    • In the Apply for Objects panel, specify: 
      • Target: click to select one of the available options
        • 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 Configuration Item or Web Service (select a radio button);
      • Type Filter: select one of the available options - All, Specified Only, All Except Specified - to be applied to the next field.
      • Select either Configuration Item(s) or Web Service(s) depending on the Filter by radio button selected above. 
      • Select Status Values and the State Filter
      • Provide a Filtering JavaScript Expression, if needed. The Action will only be available for objects for which the JS Expression is true. Refer to the Action Filters section below to learn more about the Filtering Expression.
        4.png
  • SAVE the Action. 

The Action will be available to users based on Audience settings.

Updating an Action

To modify an existing Action: 

  1. Go to Matrix42 Administration > User Interface > Actions. 
  2. Locate the Action in the grid and double-click it to open for editing. 
  3. Edit and SAVE the Action. Refer to the Creating an Action section above for detailed descriptions of all the controls available in the dialog.

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. 

Action 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

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.

 

Useful Links

Learn how to SET AUDIENCE for Actions. 

 

You must to post a comment.
Last modified

Tags

This page has no custom tags.

Classifications

(not set)
Customer
(not set)
icons-access-c.png