Managing Workflows - Cisco · Managing Workflows Thischaptercontainsthefollowingsections: •...

18
Managing Workflows This chapter contains the following sections: Workflow Editing, page 1 Exporting and Importing Cisco UCS Director Artifacts, page 7 Workflow Version History, page 14 Cloning a Workflow, page 17 Saving a Picture of a Workflow, page 18 Workflow Editing You can edit many features of an existing workflow. You can: Rename a workflow Reorder inputs Delete inputs Rename inputs Change an input from optional to mandatory (but not the reverse) Edit tasks in the workflow You can also: Delete any or all versions of a single workflow Delete the default version or all versions of multiple workflows at one time The following sections describe these procedures. Cisco UCS Director Orchestration Guide, Release 6.0 1

Transcript of Managing Workflows - Cisco · Managing Workflows Thischaptercontainsthefollowingsections: •...

Page 1: Managing Workflows - Cisco · Managing Workflows Thischaptercontainsthefollowingsections: • WorkflowEditing,page1 • ExportingandImportingCiscoUCSDirectorArtifacts,page7 ...

Managing Workflows

This chapter contains the following sections:

• Workflow Editing, page 1

• Exporting and Importing Cisco UCS Director Artifacts, page 7

• Workflow Version History, page 14

• Cloning a Workflow, page 17

• Saving a Picture of a Workflow, page 18

Workflow EditingYou can edit many features of an existing workflow. You can:

• Rename a workflow

• Reorder inputs

• Delete inputs

• Rename inputs

• Change an input from optional to mandatory (but not the reverse)

• Edit tasks in the workflow

You can also:

• Delete any or all versions of a single workflow

• Delete the default version or all versions of multiple workflows at one time

The following sections describe these procedures.

Cisco UCS Director Orchestration Guide, Release 6.0 1

Page 2: Managing Workflows - Cisco · Managing Workflows Thischaptercontainsthefollowingsections: • WorkflowEditing,page1 • ExportingandImportingCiscoUCSDirectorArtifacts,page7 ...

To modify a predefined workflow, we recommend that you create a new version of that workflow beforemaking the changes. If you modify a default predefined workflow, you can affect what happens in CiscoUCS Director when you click an action button. Actions that you take in Cisco UCS Director, such ascreating or modifying a VM, use the default predefined workflows.

For example, when you click the Create button on the HyperConverged > Datastore page, Cisco UCSDirector runs the default Create HyperFlex Datastore workflow and creates a service request for the action.

Note

Renaming WorkflowsTo rename a workflow, change its name field.

All versions of the workflow are renamed.Note

You cannot rename a compound task.

Before You Begin

You have selected the workflow you want to rename and chosen the Edit action.

Step 1 In the Edit Workflow screen, enter the new name for the workflow in theWorkflow Name field.Step 2 Click Next.Step 3 In the Add User Inputs screen, click Next.Step 4 In the Add User Outputs screen, click Submit.

Reordering InputsAfter creating a workflow, you can change the order in which workflow user inputs are processed when theworkflow is executed.

Before You Begin

You have selected the workflow in which you want to reorder the inputs and have chosen the Edit action.

Step 1 In the Edit Workflow Details screen, click Next to advance to the input screen.Step 2 In the Edit User Inputs screen, choose an input from the input table.Step 3 Click the Up Arrow icon or Down Arrow icon to move the input up or down in the input order.

Alternatively, you can drag and drop an input to a different place in the list.

Cisco UCS Director Orchestration Guide, Release 6.02

Managing WorkflowsRenaming Workflows

Page 3: Managing Workflows - Cisco · Managing Workflows Thischaptercontainsthefollowingsections: • WorkflowEditing,page1 • ExportingandImportingCiscoUCSDirectorArtifacts,page7 ...

Step 4 Click Next.Step 5 In the Edit Workflow Outputs screen, click Submit.

Deleting Workflow InputsYou can delete one or more inputs while editing an existing workflow.

You can also delete inputs in a cloned workflow.Note

To delete inputs from an opened workflow, do the following:

Before You Begin

Navigate to Edit User Inputs page:

1 Select the workflow from which you want to delete inputs.

2 Click Edit to open the Edit Workflow window.

3 Click Next to move to the Edit User Inputs page.

Alternatively, while editing a task, clickManage Workflow User Inputs on the User Input Mapping page.

