customizing cisco prime network activation workflows · chapter 4-1 cisco prime network 3.8...

12
CHAPTER 4-1 Cisco Prime Network 3.8 Activation Customization Guide OL-24646-01 4 Customizing Cisco Prime Network Activation Workflows The following topics provide a detailed information for customizing Network Activation workflows. Topics include: Network Activation Workflow Customization Overview, page 4-1 Network Activation Workflow Design, page 4-2 Network Activation Workflow Attributes, page 4-4 Workflow Creation Overview, page 4-8 Prime Network Workflow Features, page 4-10 Network Activation Workflow Customization Overview You use the Network Activation Workflow to perform all Network Activation workflow customizations. The Prime Network Workflow creates and runs the logical flows of activation commands, including rollback scenarios. Prime Network Workflow defines relationships between tasks, including sequences, branches, and failure procedures. You can also use Prime Network Workflow to access Network Activation commands and information model. Note To perform both activation and deactivation tasks in Network Activation you must have administrator or configurator level privileges. You must have operator-plus level privileges, to perform deactivations in Network Activation. For more details on Network Activation user roles, see the Cisco Prime Network 3.8 Activation User Guide. Note For information about the Prime Network Workflow, see “Using the Prime Network Workflow to Create Task Workflows” in the Cisco Prime Network 3.8 Customization User Guide. The workflow engine resides on the Network Activation gateway using AVM 66. All deployed Network Activation workflows are stored on the gateway. After a workflow is deployed, you can access it using Prime Network Administration to view workflow properties and status. Deployed workflows can be invoked through the Prime Network API using BQL. The workflow engine provides default workflow inherent rollback.

Upload: others

Post on 31-Jan-2020

47 views

Category:

Documents


0 download

TRANSCRIPT

CiscoOL-24646-01

C H A P T E R 4

Customizing Cisco Prime Network Activation Workflows

The following topics provide a detailed information for customizing Network Activation workflows. Topics include:

• Network Activation Workflow Customization Overview, page 4-1

• Network Activation Workflow Design, page 4-2

• Network Activation Workflow Attributes, page 4-4

• Workflow Creation Overview, page 4-8

• Prime Network Workflow Features, page 4-10

Network Activation Workflow Customization OverviewYou use the Network Activation Workflow to perform all Network Activation workflow customizations. The Prime Network Workflow creates and runs the logical flows of activation commands, including rollback scenarios. Prime Network Workflow defines relationships between tasks, including sequences, branches, and failure procedures. You can also use Prime Network Workflow to access Network Activation commands and information model.

Note To perform both activation and deactivation tasks in Network Activation you must have administrator or configurator level privileges. You must have operator-plus level privileges, to perform deactivations in Network Activation. For more details on Network Activation user roles, see the Cisco Prime Network 3.8 Activation User Guide.

Note For information about the Prime Network Workflow, see “Using the Prime Network Workflow to Create Task Workflows” in the Cisco Prime Network 3.8 Customization User Guide.

The workflow engine resides on the Network Activation gateway using AVM 66. All deployed Network Activation workflows are stored on the gateway. After a workflow is deployed, you can access it using Prime Network Administration to view workflow properties and status. Deployed workflows can be invoked through the Prime Network API using BQL. The workflow engine provides default workflow inherent rollback.

4-1 Prime Network 3.8 Activation Customization Guide

Chapter 4 Customizing Cisco Prime Network Activation Workflows Network Activation Workflow Design

To customize a Network Activation workflow, you must open Prime Network Workflow and retrieve the files from the server. You can perform the workflow customizations, then upload the workflows. Customizing Network Activation workflows requires the following:

• Proficiency using the Prime Network Workflow.

• Familiarity with workflow programming logic.

• Detailed knowledge of the workflow activation objective.

Network Activation Workflow DesignNetwork Activation workflows guide the activation sequences based on the network operator input entered in the activation wizards. Regardless of whether you plan to customize a packaged workflow or create a new one, you must first understand important Network Activation workflow design principles and ensure they are incorporated into your workflow customizations:

• Exception handling—Workflows must anticipate and adequately account for exception occurrences.

• Rollback (best effort)—Workflows must be prepared to roll back all completed operations when exceptions occur. If a workflow performs an activation sequence on multiple devices and an exception occurs on the last device, all completed device sequences must be rolled back. This capability is extremely important to ensure device and network stability.

