User interfaces

The user interfaces (UI) section sets an end user interface for users to interact with content, tasks and processes for the project using the Alfresco Digital Workspace.

Properties

The basic properties of a user interface are:

PropertyDescription
UI nameRequired. The name of the interface. Must be in lowercase and between 1 and 26 characters in length. Alphanumeric characters and hyphens are allowed, however the name must begin with a letter and end alphanumerically, for example order-template.
UI descriptionOptional. A description of what the interface should be used for, for example A template for orders to follow.

Create a user interface

To create a user interface:

  1. Sign into the Modeling Application and open a project.

  2. Click the NEW dropdown.

  3. Select how to create the interface:

    • Create > UI creates a new, empty user interface.

    • Upload > UI allows for uploading an existing user interface into the Modeling Application.

    Alternatively use the + or Upload buttons next to UI in the left-hand menu.

  4. Enter a name and optional description.

User interface modeling

Once a user interface has been created, set the type to content to deploy the Digital Workspace with the application. This can be accessed by users once a project has been deployed using the format ui/<name>, for example https://alfresco.com/finance-project/ui/content-app.

Note: An instance of Digital Workspace will be deployed with each application that can only start processes created within that same application. Only users assigned user access to the application will be able to access the interface.

Custom end user actions can be created for the Digital Workspace. This enables custom options to be added to various menus displayed to users. Rules can be set for the actions to only display on files or folders with specific names, or when an aspect is applied to a node. There are three parts to defining custom actions:

  • The action itself that will executed when the option is clicked.
  • A list of one or more rules to describe which nodes the action will be displayed on.
  • The feature the action will be displayed on, for example the header or a context menu.

Actions

There are four types of end user actions that can be configured:

  • Events that are used in conjunction with a trigger to start a trigger action when clicked by a user.
  • Forms that display a form to the user to fill in, independent of a user task or process.
  • Navigation to set a URL to redirect to when clicked by the user.
  • Start process to start a named process when clicked by the user, and optionally include the file the action was launched from when clicked.

Event

Event actions are directly referenced by triggers when they are clicked. This means that an action can post a predefined message to a Slack channel or send an email notifying an email group about the document.

Note: If a user interface trigger action is not created that references the event action then nothing will happen when the action is clicked by an end user.

The properties of an event action are:

PropertyDescription
NameRequired. The name of the action. Note: This is not the text that will appear to the end user in a menu.
TypeRequired. The type of action will be Event.
Use selected nodes in actionOptional. Sets whether the nodes selected when the action is clicked can be used in the event or not, for example true.

Form

Form actions open a form in Digital Workspace that users can fill in when the action is clicked. The form in question can be completely independent of a process and user task. Forms allow users to enter some information and use the output, for example to use a trigger on the form submission event.

The properties of a form action are:

PropertyDescription
NameRequired. The name of the action. Note: This is not the text that will appear to the end user in a menu.
TypeRequired. The type of action will be Form.
FormRequired. The name of the form to display when the action is clicked.
Use selected nodes in actionOptional. Sets whether the nodes selected when the action is clicked can be used in the form or not, for example true.

Navigation

Navigation actions open a link when they are clicked by an end user. The link can be relative, for example opening another document from the repository, or the link can be absolute, such as to open another application.

The properties of a navigation action are:

PropertyDescription
NameRequired. The name of the action. Note: This is not the text that will appear to the end user in a menu.
TypeRequired. The type of action will be Navigation.
TargetRequired. The absolute or relative link the action will direct to, for example https://wikipedia.org.
Open in new tabOptional. Sets whether the link opens in a new tab or not, for example false.
Use selected nodes in actionOptional. Sets whether the nodes selected when the action is clicked can be used in the navigation URL or not, for example true.

Note: The Target can use the variable ${nodes} if Use selected nodes in action is set to true to pass the node ID to the link, for example personal-files/(viewer:view/${nodes})?location=%2Fpersonal-files.

Start process

A start process action will start a process when the action is clicked. If the selected process contains a form on the start event with an attach file field and Use selected nodes in action is set to true, then the file that was selected when the action was clicked will be attached to it automatically.

The properties of a start process action are:

PropertyDescription
NameRequired. The name of the action. Note: This is not the text that will appear to the end user in a menu.
TypeRequired. The type of action will be Start process.
ProcessRequired. The name of the process to start when the action is clicked.
Use selected nodes in actionOptional. Sets whether the nodes selected when the action is clicked can be used in the process or not, for example true.

Rules

Rules are used to define when an action is displayed to the end user. This is achieved using a series of evaluators, operators and optional nested groups.

Rule groups must:

  • All be met for the action to display using Every.
  • At least one met for the action to display using Some.
  • Must not be met for the action to display using Not.

Note: Individual evaluators in a rule can be set to evaluate negatively using the ! against them. For example, if the evaluator app.navigation.isTrashCan is set to evaluate negatively then the user must not be in the trashcan for the action to appear.

Some evaluators take additional operators such as contains, equals or matches. For example, the evaluator selection.currentFolder.name can use a fully qualified folder name such as Invoices or use a regular expression such as ^(I|i)nvoices.

Application evaluators

Application evaluators check a user's permissions on files and folders to set whether action will be displayed.

The application evaluators are:

EvaluatorDescription
app.selection.canDeleteUser has permission to delete selected node(s).
app.selection.canDownloadUser can download selected node(s).
app.selection.notEmptyAt least one node is selected.
app.selection.canUnshareUser is able to remove selected node(s) from public sharing.
app.selection.canAddFavoriteUser can add selected node(s) to favorites.
app.selection.canRemoveFavoriteUser can remove selected node(s) from favorites.
app.selection.first.canUpdateUser has permission to update selected node(s).
app.selection.fileA single File node is selected.
app.selection.file.canShareUser is able to share the selected file.
app.selection.file.isSharedA shared node is selected.
app.selection.file.isLockedFile is locked for editing.
app.selection.file.isLockOwnerFile is locked and current user is the lock owner.
app.selection.file.canUploadVersionUser can update file version.
app.selection.libraryA single Library node is selected.
app.selection.isPrivateLibraryA private Library node is selected.
app.selection.hasLibraryRoleThe selected Library node has a role property.
app.selection.hasNoLibraryRoleThe selected Library node has no role property.
app.selection.folderA single Folder node is selected.
app.selection.folder.canUpdateUser has permissions to update the selected folder.
app.selection.file.canLockUser has permissions to lock file.
app.selection.file.canUnlockUser has permissions to unlock file.
repository.isQuickShareEnabledWhether the quick share repository option is enabled or not.
canCopyNodeChecks if user can copy selected node.
canToggleJoinLibraryChecks if user can perform 'Join' or 'Cancel Join Request' on a library.
canEditFolderChecks if user can edit the selected folder.
isTrashcanItemSelectedChecks if user has trashcan item selected.
canViewFileChecks if user can view the file.
canLeaveLibraryChecks if user can Leave selected library.
canToggleSharedLinkChecks if user can toggle shared link mode.
canShowInfoDrawerChecks if user can show Info Drawer for the selected node.
canManageFileVersionsChecks if user can manage file versions for the selected node.
canManagePermissionsChecks if user can manage permissions for the selected node.
canToggleEditOfflineChecks if user can toggle Edit Offline mode for selected node.
user.isAdminChecks if user is admin.
app.canShowLogoutWhether logout action should be present or not.
app.isLibraryManagerChecks if user is library manager.

Navigation evaluators

Navigation evaluators use the location within the repository structure to set whether an action will be displayed.

The navigation evaluators are:

EvaluatorDescription
app.navigation.folder.canCreateUser can create content in the currently opened folder.
app.navigation.folder.canUploadUser can upload content to the currently opened folder.
app.navigation.isTrashcanUser is using the Trashcan page.
app.navigation.isNotTrashcanCurrent page is not a Trashcan.
app.navigation.isLibrariesUser is using a Libraries or Library Search Result page.
app.navigation.isNotLibrariesCurrent page is not a Libraries page.
app.navigation.isSharedFilesUser is using the Shared Files page.
app.navigation.isNotSharedFilesCurrent page is not Shared Files.
app.navigation.isFavoritesUser is using the Favorites page.
app.navigation.isNotFavoritesCurrent page is not Favorites.
app.navigation.isRecentFilesUser is using the Recent Files page.
app.navigation.isNotRecentFilesCurrent page is not Recent Files.
app.navigation.isSearchResultsUser is using the Search Results page.
app.navigation.isNotSearchResultsCurrent page is not the Search Results.
app.navigation.isSharedPreviewCurrent page is preview Shared Files.
app.navigation.isFavoritesPreviewCurrent page is preview Favorites.
app.navigation.isSharedFileViewerCurrent page is shared file preview page.
app.navigation.isPreviewCurrent page is Preview.
app.navigation.isPersonalFilesCurrent page is Personal Files.
app.navigation.isLibraryFilesCurrent page is Library Files.