Step 1 In the Edit Workflow Inputs list, select the inputs that you want to delete.To select multiple inputs from the list, hold down the <Shift> key (for a range of items) or <Ctrl> key (to select individualitems).

Step 2 Click the Delete (X) icon at the top of the list.Step 3 In the Delete Entry popup dialog, click Submit.

What to Do Next

Click Next to move to the Edit User Outputs page, then click Submit.

Renaming Workflow InputsYou can rename inputs while editing an existing workflow.

To rename inputs from an opened workflow, do the following:

Before You Begin

Navigate to the Edit User Inputs page:

1 Select the workflow in which you want to rename inputs.

Cisco UCS Director Orchestration Guide, Release 6.0 3

Managing WorkflowsDeleting Workflow Inputs

Page 4: Managing Workflows - Cisco · Managing Workflows Thischaptercontainsthefollowingsections: • WorkflowEditing,page1 • ExportingandImportingCiscoUCSDirectorArtifacts,page7 ...

2 Click Edit to open the Edit Workflow window.

3 Click Next to move to the Edit User Inputs page.

Alternatively, while editing a task, clickManage Workflow User Inputs on the User Input Mapping page.

Step 1 In the Edit Workflow Inputs list, select an input that you want to rename.Step 2 Click the Edit (pencil) icon at the top of the list.Step 3 In the Edit Entry popup dialog, replace the name in the Input Label text field.Step 4 Click Submit.Step 5 Repeat the previous steps to edit another input.

What to Do Next

Click Next to move to the Edit User Outputs page, then click Submit.

Changing Input Optional or Required StatusYou can change the optionality (optional or required status) of workflow inputs.

You cannot map an optional workflow input to a mandatory task input. Similarly, you cannot change aninput from mandatory to optional if it is mapped to a mandatory task input.

Note

Before You Begin

Select the workflow you want to edit and choose the Edit action.

Step 1 In the Edit Workflow window, click Next to advance to theModify User Inputs screen.Step 2 In the inputs table, double-click an input that you want to edit.Step 3 In the Edit Entry dialog box, check or uncheck the Optional check box to make the input optional or required,

respectively, at the time of execution.You cannot make a workflow user input optional if it is mapped to a mandatory taskinput.

Note

Step 4 Click Submit.Step 5 In the Edit Workflow: Edit Workflow Inputs window, click Next.Step 6 In the Edit Workflow: Edit Workflow Outputs window, click Submit.

Cisco UCS Director Orchestration Guide, Release 6.04

Managing WorkflowsChanging Input Optional or Required Status

Page 5: Managing Workflows - Cisco · Managing Workflows Thischaptercontainsthefollowingsections: • WorkflowEditing,page1 • ExportingandImportingCiscoUCSDirectorArtifacts,page7 ...

Editing a Task in an Existing WorkflowYou can edit a task in an existing workflow. The change is local to the workflow and version containing theedited task. For example, if you edit task A in version 0 of workflow X, the task remains unchanged inworkflow Y and in version 1 of workflow X.

Step 1 Open a workflow in theWorkflow Designer.Step 2 In the workflow display, double-click the task that you want to edit.

The Edit Task window appears.Step 3 In the Task Information screen, you can edit the following fields:

DescriptionName

You cannot change the name of the task.Task Name field

You cannot change the task category.Task Category drop-down list

You cannot change the task type.Task Type drop-down list

You can change or add to the comment.Comment field

You can check or uncheck this box. If the box is checked,Retry Count and Retry Frequency controls appear.

Retry Execution check box

You can check or uncheck this box. If the box is checked,the task is unchecked in the Rollback Service Requestdialog and cannot be rolled back; see Rolling Back aService Request.

If the task does not support rollback, checking this box hasno effect.

Disable Rollback check box

The number of times (up to 5) to retry the task on failure.Retry Count drop-down list

A comma-separated list of integers specifying how manyseconds to wait between retries. For example, if youselected a retry count of three, enter 1, 10, 60 to retry afterone, 10, and 60 seconds, respectively.

Retry Frequency field

Step 4 Click Next.Step 5 On the User Input Mappings page, you can edit the following fields:

DescriptionName

Click this button to add to or edit the workflow user inputs.Manage Workflow User Inputs button

Cisco UCS Director Orchestration Guide, Release 6.0 5

Managing WorkflowsEditing a Task in an Existing Workflow

