Much like a Process, a User Activity is one or more Activities executed in a sequence to automate a task. What makes User Activities so powerful is that you can define a sequence once, and then use it from any Process or even other User Activities!
- Activity Library
- Command Ribbon
- Add User Activity
- User Activity Editor
- Activity Library Properties
- Input and Output Arguments
- Working With User Activities
One of the biggest challenges with automation, especially automation of a user interface, is responding to change. User interfaces change over time. Sometimes the steps we take to complete a task change. If our automated processes were littered with copies of the same set of activities over and over, any change would require a significant effort to track down all those references and repeat the updates. User activities allow you to define that sequence once, and then reuse it everywhere you need it. If the sequence changes, all you must do is update the one user activity and all your processes will work again.
Not only can user activities reduce maintenance, they also make it easier to understand your processes. Think of all the steps necessary to perform a checkout of an online store including all the fields that must be filled out and potential navigation of multiple pages. For a user who looks at a process for the first time, all the activities must be read and understood. Now imagine you could replace all those activities with a single activity called "Checkout". That's exactly what you can do with user activities!
An Activity Library is a collection of one or more User Activities. Typically, all the User Activities in a library are related, but they do not have to be. You can create as many or as few libraries as you wish to meet your organizational needs.
Creating a New Activity Library
From the Command Ribbon, click the File tab to open the Backstage Menu, select the Home tab if it is not already selected, and click the New Activity Library button. This will open a new, blank Activity Library Editor.
Opening an Existing Activity Library
From the Command Ribbon, click the File tab to open the Backstage Menu.
On the Home tab, recently opened libraries will appear in the Recent Files list (1). Alternatively, click the Open command (2) to open a standard File Open dialog to select the file to open. An Activity Library file is stored on the file system using the
.ablibrary file extension.
You can use the Pin (3) to pin any file to the top of your Recent Files list for easy access.
When an Activity Library is the selected document, a special File Tools tab will be displayed on the Command Ribbon:
The following commands are available:
- Reload Library
- The library will be reloaded from the file. Useful if you need to revert your changes or if the file has been modified externally.
- Library Properties
- Opens the Properties dialog for the library.
- Add User Activity
- Adds a new User Activity to the library.
- Delete User Activity
- Deletes the User Activity from the library.
- User Activity Properties
- Opens the Properties dialog for the selected User Activity.
- Activity Calls Group
- This group contains additional commands used to insert activity calls into the selected User Activity.
Add User Activity / User Activity Properties
Select the Add User Activity command from the Activity Library tools on the Command Bar. This will open the User Activity Properties dialog for the new activity. The same dialog is shown when using the User Activity Properties command for an existing User Activity. Populate the properties for User Activity and click OK to add it.
This tab displays general properties for the User Activity:
- The name to be given to the User Activity.
- The category where your User Activity will be organized. You can create nested categories by including the backslash character between category names (e.g.
- If the name alone is not enough to fully understand what your User Activity does, a description can be provided. Users who utilize your library will not be productive if they must open and view the activities to understand what it does, so provide a description when needed. In general, it is best to describe what your User Activity does, not how it does it.
This tab displays advanced properties:
- A unique identifier for the User Activity. This is how your User Activity is tracked and is provided for informational purposes only.
User Activity Editor
The Activity Library Editor is almost identical to the Process Editor. The only difference is the drop-down control at the top of the editor. When you have multiple User Activities defined, the control at the top is used to display the current activity and allow you to switch to other activities.
The Activity (1) drop-down at the top of the editor allows you to switch between the different User Activities defined in the library.
The Activity Calls (2) that will be performed when executing the User Activity are displayed in the top half of the editor (by default). The following columns display information about the Activity Call:
- The category and name of the Activity that is being called.
- Defines any user interface Element that will be interacted with by the Activity. If an Element Nickname was provided, it will be displayed here. Otherwise, the identifying information you provided will be displayed instead. If the value
n/ais displayed, that indicates that the Activity does not interact with a user interface Element.
- Input & Output
- A list of any significant Input or Output Arguments and their corresponding values. An Argument is significant if a value has been defined or if the corresponding Parameter is required. Rarely, some Activities may also mark a Parameter as significant even if the value is not required or populated.
- A list of any non-default options that might impact how the Activity is executed.
The Instructions Pane (3) is displayed in the bottom half of the editor (by default) for the selected Activity Call. This is where you provide the details needed by the Activity during execution. The tabs along the left of the Instructions Pane organize the details into these categories (when supported by the Activity):
- How to identify the user interface Element.
- The values being passed as Input and Output Arguments to the Parameters defined by the Activity.
- Additional options related to the Activity Call.
The Activity Library Editor provides several features to customize the user interface to meet your individual needs or tastes.
- You can auto-hide the entire Instructions Pane (3) by clicking the Pin button (4) in the title bar of the pane. This will allow the Activity Calls List (2) to be displayed full-screen and hide the Instructions Pane behind a tab. If you then hover over the tab, the Instructions Pane will automatically expand. It will hide again if you move the mouse away from the pane or select other controls. Click the Pin button again to stop the pane from auto-hiding and dock it at the original location.
- The size of each pane can be adjusted by clicking and dragging the Resize Bar between the two panes.
- If you prefer the Instructions Pane (3) to be positioned on the right instead of the bottom, you can click on the Title Bar of the pane and drag it toward the right edge of the Activity Library Editor window. Guides will display on the screen as you drag the window. Release the mouse over the right or bottom guide to dock the pane on that side.
- If you prefer the Activity Calls List (2) to display the details of each call in a single line, right-click on the list and select Compact View from the context menu. Repeat the process to turn the feature off. Each view has benefits over the other, so you can easily switch between the view styles as needed.
Activity Library Properties
The Library Properties command on the Command Ribbon will open the Activity Library Properties dialog where properties are represented on individual tabs.
This tab displays general properties for the Activity Library:
- Default activity category
- User Activities are organized by categories. This setting determines the default category that will be assigned to new User Activities.
The User Activities in a library can use User Activities defined in other libraries, but they must be referenced. This tab allows you to manage those references. The following commands are available.
- Prompts you to select an Activity Library file to be added as a reference.
- Removes the reference to the selected Activity Library.
- Reloads the referenced Activity Library that is selected. Useful if the library has been modified outside of the tool since it was opened.
- Opens the editor for the referenced Activity Library that is selected.
To allow User Activities to interact with elements defined in a shared UI Repository they must be referenced. This tab allows you to manage those references. The following commands are available.
- Prompts you to select a UI Repository file to be added as a reference.
- Removes the reference to the selected UI Repository.
- Reloads the referenced UI Repository that is selected. Useful if the repository has been modified outside of the tool since it was opened.
- Opens the editor for the referenced UI Repository that is selected.
Input and Output Arguments
Most User Activities will require data to be passed to the activity. For example, a Login activity for an application would typically allow the user name and password to be passed. By allowing data to be passed in, your activity will be more flexible in what it can do.
You must define a variable that will hold the value which is passed to your activity. Use the Variables Tool Window to create one or more variables that will be available as input. For the login example, you might create a variable called
UserName and another called
Promote Variable to Input Parameter
After you create your variables, you will need to promote them to Parameters. This will expose the variable to be populated when calling the activity.
- Expand the Parameter Details section of the Variable Properties.
- Check the Allow values to be passed as Input Parameter option.
Now any time your User Activity is called, you can define the initial values for those variables. If you also check the Require value to be populated option, that will force the value to be defined when calling the User Activity. If not required and a value is not explicitly defined, the Default Value defined for the variable will be used.
Promote Variable to Output Parameter
Sometimes you may also need to pass data back from your User Activity. An activity designed to checkout of an online shop may need to output an Order Number that could be used by other activities. Just as with Input Parameters, you accomplish this by creating a variable to hold the value. In the Parameter Details section, check the Expose final value as Output Parameter option and the value of the variable after execution of your User Activity will be passed back.
Working with User Activities
The best part of User Activities is that you use them just like the built-in activities! When your Activity Library is loaded, your User Activities will be displayed in the Activity Tool Window using the Category you defined. When selected, all the details you provided will be visible as well. You can pin your activities as favorites for easy access and drag-and-drop the User Activity into a Process to call it.