UCSD - Basic Input Formating Custom Task

Version 3
    Prerequisites
    1. Built on UCSD 5.3
    Instructions for Regular Workflow Use:
    1. Download the attached .ZIP file below to your computer. *Remember the location of the saved file on your computer.
    2. Unzip the file on your computer. Should end up with a .WFD file.
    3. Log in to UCS Director as a user that has "system-admin" privileges.
    4. Navigate to "Policies-->Orchestration" and click on "Import".
    5. Click "Browse" and navigate to the location on your computer where the .WFD file resides. Choose the .WFD file and click "Open".
    6. Click "Upload" and then "OK" once the file upload is completed. Then click "Next".
    7. Click the "Select" button next to "Import Workflows". Click the "Check All" button to check all checkboxes and then the "Select" button.
    8. Click "Submit".
    9. A new folder should appear in "Policies-->Orchestration" that contains the imported workflow. You will now need to update the included tasks with information about the specific environment.

     

    The most common "scripting" I need to do with UCSD is around input formatting, particularly taking a user input string, and cleaning it up to match a standard.  I usually just pull in a cloupia script task to the workflow, and build the JavaScript to do the task.  Not difficult, but certainly repetitive.  I recently built a custom task that handles most of what I need to do for these examples.

     

    This task does the following:

    1) Take the Input String and Remove Spaces

    2) Optionally trim the length to a certain character length

    3) Add optional prefix to the string

    4) Add optional suffix to the string (I often use -u${SR_ID} to ensure uniqueness)

     

    The attached file includes a sample workflow and the custom task.

     

    cleanup - sr status.png

    cleanup - user input.png

    cleanup - task inputs user.png

    cleanup - task inputs admin.png