Page 6: Managing Workflows - Cisco · Managing Workflows Thischaptercontainsthefollowingsections: • WorkflowEditing,page1 • ExportingandImportingCiscoUCSDirectorArtifacts,page7 ...

DescriptionName

Each task input is displayed as a heading on the remainderof this page. The input is labeled (Mandatory) if itrequired.

Task Input headings

Check this box to populate the task input from a workflowuser input at runtime.

Map to User Input check box

This drop-down list appears if you check theMap to UserInput check box. Select the workflow user input to mapto the task input.

User Input drop-down list

Step 6 Click Next.Step 7 On the Task Input page, you can edit the following fields:

DescriptionName

Each task input that was not mapped to a user input on theprevious page is displayed with an appropriate input control(text field, drop-down list, and so on). Use the inputcontrols to specify the value. Optional inputs can be leftblank.

(input label) control

Step 8 In the User Output Mapping screen, you can edit the following fields:DescriptionName

Each task output is displayed as a heading on this page.The output is labeled (Mandatory) if it required. Theoutput heading labels are assigned automatically and cannotbe modified.

Task Output heading

Check this box to populate a workflow user output fromthe task output at runtime.

Map to User Output check box

This drop-down list appears if you check theMap to UserOutput check box. Select the workflow user output to mapto the task output.

User Output drop-down list

Step 9 Click Submit.

Cisco UCS Director Orchestration Guide, Release 6.06

Managing WorkflowsEditing a Task in an Existing Workflow

Page 7: Managing Workflows - Cisco · Managing Workflows Thischaptercontainsthefollowingsections: • WorkflowEditing,page1 • ExportingandImportingCiscoUCSDirectorArtifacts,page7 ...

Deleting a WorkflowYou can delete any or all versions of a workflow.

Step 1 On the menu bar, choose Policies > Orchestration.Step 2 Choose theWorkflows tab.Step 3 Choose Delete from the task bar or from the actions drop-down list.Step 4 In theDeleteWorkflow(s) dialog, choose the versions that you want to delete. To choose all versions for deletion, check

the check box at the top of the list.Step 5 Click the Delete button.

Deleting Multiple WorkflowsYou can delete more than one workflow at a time.

Step 1 On the menu bar, choose Policies > Orchestration.Step 2 Choose theWorkflows tab.Step 3 Choose all the workflow you want to delete.

Select multiple items as you would in any other application on your system. For example, in Windows, holddown the Ctrl key to choose more items or Shift to choose a range of items.

Note

Step 4 Choose Delete All from the task bar or from the actions drop-down list.Step 5 In theDeleteWorkflow dialog, check theDelete All Versions check box if you want to delete all versions of the selected

workflows. Otherwise only the default version is deleted.Step 6 Click the Delete button.

Exporting and Importing Cisco UCS Director ArtifactsYou can export and import workflows, custom tasks, script modules, and activities in Cisco UCS Director.This is useful if, for example, you want to:

• Move or copy workflows or other entities to different Cisco UCS Director instances.

• Back up or store entities.

• Use templates to standardize workflows.

Cisco UCS Director Orchestration Guide, Release 6.0 7

Managing WorkflowsDeleting a Workflow

Page 8: Managing Workflows - Cisco · Managing Workflows Thischaptercontainsthefollowingsections: • WorkflowEditing,page1 • ExportingandImportingCiscoUCSDirectorArtifacts,page7 ...

Exporting and Importing Artifact Files

Cisco UCS Director artifacts are exported from and imported to Cisco UCS Director in a single package. Theyou exported or imported file has a.wfdx extension and is an XML file containing a serialized representationof the objects. The file contains at least one of the following:

• One or more workflows

• One or more custom tasks

• One or more script modules

• One or more activities

For example, you might import a file that contains only a single custom task; or a file that contains severalworkflows, a script module, and a few activities; and so on.

Exporting and Importing Workflows as Templates

You can export and import workflows as templates.

When you export a template, all of the tasks within the workflow are retained.When you create a newworkflowusing a template, task inputs that have been mapped to workflow inputs cannot be modified. However, youcan modify inputs which have not been mapped.

Exporting Workflows, Custom Tasks, Script Modules, and ActivitiesTo export artifacts from Cisco UCS Director, do the following:

