Using Activities

This chapter contains the following sections:

Activities

Activities provide a layer of abstraction to workflow input variables. The abstraction helps you to efficiently execute any administration scenario (such as tenant onboarding or application deployment) by separating the specification of a workflow from its actual implementation. Using activities, you can do the following:

  • Define the input properties for a workflow and associate those properties with one or more workflows. Then, depending upon a matching condition, the activity triggers the correct workflow.

  • Use an activity as a workflow task, making the task usable in multiple similar but differently implemented use case scenarios.

  • An activity can be either triggered programmatically or by providing inputs dynamically.

Creating an Activity

You create an activity by defining inputs and outputs. To create an activity:

    Step 1   On the menu bar, choose Policies > Orchestration.
    Step 2   Click the Activities tab.
    Step 3   Click Add.
    Step 4   In the Add Activity dialog box, complete the following fields:
    Name Description

    Name field

    The activity name.

    Label field

    The label for the activity.

    Description field

    A description of the activity.

    Step 5   Click Next.
    Step 6   In the Add User Inputs screen, click the + icon to add workflow input properties.
    1. In the Add Entry to Input Fields dialog box, complete the following fields:
      Name Description

      Input Name field

      The name of the activity workflow input.

      Input Label field

      The label for the activity workflow input.

      Optional check box

      Check the check box to make the input optional during workflow execution.

      Input Type field

      Click Select. In the Select dialog box, choose the input type.

    2. Click Submit.
    Step 7   Click Next.
    Step 8   In the Add User Outputs screen, click the + icon to add workflow output properties.
    1. In the Add Entry to Output Fields dialog box, complete the following fields:
      Name Description

      Output Name field

      The name of the activity workflow output.

      Output Label field

      The label for the activity workflow output.

      Output Type field

      Click Select. In the Select dialog box, choose the output type.

    2. Click Submit.
    Step 9   Click Submit.

    Associating an Activity with a Workflow

    You can associate an activity with one or more workflows to run the activity as part of the workflow. The associated activity is displayed as a custom workflow task in the System Activity Tasks folder of the Workflow Designer.

    Before You Begin

    You have an activity and at least one workflow that is to include the activity. For more information about how to create an activity, see Creating an Activity.


      Step 1   On the menu bar, choose Policies > Orchestration.
      Step 2   Click the Workflows tab.
      Step 3   Click Add Workflow.
      Step 4   In the Add Workflow dialog box, complete the following fields:
      Name Description

      Workflow Name field

      The workflow name.
      Note   

      Workflow names cannot contain the following characters: \, ", %, &, ', *, +, ,, ., /, :, ;, <, =, >, ?, ^, |.

      Description field

      A description of the workflow.

      Workflow Context drop-down list

      Choose the context in which the workflow can be used. Orchestrator supports the following options:

      • Any—Enables you to use the workflow in any context.

      • Selected VM—Enables you to execute the workflow only when you choose a VM.

      Save as Compound Task check box

      Check the check box to define the workflow as a compound task.

      Place in New Folder check box

      Check the check box to assign the workflow to a new folder. The Folder Name field replaces the Select Folder drop-down list. Type a name for the new folder.

      Select Folder drop-down list

      Choose the folder into which you want to place the workflow.

      Notify status of execution to initiating user check box

      Check the check box to notify the user through email of the execution status of the workflow. If checked, enter the additional email addresses in the Additional User(s) to send Email Notification field. The execution status for the workflow can be one of the following:
      • Completed status

      • Failed execution status

      • Cancelled execution status

      Step 5   Click Next.
      Step 6   In the Add User Inputs screen, check the Associate to Activity check box.
      Step 7   From the Activity drop-down list, choose an activity. The user input table is updated based on the selected activity.
      Step 8   Click Next.

      In the Add User Outputs screen, the user outputs are displayed based on the selected activity.

      Step 9   Click Submit. A workflow is created and is available in the Workflows tab.

      Adding an Activity to a Workflow

      The activity that is associated with one or more workflows is displayed as a custom workflow task in the System Activity Tasks folder of the Workflow Designer. Drag-and-drop the selected activity onto the Workflow Designer window to add it to a workflow. Define the condition for controlling execution of workflows associated with an activity in the Context Input table of the workflow.

      Before You Begin

      Associate an activity with a workflow so that the activity is displayed as a custom workflow task in the System Activity Tasks folder of the Workflow Designer. For more information about how to associate an activity with a workflow, see Creating an Activity.

      Open the workflow in the Workflow Designer.


        Step 1   Choose the activity from the System Activity Tasks folder.
        Step 2   Drag-and-drop the selected activity onto the Workflow Designer window. The Add Task dialog box appears.
        Step 3   In the Task Information screen, complete the following fields:
        Name Description

        Task Name field

        The name of the task.

        Task Category field

        The name of the task category (preselected information).

        Task Type field

        The name of the type of task (preselected information).

        Comments field

        Enter more task information.

        Retry Execution check box

        Check the check box to retry a task (later) if the task fails. This feature is useful when the state of a resource is not available and a retrial of the task depends on the state.

        Retry Count drop-down list

        Choose the number of retry attempts.

        Retry Frequency drop-down list

        Choose the duration between retry attempts. The workflow remains on the failed task until the task succeeds or until it fails Retry Frequency number of times. It then proceeds to the next task or completion of the workflow.

        Step 4   Click Next. The User Input Mapping screen displays the inputs that are defined for the activity.
        Step 5   Check the Map to User Input check box to use the corresponding input in the workflow.
        Step 6   In the Context Input table, click the + icon to add a contextual input:
        1. In the Add Entry to Input Fields dialog box, complete the following fields:
          Name Description

          User Inputs drop-down list

          Choose an input to which to apply the condition.

          Minimum Condition drop-down list

          Choose the condition that you want to apply to the input.

          Value field

          The value set for the condition.

          Associated Workflow drop-down list

          Choose a workflow to execute when the input satisfies the selected condition.

        2. Click Next.
        Step 7   Click Revalidate to validate the current values.
        Step 8   Click Next. The User Output Mapping screen displays the outputs that are defined for the activity.
        Step 9   Check the Map to User Output check box to use the corresponding output in the workflow.
        Step 10   Click Submit.

        Importing and Exporting Activities

        You can import and export activities using the Import and Export actions you use to import and export workflows, custom tasks, and script modules.

        To import an activity, see Importing Workflows, Custom Tasks, Script Modules, and Activities.

        To export an activity, see Exporting Workflows, Custom Tasks, Script Modules, and Activities.

        Deleting an Activity

        You can delete an activity.

          Step 1   On the menu bar, choose Policies > Orchestration.
          Step 2   Click the Activities tab.
          Step 3   Select the activity to delete.
          Step 4   Click Delete. The Activity dialog box appears to confirm deletion of the activity.
          Step 5   Click Delete.