Managing Workflows

This chapter contains the following sections:

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.


Note


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

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


Renaming Workflows

To rename a workflow, change its name field.


Note


All versions of the workflow are renamed.


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 the Workflow 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 Inputs

    After creating a workflow, you can change the order in which workflow user inputs are processed when the workflow 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.

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

      Deleting Workflow Inputs

      You can delete one or more inputs while editing an existing workflow.


      Note


      You can also delete inputs in a cloned workflow.


      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, click Manage 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 individual items).

        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 Inputs

        You 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.

        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, click Manage 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 Status

          You can change the optionality (optional or required status) of workflow inputs.


          Note


          You cannot map an optional workflow input to a mandatory task input. Similarly, you cannot change an input from mandatory to optional if it is mapped to a mandatory task input.
          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 the Modify 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.
            Note   

            You cannot make a workflow user input optional if it is mapped to a mandatory task input.

            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.

            Editing a Task in an Existing Workflow

            You can edit a task in an existing workflow. The change is local to the workflow and version containing the edited task. For example, if you edit task A in version 0 of workflow X, the task remains unchanged in workflow Y and in version 1 of workflow X.


              Step 1   Open a workflow in the Workflow 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:
              Name Description

              Task Name field

              You cannot change the name of the task.

              Task Category drop-down list

              You cannot change the task category.

              Task Type drop-down list

              You cannot change the task type.

              Comment field

              You can change or add to the comment.

              Retry Execution check box

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

              Disable Rollback check box

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

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

              Retry Count drop-down list

              The number of times (up to 5) to retry the task on failure.

              Retry Frequency field

              A comma-separated list of integers specifying how many seconds to wait between retries. For example, if you selected a retry count of three, enter 1, 10, 60 to retry after one, 10, and 60 seconds, respectively.

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

              Manage Workflow User Inputs button

              Click this button to add to or edit the workflow user inputs.

              Task Input headings

              Each task input is displayed as a heading on the remainder of this page. The input is labeled (Mandatory) if it required.

              Map to User Input check box

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

              User Input drop-down list

              This drop-down list appears if you check the Map to User Input check box. Select the workflow user input to map to the task input.

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

              (input label) control

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

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

              Task Output heading

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

              Map to User Output check box

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

              User Output drop-down list

              This drop-down list appears if you check the Map to User Output check box. Select the workflow user output to map to the task output.

              Step 9   Click Submit.

              Deleting a Workflow

              You can delete any or all versions of a workflow.


                Step 1   On the menu bar, choose Policies > Orchestration.
                Step 2   Choose the Workflows tab.
                Step 3   Choose Delete from the task bar or from the actions drop-down list.
                Step 4   In the Delete Workflow(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 Workflows

                You can delete more than one workflow at a time.


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

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

                  Step 4   Choose Delete All from the task bar or from the actions drop-down list.
                  Step 5   In the Delete Workflow dialog, check the Delete 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 Artifacts

                  You 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.

                  Exporting and Importing Artifact Files

                  Cisco UCS Director artifacts are exported from and imported to Cisco UCS Director in a single package. The you exported or imported file has a.wfdx extension and is an XML file containing a serialized representation of 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 several workflows, 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 new workflow using a template, task inputs that have been mapped to workflow inputs cannot be modified. However, you can modify inputs which have not been mapped.

                  Exporting Workflows, Custom Tasks, Script Modules, and Activities

                  To 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 the Workflows tab.
                    Step 3   On the Workflows 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:
                    Name Description

                    Exported By text field

                    Your name or a note on who is responsible for the export.

                    Comments text area

                    Comments about this export.

                    Exported File Name text field

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

                    Step 12   Click Export.

                    You are prompted to save the file.

                    Importing Workflows, Custom Tasks, Script Modules, and Activities

                    To 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 the Workflows 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:
                      Name Description

                      Workflows drop-down list

                      Choose from the following options to specify how identically named workflows are 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.

                      Custom Tasks drop-down list

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

                      • Replace

                      • Keep Both

                      • Skip

                      Script Modules drop-down list

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

                      • Replace

                      • Keep Both

                      • Skip

                      Activities drop-down list

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

                      • Replace

                      • Keep Both

                      • Skip

                      Import Workflows to Folder check box

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

                      Select Folder drop-down list

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

                      New Folder field

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

                      Step 10   Click Import.

                      Workflow Templates

                      A workflow 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 UCS Director 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 Director environment in order to execute.

                      • Workflow structure (connections between tasks).

                      • Input names.

                      A workflow template does not contain these elements:

                      • Custom tasks. Since only task names are exported in a template, you must import custom tasks in the new 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 Cisco UCS Director environment, input values must be redefined.

                      Exporting Workflows as Templates

                      You 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 the Workflows tab.
                        Step 3   Choose a workflow.
                        Step 4   Click Export As Template.
                        Step 5   In the Export as Template dialog, complete the following fields:
                        Name Description

                        Template Name field

                        The name for the template.

                        Description field

                        A description of the template.

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

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


                        Importing a Workflow Template

                        To import a workflow template:


                          Step 1   On the menu bar, choose Policies > Orchestration.
                          Step 2   Choose the Workflow 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.

                          The template appears on the Workflow Templates page.

                          Creating a Workflow from a Template


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

                            Name text field

                            The name of the workflow to be created.

                            Description text area

                            An optional description for the workflow.

                            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 the Workflows page.

                            What to Do Next

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

                            Predefined Templates

                            Cisco UCS Director installs with the following predefined templates. The templates are available, along with any user-imported templates, in the Policies > Orchestration > Workflow Templates tab.
                            Name Purpose Description

                            Customer Onboarding template

                            Customer onboarding in a secure multitenancy setting

                            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 5000 Series switches

                            • Creates a port profile on selected Nexus 1000v Series switches

                            • 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 host node

                            Deploy ESXi Host template

                            Deployment of a new blade as an ESXi Host on a VMware (vCenter) account

                            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 Series switch
                            • Establishes a PXE boot
                            • Monitors PXE booting and registers the host with a selected VMware (vCenter) account

                            Deploy ESXi Host with ONTAP template

                            Deployment of a new blade as an ESXi Host on a VMware (vCenter) account. Workflow does the following:
                            • Creates a service profile
                            • Associates the service profile to a selected server
                            • Configures SAN zones on a Cisco Nexus 5000 Series switch
                            • Establishes a PXE boot
                            • Monitors PXE booting and registers the host with a selected VMware (vCenter) account

                            Deploy ESXi Host of Local Storage (without a Cisco Nexus 1000v Series switch) template

                            Deployment of a new blade as an ESXi local storage host (without using a Cisco Nexus 1000v Series switch) on a VMware (vCenter) account

                            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 Series switch
                            • Establishes a PXE boot
                            • Monitors PXE booting and registers the host with a selected VMware (vCenter) account

                            Attach VLAN to Storage Controller template

                            Attaching a NetApp storage controller's Ethernet ports to a new VLAN

                            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

                            Workflow Version History

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

                            The following sections discuss how to manage workflow versions.

                            Creating a New Version of a Workflow

                            You can create a new version of a workflow. You can then modify the new version without changing the old version.

                            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 the Workflows 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:
                              Name Description

                              Version Label field

                              The label for the version. The default label for a new workflow is zero, so consider labeling new versions numerically starting from one.

                              Description field

                              A description for the version.

                              Step 6   Click Submit. The new version opens in the Workflow Designer.
                              Step 7   In Workflow Designer, complete your changes for the workflow.
                              Step 8   Click Close.

                              If the Manage Versions settings specify Set latest version as default, the new version becomes the default version. The Workflows page displays the new version of the workflow under the Version column.

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

                              Choosing the Default Version of a Workflow


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

                                Show latest version checkbox

                                Check this checkbox to set the default version of a workflow to be the last version that was created. The default version of a workflow is displayed in the Workflows page. If you create a 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 the Workflows page displays X.0. If you then create a version X.1, the Version Label column displays X.1.

                                Set default version checkbox

                                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 the Workflows page. If you create a new version 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 the Workflows page displays X.0. If you then create a version X.1, the Version Label column remains X.0.

                                Version list of values

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

                                Step 5   Click Submit.

                                Managing Versions of a Compound Task

                                When you update a compound task, the new version of the compound task replaces the old one in all workflows that use the compound task.

                                However, it is possible for some versions of a workflow to be compound tasks while other versions of the same 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 compound task the system uses the most recent version of the workflow that is defined as a compound task. This can be confusing. 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 as 0. We will refer to this version of CT as CTv0.

                                2. Include the compound task in a workflow called WF.

                                3. Validate the workflow WF. Validation should pass.


                                  Step 1   Save CTv0 as a normal (non-compound-task) workflow:
                                  1. Go to Policies > Orchestration > Workflow.
                                  2. Choose the compound task workflow CTv0.
                                  3. Click Edit Workflow.
                                  4. Uncheck the Save as Compound Task checkbox.
                                  5. Click through to the Edit User Outputs page and click Submit.
                                  Step 2   In the Workflow Designer, validate WF.
                                  1. Choose the Workflows tab.
                                  2. Choose the workflow WF.
                                  3. Click Workflow Designer.
                                  4. In the Workflow 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).
                                  1. Choose the Workflows tab.
                                  2. Choose the workflow CTv0.
                                  3. Click Create New Version.
                                  4. In the Create New Version dialog, enter the required fields:
                                    • Version Label - Something recognizable, for example v1.

                                    • Description - Any description.

                                  5. Click Submit.
                                  6. When the Workflow Designer comes up, click Close.
                                  7. Click Edit.
                                  8. Verify that for CTv1, the Save as Compound Task checkbox is unchecked.
                                  9. Close the Edit Workflow page.
                                  Step 4   Validate WF 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.
                                  1. Choose the Workflows tab.
                                  2. Choose the workflow CT.
                                  3. Click Edit Workflow.
                                  4. Check the Save as Compound Task checkbox.
                                  5. Click through to the Edit User Outputs page and click Submit.
                                  Step 6   Validate WF again. Validation is successful.
                                  Step 7   Change the default version of CT back to CTv0.
                                  1. Choose the Workflows tab.
                                  2. Choose the workflow CT.
                                  3. Click Manage Versions.
                                  4. In the Manage Versions dialog, uncheck Set Latest Version as Default.
                                  5. Check Set Selected Version as Default.
                                  6. In the table, check CTv0.
                                  7. Click Submit.
                                  Note that in the Workflows tab Version Label is now 0, indicating that CTv0 is the default version of CT.
                                  Step 8   Validate WF again. Validation is successful. Note that WF is using CTv1 as the compound task, even though CTv0 is the default. Be aware that this can cause confusion if you have more than one version of a workflow that is used as a compound task.

                                  Cloning a Workflow

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

                                  Before You Begin

                                  Navigate to Policies > Orchestration and select the Workflows 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 the Workflow User Inputs screen.
                                    Step 5   Edit the workflow user inputs.

                                    Saving a Picture of a Workflow

                                    You 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 the Workflows tab.
                                      Step 3   Choose a workflow.
                                      Step 4   Click on Workflow Designer.
                                      Step 5   From within the Workflow 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 named workflow_nnn.png, where nnn is the workflow ID number in Cisco UCS Director. The workflow ID number is visible in the upper left corner of the Workflow Designer next to the workflow name.