Importing Building Blocks

Configuration

To import a Building Block, do the following:

  1. Click Building Block in the command bar and choose Import Building Block.
  2. Select the Building Block and click Open. This opens the Import Building Block window.
  3. Click Start Import. This opens the Import Building Block settings window.
    • To create a new folder in which the Building Block items will be imported, select Place in new root subfolder and specify a folder. Creating a folder in which Building Block items are imported makes it easier to retrieve any item that you imported. This is for example very useful when importing the Building Block in DTAP environments or at customer sites.
      • When specifying a subfolder in the root, this folder will be created in the root folder of the item in the Building Block: if it only contains Modules, it will be created in the Modules node; if it contains Modules, Projects and Run Books, the folder will be created in the Modules, Projects and Run Books nodes.
      • When selecting Place in new root subfolder, the options Import Modules, Projects and Run Books with and Import Resources with will be unavailable: the Building Block items will always be imported using new GUIDs.
    • The receiving environment may contain previous versions of the imported items. These are identified by their Global Unique Identifier (GUID).
      • To overwrite existing items, import items with the original GUIDs. When selecting the option original GUID’s, a confirmation message is shown for each item that is imported whether the existing item should be overwritten (Yes/No). You can apply this choice to all items that are imported and skip further messages from that point on by selecting Yes to All/No to All. This is very useful when importing large Building Blocks that contain many items: selecting one of the options drastically reduces the required configuration. The options Yes to All and No to All function independently of the option Do not ask input for any Parameters.
      • To create new items, import items with new GUIDs. This may create duplicate items.
    • To overrule parameter input settings when importing Building Blocks, select Do not ask input for any Parameters. When selecting this option, Ivanti Automation will not ask for parameter input, despite the input setting of individual parameters. This is very useful when importing large Building Blocks that contain many parameters, and whose default values do not need to be changed: selecting the option drastically reduces the required configuration.
    • If you import a Building Block of items that refer to Resources that have been excluded when the Building Block was created, and the Resource is also not available in the target environment, a message will be shown that the Resource is missing. When clicking OK, the New Resource window will then open, which makes it possible to create a new Resource for the relevant items.
    • If you import a Building Block of items that are to be imported into nodes or folders to which your administrative roles(s) do not grant access, these items will be disabled in the Import Building Block window.

Rules for Teams and Team Variables

  • Teams will always be imported into an environment with their original GUIDs and folder structure, irrespective of the Import Building Block settings. This means that existing Teams in the target environment will be updated with rules, properties and Team settings from the Building Block. Any explicit members and automatic Job scheduling settings will remain untouched.
  • If you import a Building Block of items that includes Team Variables:
    • and the Team Variables already exist, the Team Variables will be overwritten with the value in the Building Block.
    • and the Team Variables do not yet exist, the global Variables will be created with an empty value, after which the Team Variables will get the value in the Building Block.

Rules for global Variables and their categories

  • If you import a Building Block of items that includes Variables:
    • and the Variable does not yet exist in the environment in which the Building Block is imported (based on name), a new Variable of the same type will be created with the same value as in the originating environment. Team Variables and Agent Variables will inherit this value from the global Variable.
    • and the Variable already exists in the environment in which the Building Block is imported (based on name, irrespective of type), no Variable or category will be created or changed, nor will the value of the Variable be overwritten.
    • and the non-existing Variable is categorized in a category that does not yet exist in the receiving environment (based on GUID and then on name), a new category will be created and the Variables will be categorized in this new category.
    • and the non-existing Variable is categorized in a category that already exists in the receiving environment (based on GUID and then on name), the Variables will be categorized in the existing category.
  • If you import a Building Block into a version before Ivanti Automation 10, the category information will not be retained and the Variable will be placed under the General category.

Rules for administrative roles and Building Blocks

When accessing the Console and administrative roles apply, this may impact the ability to import Building Blocks: You can only import those Building Block items into the related nodes to which your administrative role(s) grant Modify access, including all (sub)folders. When importing a Building Block, the Import Building Block window will show which Building Block settings you can import. Building Block items that relate to nodes to which your administrative role(s) do not grant access will be disabled.

For example, if a Building Block contains Resources and Modules, but you only have Modify access to Resources, it will now be possible to import Resources: the Modules in the Building Block will then be disabled in the modules disabled the Import Building Block window.

If you only have Read access to the Console, it is not possible to import Building Blocks and the import Building Block functionality will be disabled in the Console.

Importing Building Blocks unattended

To import a Building Block unattended, run the wmc.exe from the command line using the parameters /action=importbb and /file=<Building Block file name and path>. If Ivanti Automation authentication is used, also provide the parameters /user and /password. The credentials must have Read/Modify permissions on the Library and the Topology nodes. Optionally, use /silent to suppresses any messages.

Example

"C:\Program Files (x86)\Ivanti\Automation\Console\WMC.exe" /action=importbb /file=c:\buildingblocks\basic.xml /user=jsmith /password=secret /silent

The option to create import folders for the Building Block items during the import process is not supported for unattended Building Block imports.

You may want to change the default values of Module, Project and Run Book parameters when importing items into another Ivanti Automation environment. For example, the receiving environment may need a different default domain, or different credentials. To set Ivanti Automation to prompt for new default parameter values when importing a Building Block, set the parameters' Input settings to When importing Building Block. This allows you to create generic Modules, Projects and Run Books that can be customized when you import them as a Building Block.