Global actions let you open application-wide entry points from the main menu, such as a ViewModel for finding or browsing objects, and are for users who need to begin work without first selecting a specific object.
Contents
What is a global action?
A global action is a user action that appears in the main menu. It is not tied to a selected instance of a class and commonly opens a user interface based on a ViewModel.
Use a global action when the user needs to start from an application-level task. For example, an action named Find customers can open a ViewModel where the user searches for a customer before continuing work in another view.
Common global-action views
Global actions often open an un-rooted view. An un-rooted view does not start from one already selected object.
| View type | Purpose | Example |
|---|---|---|
| Seeker | Helps the user search or filter a large set of objects in the database. | A user opens Find customers, enters search criteria, and identifies the customer to work with. |
| Browser | Shows all available instances of a class. | A user opens Browse products to review the available Product instances. |
A seeker is appropriate when users need to narrow a large result set. A browser is appropriate when showing the available instances is the intended starting point.
Choose the right action type
User actions have three types. Choose the type according to what starts the work.
| Action type | Where it is available | Use it when | Example |
|---|---|---|---|
| Global action | Main menu | No particular object must already be selected. | Open a customer seeker. |
| Class action | When an instance of its class is selected or shown in the user interface | The action acts on an object instance. | Perform an action for the selected Customer. |
| ViewModel action | One specific ViewModel | The action depends on what the user is currently focused on in that view. | Act on the current or selected item in a grid. |
The main decision is whether the action requires an existing object context:
- Choose a global action when the user must first locate, browse, or otherwise choose what to work with.
- Choose a class action when the action should be available for instances of a particular class.
- Choose a ViewModel action when the action belongs to one view and uses that view's current focus or selections.
Design example
Assume an application has a Customer class.
- Create a ViewModel that lets users find or list Customer instances.
- Make that ViewModel available through a global action in the main menu.
- Let the user select a customer in the opened seeker or browser.
- Continue with the customer-specific work in the relevant view.
In this example, Find customers is global because the user has not selected a Customer when starting. An action such as one that acts on a selected Customer belongs to a class action instead.
Verify the model
Validate the model after defining or changing actions. The model must be clean, with no errors, before you run it in the Prototyper or deploy it. Validation runs when you save the model, and you can also run it manually; see Verify.
