Default language.

Information
Important This documentation space contains information about the SaaS version of BMC Helix Discovery. If you are using the on-premises version of BMC Helix Discovery, see BMC Helix Discovery 25.2 (On-Premises).

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.

Transformation type

Description

append string [constant]

Append the specified string to the named value string.

left [index]

Use the first n characters from the named value string, where n is specified as the index.

lower

Convert any uppercase characters in the named value string to lowercase characters.

middle [index1, index2]

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 string [constant]

Prepend, or add the the specified string to the start of the named value string.

regular expression [regex, default]
See the note in the following section.

Use a regular expression to extract matching characters from the named value string.

right [index]

Use the last n characters from the named value string, where n is specified as the index.

split on [index, string]

Extract the group of characters from the named value string using string as a delimiter. The index specifies which group to extract.

table [default, (key, value)...]

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.

trim

Remove leading or trailing whitespace characters from the named value string.

upper

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:

Transformation type

Example input

Transformation

After transformation

append string [constant] webdav " instance" webdav instance
left [index]webdav3web
lowerWebDavwebdav
middle [index1, index2]WebDav inst4, 9Dav in
prepend string [constant]WebDav"My "My WebDav

regular expression [regex, default]
See the note in the following section.

WebDav
wlcmPROD
wlcmTEST
wlcmUAT

([A-Z]+)$, Unknown

Using a regular expression to extract uppercase characters from the end of the string.

Unknown
PROD
TEST
UAT

right [index]webdavdav
split on [index, string]module on App Server on rhel5-tomcat551 " on "App Server
table [default, (key, value)...]

deb-tomcat55
rhel5-tomcat55
w2k3-tomcat55

Default -> None
rhel5-tomcat55 -> Dev
w2k3-tomcat55 -> Prod

None
Dev
Prod

trim" webdav " — webdav
upperwebdav — )))WEBDAV

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 Improving-the-performance-of-regular-expressions.

To create a named value

On the Application Mapping tab, click Defined Named Value corresponding to a functional component.

  1. 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.

    named_value_add_transformation.png

  2. Click Apply.

    The transformation displays in the field below the Add New Transformation menu, marked with an X.

  3. 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".

    named_value_matched_datastore.png

  4. Click the X near the transformations you have validated and want to remove.
  5. Repeat Steps 1 and 2 to add transformations that better define the value as necessary.
  6. In the Make available as field, type the name of the identifier for an instance, select the Is identity check box, and click Apply.

    named_value_identity.png

    InformationThe 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

Example

In his questions to George, 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.

Map_ExampleNamedValueStart.png

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.

  1. In Named Value Editor, click show all in the Attributes section to expand the list of attributes.
  2. Click the Instance attribute.
     The Sample values show the mellon names that he was looking for.

    Map_ExampleNamedValueInstance.png

  3. Transform the mellon instance to the Production instance, and mellon_dev to the Development instance.

    Map_ExampleNamedValueTransform.png

  4. Make the value available as the identifier friends_db_id.


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 Helix Configuration Management Database (BMC Helix CMDB).

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC Helix Discovery (SaaS)