Step 1 On the menu bar, choose Policies > Orchestration.Step 2 In the Orchestration pane, click theWorkflows tab.Step 3 On theWorkflows tab, click Export.Step 4 In the Select Workflows screen, select the workflows that you want to export.Step 5 Click Next.Step 6 In the Select Custom Tasks screen, select the custom tasks that you want to export.Step 7 Click Next.Step 8 In the Export: Select Script Modules screen, select the script modules that you want to export.Step 9 Click Next.Step 10 In the Export: Select Activities screen, select the activities that you want to export.Step 11 In the Export: Confirmation screen, complete the following fields:

DescriptionName

Your name or a note on who is responsible for the export.Exported By text field

Comments about this export.Comments text area

The name of the file on your local system. Type only the base filename; the filetype extension (.wfdx) is appended automatically.

Exported File Name text field

Cisco UCS Director Orchestration Guide, Release 6.08

Managing WorkflowsExporting Workflows, Custom Tasks, Script Modules, and Activities

Page 9: Managing Workflows - Cisco · Managing Workflows Thischaptercontainsthefollowingsections: • WorkflowEditing,page1 • ExportingandImportingCiscoUCSDirectorArtifacts,page7 ...

Step 12 Click Export.

You are prompted to save the file.

Importing Workflows, Custom Tasks, Script Modules, and ActivitiesTo import artifacts into Cisco UCS Director, do the following:

Step 1 On the menu bar, choose Policies > Orchestration.Step 2 In the Orchestration pane, click theWorkflows tab.Step 3 Click the Import action.Step 4 In the Import dialog box, click Upload.Step 5 In the File Upload dialog, click Click and select a file from your computer.Step 6 Select the import file. Cisco UCS Director import and export files have a .wfdx file extension.

When the file is uploaded, the File Upload dialog displays File ready for use.Step 7 Dismiss the File Upload dialog.Step 8 Click Next.

The Import dialog displays a list of Cisco UCS Director objects contained in the uploaded file.Step 9 (Optional) Specify how objects are handled if they duplicate names already in the workflow folder. In the Import dialog

box, complete the following fields:DescriptionName

Choose from the following options to specify how identically named workflowsare handled:

• Replace—Replace the existing workflow with the imported workflow.

• Keep Both—Import the workflow as a new version.

• Skip—Do not import the workflow.

Workflows drop-down list

Choose from the following options to specify how identically named customtasks are handled:

• Replace

• Keep Both

• Skip

Custom Tasks drop-down list

Cisco UCS Director Orchestration Guide, Release 6.0 9

Managing WorkflowsImporting Workflows, Custom Tasks, Script Modules, and Activities

Page 10: Managing Workflows - Cisco · Managing Workflows Thischaptercontainsthefollowingsections: • WorkflowEditing,page1 • ExportingandImportingCiscoUCSDirectorArtifacts,page7 ...

DescriptionName

Choose from the following options to specify how identically named scriptmodules are handled:

• Replace

• Keep Both

• Skip

Script Modules drop-down list

Choose from the following options to specify how identically named activitiesare handled:

• Replace

• Keep Both

• Skip

Activities drop-down list

Check this check box to import the workflows. If you do not check the box andif no existing version of a workflow exists, that workflow is not imported.

ImportWorkflows to Folder checkbox

Choose a folder into which to import the workflows. If you chose [New Folder..]in the drop-down list, the New Folder field appears.

Select Folder drop-down list

Enter the name of the new folder to create as your import folder.New Folder field

Step 10 Click Import.

Workflow TemplatesAworkflow template is like an outline of a workflow. It contains placeholders for all the tasks in the workflow,but is not executable.

A workflow template is useful when you want to import a workflow to a different Cisco UCSDirector instance,especially if the workflow is large or contains custom tasks.

A workflow template contains the following elements:

• Task names. Only the names are exported; the tasks themselves must exist in the Cisco UCS Directorenvironment in order to execute.

•Workflow structure (connections between tasks).

• Input names.

A workflow template does not contain these elements:

Cisco UCS Director Orchestration Guide, Release 6.010

Managing WorkflowsWorkflow Templates

Page 11: Managing Workflows - Cisco · Managing Workflows Thischaptercontainsthefollowingsections: • WorkflowEditing,page1 • ExportingandImportingCiscoUCSDirectorArtifacts,page7 ...

• Custom tasks. Since only task names are exported in a template, you must import custom tasks in thenew Cisco UCS Director environment in order for them to execute.

• Admin input values. Since the elements referred to by input values are unlikely to exist in the new CiscoUCS Director environment, input values must be redefined.