Node property evaluators

Node property evaluators use the types, aspects and properties of folders and files to set whether an action will be displayed.

The node property evaluators are:

EvaluatorDescription
selection.files.typeAll the selected files are of the input type.
selection.files.aspectAll the selected files have the input aspect.
selection.files.propertyAll the selected files have the indicated property and their values satisfy the condition.
selection.files.nameAll the selected files match the condition in their name.
selection.folders.typeAll the selected folders are of the input type.
selection.folders.aspectAll the selected folders have the input aspect.
selection.folders.propertyAll the selected folders have the indicated property and their values satisfy the condition.
selection.folders.nameAll the selected folders match the condition in their name.
selection.currentFolder.typeThe current folder is of the input type.
selection.currentFolder.aspectThe current folder has the input aspect.
selection.currentFolder.propertyThe current folder has the indicated property and their values satisfy the condition.
selection.currentFolder.nameThe current folder matches the condition in their name.

Features

A user action can be associated to a feature once it has been defined and the rules for when to display it have been configured. This determines in which menu or view the action is displayed.

The properties to configure the action feature are:

PropertyDescription
TitleRequired. The text displayed to the end user in the menu, for example Start invoice process.
DescriptionOptional. The tooltip for the action in the menu, for example Start the invoice process with the intial invoice attached..
IconRequired. The icon that will be displayed to the end user in the menu next to the Title.
OrderOptional. The order the action will appear in the menu list. The higher the number the lower down the list, or further right in a list it is displayed.
ActionRequired. The selected action to execute.
VisibilityOptional. The rule to use for evaluating whether a user can see the action.
EnabledOptional. The rule to use for evaluating whether the action is enabled or not.

Actions can be displayed in different parts of the Digital Workspace by associating them with different features.

Application header feature

The application header will display an action next to the search bar and user information:

application header image

Application header menu feature

The application header menu will display an action in the application header menu next to items such as Settings and About:

application header menu image

Application toolbar feature

The application toolbar will display an action underneath the header where items such as a breadcrumb are normall placed:

application toolbar image

Dropdown button feature

The dropdown button will display an action in the left-hand menu as a new item:

dropdown button image

Context menu feature

The context menu will display an action in the menu displayed when right-clicking a node:

context menu image

Sidebar feature

The sidebar will display an action in the properties sidebar:

sidebar image

Sidebar toolbar feature

The sidebar toolbar will display an action on the toolbar within the properties sidebar:

sidebar toolbar image

Viewer feature

The viewer will display an action on the file viewer page:

viewer image

Viewer toolbar feature

The viewer toolbar will display an action on the toolbar located on the file viewer page:

viewer toolbar image

Viewer toolbar menu feature

The viewer toolbar menu will display an action in the dropdown menu in the toolbar located on the file viewer page:

viewer toolbar menu image

Viewer shared feature

The shared viewer will display an action on the file viewer page of a shared file:

viewer shared image

Viewer shared toolbar feature

The shared viewer toolbar will display an action on the toolbar located on the file viewer page of a shared file:

viewer shared toolbar image

Custom user interfaces

Custom user interfaces can be developed with the Application Development Framework and deployed as part of the project.

User interrace actions

The actions that can be run against an interface are:

ActionDescription
Download UIDownload the JSON for the interface.
ValidateRun validation against the interface. Any errors can be seen in the log history at the bottom of the Modeling Application and are flagged in a pop-up box.
SaveSave any changes made to the interface.
DeleteDelete the interface.

© 2023 Alfresco Software, Inc. All Rights Reserved.