Application Modeller

Object Studio is designed to help you create small modular units for interacting with end-user applications. Traditionally, it would have been necessary to seek the services of a computer programmer in order to communicate with such an application. Object Studio opens this opportunity up to the business user, as well as the technical expert.

To this end, Object Studio introduces the Application Modeller. The Application Modeller allows you to run Blue Prism and your target application side by side, and invites you to teach Object Studio about the features of your target application, by pointing and clicking.

The teaching process – create new application elements

A new element representing a user interface element can be added to the Application Model by opening the Application Modeller and clicking "Add Element". By doing this, you are introducing Object Studio to a new feature of your target application. Such features are known as Application Elements. For the sake of example, we shall assume that you are introducing the "OK" button on the main window of your target application.

You should then give your new application element a friendly name. This could be any name of your choosing, but the name "Main Window OK button" might be most appropriate.

The next step is to click the "spy details" button. After doing this you will be given the opportunity to show the Application Modeller which application element you are talking about in your target application. Essentially, this will merely consist of making your target application visible (remember it will already be running at this stage), navigating to the button of interest and clicking on it.

In most cases, Blue Prism will be able to detect that the application element that you have identified using the spy tool is a button. On such occasions the combo box labeled "Element Type" will be populated with the "Button" option. In the rare case that Blue Prism has been unable to detect this fact Automatically, you will have to fill it in by selecting the most appropriate option from the drop-down list.

In some cases you may wish to associate a data type with the application element that you have identified. In the case of a button this would not be appropriate; but in the case of a data field that represents a number or a date, you would certainly want to choose the corresponding data type from the drop-down list. This allows Object Studio to do some intelligent data processing on the field, saving you the work of processing it manually.

Refining the data – attributes

At this stage you have identified the application element of interest and Object Studio has collected a lot of internal information about that application element. Some of this information is presented in the "Details" list. Examples include the text on a button (if the application element of interest really is a button), the location of the application element, which window it belongs to, etc. This information is presented row by row, with each row representing a piece of information. Such pieces of information are referred to as the attributes of the application element.

The attributes captured are used by Object Studio to identify the same application element at a later time, specifically when running the business object against your target application. You are now given the opportunity to give Object Studio a helping hand in identifying the application element at a later stage.

For example, Object Studio may have observed that your button has the text "OK", but having had more experience of the target application you are aware that sometimes the same button has the text "Save" depending on the circumstances. Not wanting Object Studio to be misled by its belief that the button will always have the text "OK", you should untick the "In Use" box beside the text element. By doing so, you instruct Object Studio to ignore the text on the button, and to use other attributes instead as a means of identifying the application element. In this sense, the text on the button is no longer "In Use".

Further refinements – attribute match types

Object Studio recognises that whilst some attributes change according to circumstances, they often change with a definite pattern. For example, a word processing package may have the window title "My Word Processor – Document 1", where "Document 1" is the name of the document currently being edited. The "My Word Processor" part of the title is always fixed and thus is of help in identifying the window.

For this reason, attributes may be matched against an expression rather than a fixed value. The expression is determined by a match type, and the match types that are available are:

  • Equal – Matches the given value exactly.
  • Not Equal – Matches only if it is anything other than the given value.
  • Less than – Matches if it is less than the given value.
  • Greater than – Matches if it is greater than the given value.
  • Less than or Equal – Matches if it is less than or equal to the given value.
  • Greater than or Equal – Matches if it is greater than or equal to the given value.
  • Wildcard – Matches against a wildcard expression in which * represents any or no characters, ? matches any single character and # matches any single number.
  • Reg Ex – Matches against a regular expression.
  • Range – Matches if it falls within a specific range of values (inclusive). The syntax for the value must be in the form X..Y i.e. the lower (X) and upper (Y) values are separated by two dots.
  • Dynamic – Matches an expression within Read, Write, Navigate, and Wait stages at runtime.

Different match types are available depending on the data type of the attribute value. So for example, Wildcard and Regular Expression are available for text based attributes, whereas Greater than and Less than, are available for number based attributes. There is also a special Dynamic match type available. Dynamic means that a specific value is not supplied for an attribute straight away when you design the business object, but that the value is supplied instead when the business object is running. For example if you open the document "Tax Return 2006" in your word processor as part of running the business object, you may supply the document name to a parameter so that the attribute can make use of it.

To alter the match type of an attribute, select the match type from the drop down box in the Match Type column. This will then match the attribute value against the selected criteria. Selecting “Dynamic” disables the value of the attribute in Application Modeller. Dynamic attributes can be set in the individual read, write, navigate and wait properties forms that reference the element. In the properties forms you will notice that the ... button is enabled, pressing it will allow you to enter expressions for the various attributes.

The following video demonstrates how to use Dynamic attribute match type.

Element masks

You may find that you want many elements within the application model to utilise the same attributes (eg. Class Name, Window Text, X and Y). In order to achieve this you can create an element with the attributes required, copy its "Element Mask" and then paste that mask onto other elements. This will enable the same attributes in the target element that are enabled in the source element, and also set the match types (Equals, Greater Than etc.) to be the same. Note that this will not set the values of the attributes – just their "In Use" / "Match Type" configurations.

To copy an attribute mask, right-click the source element and choose Copy Element Mask.

To paste an element mask, right-click the target element and choose Paste Element Mask.

Structure your application – groups

You will notice that there are two buttons underneath the tree view. One with the text "Add Element" and the other with the text "Add Child Element". If you click the second of these buttons, the effect will be to create a new application element as before, but it will be grouped underneath the currently selected element instead. In this sense the new element is considered to be a child of the first.

This ability to group elements provides you with a means of representing the structure of your target application. For example, if your target application consists of several different screens, you may need three or four "OK" buttons, one for each screen. By grouping each button under its parent window in the tree you may associate the buttons with their respective parents. This will aid in when searching the tree of application elements at a later stage (e.g. when editing the Read Stage Properties).

Note that such groupings are not of interest to Blue Prism and will not affect the behaviour of the business object. The facility to group your application elements is simply to allow you to represent your own mental map of the target application within the business object. It is not necessary to have your structure to reflect the true layout of your target application, or its internal workings.

Edit groups – deleting copying and moving elements

The Application Modeller treeview allows you to reorganise your application elements. Should you wish to delete an element, you may right-click the element and choose the appropriate option from the context menu. Please note that if you delete an element which has child elements, all of its children will also be deleted. If you wish to keep such children you should move them first.

To move an element you may simply drag it and drop it into its new location. If you drop one element on top of another, the dropped element will become a child of the other. If you drop one element in between two other elements, it will be placed between those two elements.

By holding the shift key during a drag-drop operation, you will cause a copy of the dragged application element to be placed in the end location, instead of moving it.

Filter the application model

The Application Model treeview can be filtered using the filter box above it. If any text is entered, the treeview will be scanned and any elements which match the specified filter will remain visible while any non-matching elements will be hidden.

The filtering is not case sensitive, and an element will match the filter if its name, description or any of the active attribute values contain the filter text. There is no wildcard or regular expression support.

While the tree is filtered, the tree is read-only – you can still change the attribute selection / values, but the structure of the application model cannot be amended.

Locate elements

After having defined your elements and made use of them in object studio stages such as the read , write or navigate stages, you may wish to locate all references to a particular element.

To this end, the search feature accepts a special syntax for searching for application elements.

Diagnostic snapshot

Blue Prism offers a Diagnostic snapshot feature that can be useful when troubleshooting problems. For more information, see Diagnostic Snapshot.