Defining bundle dependencies

Define the dependencies, or imports, for a CICS® bundle in <import> elements in the bundle manifest file (cics.xml).

About this task

If you require a CICS resource to be available in the CICS region, but you do not want the lifecycle of the resource to be tied to the lifecycle of the CICS bundle, you can add the resource as a dependency for the CICS bundle. For example, if the CICS bundle contains resources for a web service, you can specify that the PIPELINE resource used by the web service must be available in the CICS region. When you install the CICS bundle, CICS checks that a resource of the specified type with the specified name is installed and enabled in the CICS region.

You can select the action that CICS takes if a resource specified in an <import> element is not present in the CICS region. For example, the bundle installation can fail, or succeed but with a warning message. You can make imports optional, so that the BUNDLE resource always installs in an enabled state even if the dependency is not met.

In a CICS bundle that is packaged as part of an application deployed on a platform, public or private resources can be defined as dependencies, including private programs that are autoinstalled by an application. CICS checks first for a private resource with the specified type and name in the same application as the CICS bundle that contains the <import> element in the bundle manifest file. If more than one version of the application is installed, the current application context determines the version of the private resource that is imported. If the resource is not found as a private resource for the application, CICS checks for a public resource in the CICS region that matches the specified type and name, and imports that resource. You cannot import private resources from other applications.

Procedure

  1. Navigate to the META-INF folder of the bundle you want to work with.
  2. Double-click the cics.xml manifest file. The Bundle Manifest editor opens and displays all of the current resources that are required for this bundle, and the ID and version of the bundle.
  3. Click Add. The import properties dialog opens.
  4. Enter the resource type in the CICS resource type list. You can press Ctrl+Space to display content assistance.
  5. Enter the name of the required resource.
  6. Select whether the import is required or optional before the BUNDLE resource can be enabled. The default behavior is that the import is required and the BUNDLE resource cannot be enabled until the dependency is met. If you select Optional, the BUNDLE resource is installed even if the dependency is not met in the CICS region. Choose whether or not a warning message is issued if the dependency is not met.
  7. Click OK. The resource is added to the list of imported resources that are required by this bundle.
  8. Click Save.

Results

You have defined the CICS resources that are required by the CICS bundle.

What to do next

You can add CICS resources to the Bundle project. These resources are created dynamically when the BUNDLE resource is installed in the CICS region.