• Activation removal (best effort)—The rollback capability built into Network Activation workflows is extended to allow operators to manually remove activations using the Network Activation Activation History. For information about the Activation History, see the Cisco Prime Network 3.8 Activation User Guide.

• Multi-platform and inter-platform capability—Activations are often provisioned on multiple devices. Because not all attributes are provisioned on all devices, workflows must include multiple branches to accommodate the different devices on which the activation is provisioned.

These design principles are demonstrated in the E-LAN Hub workflow (NSA_ELAN_HUB.template) shown in Figure 4-1. After the workflow is initiated, the first decision point determines whether the workflow is an activation or a deactivation. If yes (the workflow was initiated from a Network Activation Activation window wizard), the workflow proceeds to the activation branch. If no (the workflow was initiated from the Network Activation Activation History window), the workflow proceeds to the activation removal branch.

4-2Cisco Prime Network 3.8 Activation Customization Guide

OL-24646-01

Chapter 4 Customizing Cisco Prime Network Activation Workflows Network Activation Workflow Design

Figure 4-1 E-LAN Hub Workflow Activation Decision Point

If the workflow is an activation, the device type is the next workflow branch decision, which is based on the device selection of the operator in the activation wizard. The E-LAN hub activation can be provisioned on Cisco 9000 Series and Cisco 7600 Series routers. Therefore, the workflow includes a branch for each device type. In general, device branches are mirrored, although individual attributes vary, depending on what the device supports.

At the end of each device track, error catching logic is included so that if an error occurs at any point during the router provisioning, the workflow switches to the rollback branch. Figure 4-2 shows the multiple platform and error catching branches.

If the workflow is a deactivation—the operator initiated the call as a deactivation from the Activation History window—the workflow proceeds to the rollback branch.

2487

08

Activation?

Yes?Activationbranch

No?Activationremovalbranch

4-3Cisco Prime Network 3.8 Activation Customization Guide

OL-24646-01

Chapter 4 Customizing Cisco Prime Network Activation Workflows Network Activation Workflow Attributes

Figure 4-2 E-LAN Hub Workflow Multiple Platform Support and Error Catching

Network Activation Workflow AttributesNetwork Activation workflows contain the attributes that are collected by the activation wizards and required for activation at the device. Several guidelines apply to Network Activation workflow attributes. First, Network Activation requires a set of attributes be present in all workflows.

For example, the corresponding workflow ID attribute (AA_coWFId), appears in the Activation History window and allows operators to identify the activation they might decide to remove. A list of required Network Activation is provided in Network Activation Required Workflow Attributes, page 4-6.

Network Activation workflows also employ internal attributes. Internal attributes are added in the same manner that external attributes (attributes required by the activation) are added. The only difference is how the initial values of the external attributes are populated. The external attributes are populated either through a default value or as part of the set of workflow invocation parameters. Internal attributes are typically temporary variables.

Figure 4-3 shows the attribute groups within the E-LAN Hub workflow.

2487

07

Rollbackbranch

Multipleplatform

branches

Errorcatching

4-4Cisco Prime Network 3.8 Activation Customization Guide

OL-24646-01

Chapter 4 Customizing Cisco Prime Network Activation Workflows Network Activation Workflow Attributes

Figure 4-3 E-LAN Hub Attributes

4-5Cisco Prime Network 3.8 Activation Customization Guide

OL-24646-01

Chapter 4 Customizing Cisco Prime Network Activation Workflows Network Activation Required Workflow Attributes

Naming Conventions for Workflows and Workflow Attributes Table 4-1 describes the conventions to be followed while naming the Network Activation workflows and workflow attributes.

.

Caution If you modify input attributes (add/remove/rename) to a workflow that is deployed, do not use the same workflow or wizard names (<ID> tag) in Service.xml. Save the modified workflow by a new name and use a new wizard name. If you do not change the name and deployed activations are deactivated, the deactivations will invoke the modified workflow. Because the arguments changed, the deactivation will fail. Cloning will also fail for the same reason. If the arguments change, attempts to use the saved activation for cloning will attempt to copy a mismatched set of parameters to the wizard model

Network Activation Required Workflow AttributesThe following attributes must be present in all Network Activation workflows. As a convention, required attributes begin with “AA”.

• AA_NSA_ActivationInfo

– Type—String.

