C H A P T E R
8
Workflow Administration Tasks
These topics briefly describe workflows and how to administer the workflows and templates that are stored in the Workflow Engine branch in Cisco ANA Manage:
• Workflows and the Workflow Engine Windows, page 8-1 • Viewing and Deleting Templates, page 8-2
• Viewing Output, Aborting, and Deleting Workflows, page 8-4 • Adding Workflow Users (Using runRegTool), page 8-6
For more information about the Workflow Engine window elements, see Workflow Engine Windows, page 1-26.
Workflows and the Workflow Engine Windows
Workflows are logical flows of atomic tasks (activation commands), including complex rollback scenarios. The logic enables you to define relationships between tasks, the sequence of tasks, when to branch to other tasks, and what to do if a task fails.
You can create workflows using the Cisco ANAWorkflow Editor, which is launchable from Cisco ANA NetworkVision. (For information on the Cisco ANAWorkflow Editor, see Cisco Active Network Abstraction 3.7 Customization User Guide.)
Once they are created, all workflows are stored on the Cisco ANA gateway and are displayed in the Workflow Engine windows in Cisco ANA Manage. The Workflow Editor engine resides on the Cisco ANA gateway using AVM 66.
By default, workflows are saved for seven days and are then purged from Cisco ANA by the integrity service.
The Workflow Engine windows include the following:
• Templates—Displays a list of the deployed workflow templates and enables you to view the properties of a workflow template.
• Workflows—Displays a list of the running or completed workflows and enables you to view and alter their current status.
Figure 8-1 presents the process required when working with and managing workflows. The tasks are described in the order in which they must be performed.
Chapter 8 Workflow Administration Tasks Viewing and Deleting Templates
Figure 8-1 Flow For Creating, Testing, Deploying, Running, and Viewing a Workflow
Viewing and Deleting Templates
You can perform the following template management tasks from Cisco ANA Manage:
• Viewing Available Templates and Their Properties, page 8-2 • Deleting a Workflow Template, page 8-3
Viewing Available Templates and Their Properties
To view the list of templates and template properties:
Step 1: Create a command using
Step 4: Test the workflow locally Step 2: Define tasks and workflows
Step 6: Run the workflow
Step 1: Create a command using
Step 4: Test the workflow locally Step 2: Define tasks and workflows
Step 6: Run the workflow
Step 1: Create a command using Command Builder and preview it
Step 4: Test the workflow locally Step 2: Define tasks and workflows
using the Workflow Editor
Step 5: Deploy the workflow on the gateway
Step 6: Run the workflow
Step 7: View the workflow in ANA Manage
Step 8: View the workflow results in EventVision Step 3a: Copy the command descriptor scripts Step 3b: Edit the command descriptor scripts
Step 3c: Add workflow and task attributes
Chapter 8 Workflow Administration Tasks
Viewing and Deleting Templates
Step 3 Right-click the template, then choose Properties. The Workflow Template Properties dialog box is displayed with the properties and attributes of the selected workflow template (Figure 8-2).
Figure 8-2 Workflow Template Properties Dialog Box
The name of the template is displayed in the header and at the top of the dialog box. The following properties are displayed in the table of the Workflow Template Properties dialog box:
• Name—The attribute names defined for the tasks included in the workflow, as defined in the Task Properties dialog box using the Workflow Editor.
• Value—The values defined for the tasks included in the workflow, as defined in the Task Properties dialog box using the Workflow Editor.
Step 4 Click in the top right-hand corner to close the Template Properties dialog box.
Deleting a Workflow Template
To delete a workflow template:
Step 1 Choose Workflow Engine > Templates. The list of workflow templates is displayed in the table.
Step 2 Choose the workflow template that you want to delete in the table.
Step 3 Delete the template in one of the following ways:
• Right-click the workflow template, then choose Delete.
• Click Delete in the toolbar. A warning message is displayed.
Chapter 8 Workflow Administration Tasks Viewing Output, Aborting, and Deleting Workflows
Viewing Output, Aborting, and Deleting Workflows
You can perform the following template management tasks from Cisco ANA Manage:
• Viewing the Output of a Workflow, page 8-4 • Aborting a Workflow, page 8-5
• Deleting a Workflow, page 8-5 Viewing the Output of a Workflow
You can view the output of a workflow whether it is running, done, or aborted. To view the output of a workflow:
Step 1 Choose Workflow Engine > Workflows. The list of workflows is displayed in the table.
Step 2 Choose the required workflow in the table.
Step 3 Right-click the workflow, then choose Show Output. The Output window is displayed (Figure 8-3). Figure 8-3 Output Window
The Output window displays the output and details of the workflow.
Chapter 8 Workflow Administration Tasks
Viewing Output, Aborting, and Deleting Workflows
Aborting a Workflow
You can manually abort a complete workflow using the procedure in this topic. (A workflow is also aborted automatically if any of its tasks are aborted.)
When a workflow aborts, a workflow rollback occurs. All activation scripts that have already been run (by Execute BQL tasks) are rolled back. A workflow rollback has the following characteristics:
• The commands that are executed are those that are defined in the rollback section of the script (defined in Command Builder).
• Scripts are rolled back in the reverse order of their execution.
Note Gateway commands do not support rollback.
Rollback can be disabled for specific BQL tasks by setting the RollbackEnabled value task attribute to false in the respective BQL task. This is useful for a BQL task executing a script that does not have an appropriate rollback, or a BQL task executing a gateway command.
To abort a running workflow:
Step 1 Choose Workflow Engine > Workflows. The list of workflows is displayed in the table.
Step 2 Right-click the workflow, then choose Abort. A warning message is displayed.
Step 3 Click Yes. The workflow is stopped, and the state of the workflow changes to Aborted in the Workflows table.
Deleting a Workflow
You can delete a workflow from the Workflows window in the Cisco ANA Manage window. The workflow is deleted from the database.
To delete a workflow:
Step 1 Choose Workflow Engine > Workflows. The list of workflows is displayed in the table.
Step 2 Delete the workflow in one of the following ways:
• Right-click the workflow, then choose Delete.
• Click Delete in the toolbar. A warning message is displayed.
Chapter 8 Workflow Administration Tasks Adding Workflow Users (Using runRegTool)
Adding Workflow Users (Using runRegTool)
Enabling new users to run workflows involves making changes to the registry. The following procedure explains how to add a user and specify how many workflows they can run at one time. By default, workflows are saved for 7 days.
Note Changes to the registry should only be carried out with the support of Cisco. For details, contact your Cisco account representative.
For information on the format of the runRegTool command, see Changing Registry Settings Using runRegTool, page C-3.
Step 1 To add a user to the list of authorized users, use the following command:
./runRegTool.sh -gs gw-IP add unit-IP "site/avm66/services/workflow/users/username"
This example allows the user jsmith to create workflows:
# ./runRegTool.sh -gs 127.0.0.1 add 0.0.0.0 "site/avm66/services/workflow/users/jsmith"
Step 2 To specify the maximum number of workflow connections allowed for the user, use this command format:
./runRegTool.sh -gs gw-IP set unit-IP
"site/avm66/services/workflow/users/username/maxConnections value"
This example allows the user jsmith to run a maximum of 20 workflows at one time:
# ./runRegTool.sh -gs 127.0.0.1 set 0.0.0.0
"site/avm66/services/workflow/users/jsmith/maxConnections 20"
Step 3 Restart AVM 66 (the workflow engine AVM):