Exporting Workflows as TemplatesYou can export a workflow as a template. To export a workflow as a template:

Step 1 On the menu bar, choose Policies > Orchestration.Step 2 Choose theWorkflows tab.Step 3 Choose a workflow.Step 4 Click Export As Template.Step 5 In the Export as Template dialog, complete the following fields:

DescriptionName

The name for the template.Template Name field

A description of the template.Description field

Step 6 Click Submit.You are prompted to save the template to your system.

The template is saved under a system-generated filename. The template name you assign is for display in CiscoUCS Director only.

Note

Importing a Workflow TemplateTo import a workflow template:

Step 1 On the menu bar, choose Policies > Orchestration.Step 2 Choose theWorkflow Templates tab.Step 3 Click the Import action.Step 4 In the Import dialog box, click Upload.Step 5 In the File Upload dialog, click Click and select a file from your computer.Step 6 Select the template file. Cisco UCS Director template files have a .wft file extension.

When the file is uploaded, the File Upload dialog displays File ready for use.Step 7 Dismiss the File Upload dialog.Step 8 In the Import Template dialog, click Submit.

Cisco UCS Director Orchestration Guide, Release 6.0 11

Managing WorkflowsWorkflow Templates

Page 12: Managing Workflows - Cisco · Managing Workflows Thischaptercontainsthefollowingsections: • WorkflowEditing,page1 • ExportingandImportingCiscoUCSDirectorArtifacts,page7 ...

The template appears on theWorkflow Templates page.

Creating a Workflow from a Template

Step 1 On the menu bar, choose Policies > Orchestration.Step 2 Choose theWorkflow Templates tab.Step 3 Choose a template.Step 4 Click Create Workflow.Step 5 In the Overview screen, complete the following fields:

DescriptionName

The name of the workflow to be created.Name text field

An optional description for the workflow.Description text area

Step 6 Click Next.Step 7 Click through the remaining pages of the Create Workflow from Template wizard. You can change any editable

task-specific inputs that appear.Step 8 Click Submit.

The workflow is created in the Template Workflows folder on theWorkflows page.

What to Do Next

Open the workflow in theWorkflow Designer and configure it to work in its new environment.

Predefined TemplatesCisco UCS Director installs with the following predefined templates. The templates are available, along withany user-imported templates, in the Policies > Orchestration >Workflow Templates tab.

Cisco UCS Director Orchestration Guide, Release 6.012

Managing WorkflowsWorkflow Templates

Page 13: Managing Workflows - Cisco · Managing Workflows Thischaptercontainsthefollowingsections: • WorkflowEditing,page1 • ExportingandImportingCiscoUCSDirectorArtifacts,page7 ...

DescriptionPurposeName

The workflow does the following:

• Creates a virtual data center (VDC)

• Generates a VLAN from the selected VLAN policy

• Creates a VLAN on the selected Cisco Nexus 5000Series switches

• Creates a port profile on selected Nexus 1000v Seriesswitches

• Creates a VLAN interface

• Creates flexible volume

• Creates and establishes a vFiler on the controller

• Mounts the storage as a data store on a selected hostnode

Customer onboarding in asecure multitenancy setting

CustomerOnboardingtemplate

The workflow does the following:

• Creates a service profile

• Associates the service profile to a selected server

• Configures SAN zones on a Cisco Nexus 5000 Seriesswitch

• Establishes a PXE boot

• Monitors PXE booting and registers the host with aselected VMware (vCenter) account

Deployment of a new bladeas an ESXi Host on aVMware (vCenter) account

Deploy ESXiHost template

Workflow does the following:

• Creates a service profile

• Associates the service profile to a selected server

• Configures SAN zones on a Cisco Nexus 5000 Seriesswitch

• Establishes a PXE boot

• Monitors PXE booting and registers the host with aselected VMware (vCenter) account

Deployment of a new bladeas an ESXi Host on aVMware (vCenter) account.

Deploy ESXiHost withONTAPtemplate

Cisco UCS Director Orchestration Guide, Release 6.0 13

Managing WorkflowsWorkflow Templates

Page 14: Managing Workflows - Cisco · Managing Workflows Thischaptercontainsthefollowingsections: • WorkflowEditing,page1 • ExportingandImportingCiscoUCSDirectorArtifacts,page7 ...

DescriptionPurposeName

The workflow does the following:

• Creates a service profile

