Creating and referencing a task template from the UI

The purpose of the following scenario is to show how to create a task template in the context of an example.

About this task

Tasks can either be an embedded task, or they can reference a task template.

For information about how to define an embedded task from the UI, see Creating an embedded task from the UI.

David is an HCL Universal Orchestrator user who needs to upgrade the Java version on the existing backup server named BK_server. To automate the process, David decides to create a workflow that references a task template. David prefers to reference a task template instead of creating an embedded task because he needs to use the same task template in other workflows and he wants to avoid to duplicate the definition. In this way, if David needs to modify any parameter, he can modify just one task template and every workflow that references the task template definition will be affected by the change.

To create a task template named UPGRADE_JAVA_VERSION and then reference the task template inside the existing UPGRADE_JAVA workflow, perform the following steps:

Procedure

  1. Create a task template named UPGRADE_JAVA_TEMPLATE and enter the command that performs the Java upgrade procedure.
    1. In the Graphical Designer page, from the Assets tab, click Add new.
    2. From the drop-down menu, select Task template.
    3. In the search bar, type Executable, then select the executable task template and click Next.
    4. In General information, in Workstation, select the existing workstation BK_server.
    5. In Folder, select the already existing folder IT_operations.
    6. In Name, type UPGRADE_JAVA_TEMPLATE.
    7. In Task, select Inline script from the drop-down menu.
    8. In Command text or script name, enter apt install --only-upgrade openjdk-11-jre-headless -y.
    9. Click Add to add the task template to the database.
  2. Reference the UPGRADE_JAVA_TEMPLATE task template into the existing UPGRADE_JAVA workflow.
    1. From the Assets tab, use the search bar to find the UPGRADE_JAVA_TEMPLATE task template
    2. Drag the UPGRADE_JAVA_TEMPLATE task template into the UPGRADE_JAVA_VERSION workflow.
    3. Click Deploy to deploy the workspace.
    You created a task template to upgrade the Java version on the backup server named BK_server and you referenced the UPGRADE_JAVA_TEMPLATE task template into a workflow.