Using and manipulating named values
Named values enable you to provide the identity in human-readable naming conventions that help you differentiate between instances. However, no type conversions can be performed in the named values user interface, so you can only compare values of the same type. When you select a named value to use, only those that can be compared are displayed in the drop-down lists. Having fewer named values displayed than you are aware of might initially appear counter-intuitive, but it prevents comparing unlike types. Similarly, string operations are only permitted on strings.
Where such a restriction is enforced in the user interface, a green question icon is displayed, which links to the following explanations for the corresponding restriction:
- Why can't I apply transformations? Transformations are manipulations of string attributes, so they cannot be applied to non-string attributes.
- Why can't I see all named values here? Named values can be compared only with named values of the same type (for example, string with string, number with number, and so forth). Therefore, if you choose a named value of one type, not all other named values might be available for comparison.
- Why can't I select named values here? Named values can be compared only with named values of the same type. If there are no other named values of that type, then no values can be selected. Also, named values will not display from other trees in the drop-down list, or for named values defined on the Functional Component Definition that you are adding a condition for.
You cannot create named values based on date or time attributes.
The following table describes the transformations that you can apply to named values.
Append the specified string to the named value string.
Use the first n characters from the named value string, where n is specified as the index.
Convert any uppercase characters in the named value string to lowercase characters.
Use a section of the named value string. The character to start from is specified with index, and the length of the string is specified with length.
Prepend, or add the the specified string to the start of the named value string.
Use a regular expression to extract matching characters from the named value string.
Use the last n characters from the named value string, where n is specified as the index.
Extract the group of characters from the named value string using string as a delimiter. The index specifies which group to extract.
A table of key and value pairs. Where the named value string matches the left hand value, it is converted into the value on the right. The default value is used where the named value string does not match any of the values in the left hand column.
Remove leading or trailing whitespace characters from the named value string.
Convert any lowercase characters in the named value string to uppercase characters.
The following table shows examples of each of the transformations described in the previous table:
Using regular expressions in transformations
Using a complex regular expression (one that takes a long time to process) as a transformation can render the user interface unresponsive to all logged in users. For information on regular expressions in BMC Discovery, see Writing efficient regular expressions.
To create a named value
- On the Application Mapping tab, click Defined Named Value corresponding to a functional component.
- In Named Value Editor, choose a value from the Add New Transformation menu. This creates a transformation that applies a definition to the named value.
- Click Apply.
The transformation displays in the field below the Add New Transformation menu, marked with an X.
- In the Transformation field, type a value to see how the transformation applies to the corresponding name. In the following example, typing MYNAME in the field displays myname in the field corresponding to the selected transformation, indicating that the lowercase transformation works as expected.
If you type a value that exists in the datastore, the system will fetch the values and match the text, and then display those on the Editor. The following screen illustrates values for the process User Name being pulled from actual data in the datastore for each instance and applying the selected transformation to each one (in this example, a lowercase, prepended "I am the".
- Click the X near the transformations you have validated and want to remove.
- Repeat Steps 1 and 2 to add transformations that better define the value as necessary.
In the Make available as field, type the name of the identifier for an instance, select the Is identity check box, and click Apply.
Is identity option
The Is identity option applies only to one value.
After you have created values with names, you can also manipulate the values so that BMC Discovery can:
- provide the identity in human-readable naming conventions that help you differentiate between instances
- link all the components of an application instance
- make the names more logical to identify the application
In his questions to George in his PDF, Mike needs to know if there are both a Production and Development instance in the Friends application. Rather than wait for an answer and be blocked from further progress, he knows that there are two database instances (mellon, and mellon_dev), which clues him that the latter is the Development instance, and the former might be the Production instance.
Based on this assumption, Mike begins to define a named value for the database tier in the application to differentiate across the Production and Development instances. He notices that, in the Results section, there are some names assigned to the instances that would require stripping the names to match the Friends application. So, because the database has instances, he decides to check that attribute first.
- In Named Value Editor, click show all in the Attributes section to expand the list of attributes.
- Click the Instance attribute.
The Sample values show the mellon names that he was looking for.
- Transform the mellon instance to the Production instance, and mellon_dev to the Development instance.
- Make the value available as the identifier friends_db_id.
Next, Mike wants to run a PDF preview and verify with George that the model is taking shape. The PDF displays one page per functional component and a tree view of the functional component (which can also be used as an index). You can control the level of reporting in the PDF to respond to requests for more or less information, evaluate a bigger picture of the environment, or drill down to the details of the functional components and their relationships to all other nodes.
- From the Generate PDF Report dialog, choose the visualization detail you want to display in the report by selecting one of the following option buttons:
- No visualization — generates a report with no illustrative examples of the functional components and their relationships to other hosts.
- Functional Components only — generates a report with descriptive and visual information on functional components, but not about their relationships with other hosts.
- Functional Components and related hosts (the default) — generates a report with descriptive and visual information on functional components, including relationships with other hosts. For an example visualization, see page 10 of the example report.
The Generate PDF Report dialog displays any guidance or warning messages associated with your application mapping exercise to this point.
- If necessary, go back and make changes to the mapping in response to any messages.
- Click OK.
- Download the PDF and review it.
The PDF now contains visualizations of both the database and Web tiers of the Friends application. In the following example, the functional components are indicated by the gray boxes for both the database and Web tiers, and the rules that Mike defined for each tier are labeled inside the boxes:
Checking his e-mail, Mike notices that George has responded to his questions that he noted in his earlier PDF report, confirming that the Friends application contains both a Production and Development instance. This validates Mike's findings in the PDF report and gives him the confidence to send his latest report to George.
- Attach the PDF to an e-mail it to George for his feedback.
George is impressed that Mike was able to generate such a rich report with all the details of the application. More importantly, George is happy that Mike was able to map the application accurately and efficiently with little help.
Where to go from here
After you defined the rules for your application through named values, the final step in the mapping stage is to generate a pattern from the application definition. This step turns the results into a form that BMC Discovery can use at during normal discovery when you scan your estate, and so it can build the functional components and Business Application Instances (BAIs) and push them into BMC Atrium Configuration Management Database (BMC Atrium CMDB).