• Associates the service profile to a selected server

• Configures SANZones on a Cisco Nexus 5000 Seriesswitch

• Establishes a PXE boot

• Monitors PXE booting and registers the host with aselected VMware (vCenter) account

Deployment of a new bladeas an ESXi local storage host(without using a CiscoNexus1000v Series switch) on aVMware (vCenter) account

Deploy ESXiHost of LocalStorage(without aCisco Nexus1000v Seriesswitch) template

The workflow does the following:

• Generates a VLAN from the selected VLAN policy

• Creates a VLAN on the selected devices

• Creates a VLAN interface

• Creates a vFiler on the controller

Attaching a NetApp storagecontroller's Ethernet ports toa new VLAN

Attach VLANto StorageControllertemplate

Workflow Version HistoryCisco UCS Director provides a set of features for managing versions of a workflow. For an introduction toworkflow versioning, see Workflow Versioning.

The following sections discuss how to manage workflow versions.

Creating a New Version of a WorkflowYou can create a new version of a workflow. You can then modify the new version without changing the oldversion.

Before You Begin

You have an existing workflow that you want to modify.

Step 1 On the menu bar, choose Policies > Orchestration.Step 2 Choose theWorkflows tab.Step 3 Choose the workflow to duplicate.Step 4 Click the Create New Version action.Step 5 In the Create New Version screen, complete the following fields:

Cisco UCS Director Orchestration Guide, Release 6.014

Managing WorkflowsWorkflow Version History

Page 15: Managing Workflows - Cisco · Managing Workflows Thischaptercontainsthefollowingsections: • WorkflowEditing,page1 • ExportingandImportingCiscoUCSDirectorArtifacts,page7 ...

DescriptionName

The label for the version. The default label for a newworkflow is zero, so consider labeling new versionsnumerically starting from one.

Version Label field

A description for the version.Description field

Step 6 Click Submit.The new version opens in theWorkflow Designer.

Step 7 InWorkflow Designer, complete your changes for the workflow.Step 8 Click Close.

If theManage Versions settings specify Set latest version as default, the new version becomes the defaultversion. TheWorkflows page displays the new version of the workflow under the Version column.

If theManage Version settings specify Set selected version as default, the new version is created but thedefault version does not change. See Choosing the Default Version of a Workflow, on page 15.

Choosing the Default Version of a Workflow

Step 1 On the menu bar, choose Policies > Orchestration.Step 2 Choose theWorkflows tab.Step 3 Right click the workflow and chooseManage Versions.Step 4 In theManage Versions screen, complete the following fields:

DescriptionName

Check this checkbox to set the default version of a workflow to be the last version that wascreated. The default version of a workflow is displayed in theWorkflows page. If you createa new version of a workflow, the new version becomes the default.

For example, if the latest version of a workflow is X.0, the Version Label column in theWorkflows page displays X.0. If you then create a version X.1, the Version Label columndisplays X.1.

Show latest versioncheckbox

Check this checkbox to set the default version of a workflow to be the version that you select.The default version of a workflow is displayed in theWorkflows page. If you create a newversion of a workflow, your selected version remains the default.

For example, if the latest version of a workflow is X.0, the Version Label column in theWorkflows page displays X.0. If you then create a version X.1, the Version Label columnremains X.0.

Set default versioncheckbox

Cisco UCS Director Orchestration Guide, Release 6.0 15

Managing WorkflowsChoosing the Default Version of a Workflow

Page 16: Managing Workflows - Cisco · Managing Workflows Thischaptercontainsthefollowingsections: • WorkflowEditing,page1 • ExportingandImportingCiscoUCSDirectorArtifacts,page7 ...

DescriptionName

If you selected the Set default version checkbox, check one version from the list to be thedefault version.

Version list of values

Step 5 Click Submit.

Managing Versions of a Compound TaskWhen you update a compound task, the new version of the compound task replaces the old one in all workflowsthat use the compound task.

However, it is possible for some versions of a workflow to be compound tasks while other versions of thesame workflow are not. Normally, the behavior of a workflow is defined by the workflow's default version,but this is sometimes not the case with compound tasks.

If the default version of a workflow is not a compound task, then when the workflow is called as a compoundtask the system uses the most recent version of the workflow that is defined as a compound task. This can beconfusing. The following example illustrates this behavior.

Before You Begin