– Values—Free form.

Table 4-1 Naming Conventions

Element Description

All new Network Activation Workflows

All Network Activation workflows must have a prefix, “NSA”. This will enable the workflow to show up in the Activation History.

You can also add a suffix “cust” to the name to identify the customized workflows. However, this is not mandatory.

For example, a new workflow activateinfo can be named as NSA_activateinfo_cust.

To differentiate between workflows created in different Network Activation versions, a suffix “_v1_1” can be added to all Network Activation 1.1 workflows. Similarly, suffix “_v1_3” can be added to all Network Activation 3.8 workflows. This will help when you upgrade the Network Activation software.

For example, a new workflow ACL can be named as NSA_acl_workflow_v1_1 in Network Activation 1.1. If it is created in Network Activation 3.8, it can be named as NSA_acl_workflow_v1_3.

Required Attribute Required Network Activation attributes will begin with the prefix, “AA_”.

For example, AA_purge.

Internal Attribute To prevent internal attributes from appearing on the workflow attribute list, internal attributes always begin with an underscore: “_”.

For example,_activateBD.

Multivalued Attributes Multivalued attributes will have the suffix “_list” and the values will be "|" delimited.

External Attribute No naming conventions.

4-6Cisco Prime Network 3.8 Activation Customization Guide

OL-24646-01

Chapter 4 Customizing Cisco Prime Network Activation Workflows Network Activation Required Workflow Attributes

– Default— Set by the workflow designer. Most workflows default this attribute to “See Workflow Output for more details.”

– Description—The value entered in this attribute is shown in the Info column of the Activation History window. The value is updated in the workflow to reflect a user-friendly message about the status of the workflow execution.

• AA_NSA_capabilities

– Type—String.

– Values—an "|" delimited set of values: {"add", "remove"}.

– Default—"add|remove". All workflows provided in the delivered Network Activation package support both add and remove capabilities.

– Description—This value is set by the workflow designer to reflect the capabilities of the workflow.

• AA_NSA_coWFId

– Type—String.

– Default—""

– Description—Maintains an association between related workflows. A workflow performing an initial "add" operation should have a "" (default) value. If a "remove" is later performed, the "remove" workflow AA_NSA_coWFId value should be set to that of the workflow Id of the "add" workflow and the "add" workflow AA_NSA_coWFId should be set to that of the "remove" workflow ID.

• AA_NSA_CustomerName

– Type—String.

– Values—Free form.

– Default—"".

– Description—Stores the customer name. Requires user per-service input. Currently not used by any shipped activation.

• AA_NSA_CreateTime

– Type—String.

– Values—Free form.

– Default—"".

– Description—Stores the workflow creation time. This does not require user input. Activations and deactivations manage this information. The time is in long format and stored as a string for BQL.

• AA_NSA_operation

– Type—String.

– Values—{"add" | "remove"}.

– Default—"add".

– Description—Set by the Network Activation activation component to "add" for an activation. For a deactivation, the value is set to "remove".

• AA_NSA_purge

– Type—String

4-7Cisco Prime Network 3.8 Activation Customization Guide

OL-24646-01

Chapter 4 Customizing Cisco Prime Network Activation Workflows Workflow Creation Overview

– Values—{"none" | "false" | "pending" | "true"}

– Default—"none"

– Description—Controls the purging behavior for a workflow instance record in the tablespace. If the value is set to "false", the workflow instance remains indefinitely in the database. If the value is set to "true", it is purged based on the standard aging behavior. For information about Network Activation purging, see the Cisco Prime Network 3.8 Activation User Guide.

• AA_NSA_serviceActivationId

– Type—String

– Default—"none"

– Description—Set by the Network Activation activation component to the value of the ID tag of the IMetaDataListEntry in the Service.xml metadata file corresponding to the current workflow invocation. The Activation History window and the Clone Activation feature use this attribute to retrieve a more user-friendly display name for the activation from the Service.xml metadata file.

• AA_NSA_type

– Type—String

– Default—"NSA"

– Description—Set by the Network Activation activation component to "NSA" so Network Activation workflows can be distinguished from non-Network Activation workflows. This value is strictly internal to Network Activation; it cannot be modified.

• AA_NSA_UserName

– Type—String.

– Values—Free form.

– Default—"".