1 Create a compound task called CT. Note that in the Workflow tab, the Version Label for CT is shown as0. We will refer to this version of CT as CTv0.

2 Include the compound task in a workflow calledWF.

3 Validate the workflowWF. Validation should pass.

Step 1 Save CTv0 as a normal (non-compound-task) workflow:a) Go to Policies > Orchestration >Workflow.b) Choose the compound task workflow CTv0.c) Click Edit Workflow.d) Uncheck the Save as Compound Task checkbox.e) Click through to the Edit User Outputs page and click Submit.

Step 2 In theWorkflow Designer, validateWF.a) Choose theWorkflows tab.b) Choose the workflowWF.c) ClickWorkflow Designer.d) In theWorkflow Designer page, click Validate Workflow.Validation fails with the message The task "Compound add user" does not exist anymore.

Step 3 Create a new version of CT (CTv1).a) Choose theWorkflows tab.

Cisco UCS Director Orchestration Guide, Release 6.016

Managing WorkflowsManaging Versions of a Compound Task

Page 17: Managing Workflows - Cisco · Managing Workflows Thischaptercontainsthefollowingsections: • WorkflowEditing,page1 • ExportingandImportingCiscoUCSDirectorArtifacts,page7 ...

b) Choose the workflow CTv0.c) Click Create New Version.d) In the Create New Version dialog, enter the required fields:

• Version Label - Something recognizable, for example v1.

• Description - Any description.

e) Click Submit.f) When theWorkflow Designer comes up, click Close.g) Click Edit.h) Verify that for CTv1, the Save as Compound Task checkbox is unchecked.i) Close the Edit Workflow page.

Step 4 ValidateWF again, as in Step 2.Validation fails with the message The task "Compound add user" does not exist anymore.

Step 5 Make CTv1 a compound task.a) Choose theWorkflows tab.b) Choose the workflow CT.c) Click Edit Workflow.d) Check the Save as Compound Task checkbox.e) Click through to the Edit User Outputs page and click Submit.

Step 6 ValidateWF again.Validation is successful.

Step 7 Change the default version of CT back to CTv0.a) Choose theWorkflows tab.b) Choose the workflow CT.c) ClickManage Versions.d) In theManage Versions dialog, uncheck Set Latest Version as Default.e) Check Set Selected Version as Default.f) In the table, check CTv0.g) Click Submit.Note that in theWorkflows tab Version Label is now 0, indicating that CTv0 is the default version of CT.

Step 8 ValidateWF again.Validation is successful. Note thatWF is using CTv1 as the compound task, even though CTv0 is the default. Be awarethat this can cause confusion if you have more than one version of a workflow that is used as a compound task.

Cloning a WorkflowYou can clone a workflow. The cloned workflow is identical to the original workflow. You can edit the newworkflow immediately. You might do this, for example, to create a workflow that is similar to the originalworkflow but which has different inputs. The new workflow has a new, separate version history.

Cisco UCS Director Orchestration Guide, Release 6.0 17

Managing WorkflowsCloning a Workflow

Page 18: Managing Workflows - Cisco · Managing Workflows Thischaptercontainsthefollowingsections: • WorkflowEditing,page1 • ExportingandImportingCiscoUCSDirectorArtifacts,page7 ...

Before You Begin

Navigate to Policies > Orchestration and select theWorkflows tab.

Step 1 Select the workflow you want to clone.Step 2 Click Clone.

The Clone Workflow window comes up.Step 3 Edit the workflow details, inputs, and outputs. See Creating a Workflow. You must enter a new name for the workflow.Step 4 Click Next to proceed to theWorkflow User Inputs screen.Step 5 Edit the workflow user inputs.

Saving a Picture of a WorkflowYou can create a graphics image of a workflow. To capture an image, do the following:

Step 1 On the menu bar, choose Policies > Organization.Step 2 Choose theWorkflows tab.Step 3 Choose a workflow.Step 4 Click onWorkflow Designer.Step 5 From within theWorkflow Designer window click the Full View icon.Step 6 Click Export as Image.

You are prompted to save the image file.Step 7 Choose a directory (if applicable) and click Save.

The saved file is namedworkflow_nnn.png, where nnn is the workflow ID number in Cisco UCSDirector.The workflow ID number is visible in the upper left corner of theWorkflow Designer next to the workflowname.

Cisco UCS Director Orchestration Guide, Release 6.018

Managing WorkflowsSaving a Picture of a Workflow