– Description—Stores the login user name at the time of activation or deactivation. Does not require user input. Activation and deactivation get the login user information from Prime Network and set the info at the time of workflow creation.

Workflow Creation OverviewThe following steps provide the general workflow creation flow that you should follow when creating a new Network Activation workflow:

1. Use Prime Network Workflow to create the workflow. You cannot use any other workflow application to create or modify Network Activation workflows.

2. Define the required Network Activation workflow attributes. (See Network Activation Required Workflow Attributes, page 4-6.)

3. Define the external workflow attributes. These are the attributes that will be collected from the activation wizard.

4. Define the internal workflow attributes. These attribute names should begin with "_".

5. Implement the workflow activation logic.

6. Implement the removal and exception handling rollback logic.

7. Deploy the workflow to the server.

4-8Cisco Prime Network 3.8 Activation Customization Guide

OL-24646-01

Chapter 4 Customizing Cisco Prime Network Activation Workflows Workflow Creation Overview

8. Activate the workflow using BQL to debug and verify.

Figure 4-4 shows the E-LAN Hub workflow. Key points in the workflow include:

• Initialization—Internal attribute initialization.

• Operation check—Determines whether the workflow is invoked to perform an add or remove operation. That is, was the workflow invoked from the Activation window or the Activation History window Deactivate action?

• Tokenizing—Workflows sometimes support repetitive looping, meaning multiple values for an attribute are passed to the workflow. The wizard activation packs multiple values into an attribute using an "|" delimiter between values (for example, attributeFoo_list = "val1|val2|val3"). Creating workflow tasks to tokenize the values from the listed attribute and assigning them to a temporary internal attribute for usage within the looping flow is a recommended practice.

• Platform check—Most Network Activation workflows support multiple devices. The device platform type (product type, for example, Cisco 7600 Series Switches, Cisco ASR 9000 Series Routers) must be identified to determine which platform-specific tasks and scripts to invoke.

• Use of subworkflows—Many activation workflows require fairly complex logic and/or use common logic from other workflows. For readability and maintainability, workflows often invoke subworkflows or call other workflows.

• Removal and rollback—All Network Activation workflows support activation removal and best-effort rollback. Because the logical flow for both features is similar, the logic is combined.

Figure 4-4 E-LAN Hub Workflow Overview

2487

33

1 2

5

3 4

7

6

4-9Cisco Prime Network 3.8 Activation Customization Guide

OL-24646-01

Chapter 4 Customizing Cisco Prime Network Activation Workflows Prime Network Workflow Features

Prime Network Workflow FeaturesWhen you install Network Activation, two new functions are added to the Prime Network Workflow to facilitate Network Activation workflow development:

• New Network Activation Workflow—Creates a workflow template with the required Network Activation attributes defined. (See Network Activation Required Workflow Attributes, page 4-6.) New NSA Workflow eliminates the needs to manually enter the required attributes in a new workflow. The New NSA Workflow command is added to the Prime Network Workflow File menu and toolbar.

• NSA Tokenizer—Inserts a tokenizer function into workflows that automatically generates a BeanShell script to tokenize workflow parameter values and set the activation script parameters with those values. The corresponding activation parameter variable is also automatically generated with a specified naming convention, such as _AS_<workflowParameterName>. The Network Activation Tokenizer command is added to the Prime Network Workflow Insert menu and insertion toolbar.

When you install Network Activation, the New Cisco Network Activation Workflow and Parameter Tokenizer Task are added to the Figure 4-5 shows the New Cisco Network Activation Workflow and Parameter Tokenize Task.

1 Initialization 5 Exception handling

2 Operation check 6 Use of subworkflows/workflow calls

3 Tokenizing multi-valued attributes 7 Removal and rollback branches

4 Platform check

4-10Cisco Prime Network 3.8 Activation Customization Guide

OL-24646-01

Chapter 4 Customizing Cisco Prime Network Activation Workflows Prime Network Workflow Features

Figure 4-5 E-LAN Hub Workflow Overview

1 File menu with new Network Activation Workflow menu item

3 New Network Activation Workflow tool

2 Tools menu containing Network Activation Tokenizer item.

4-11Cisco Prime Network 3.8 Activation Customization Guide

OL-24646-01

Chapter 4 Customizing Cisco Prime Network Activation Workflows Prime Network Workflow Features

4-12Cisco Prime Network 3.8 Activation Customization Guide

OL-24646-01