Tasks in Workflow Functions

Overview

The command line syntax for each execution of the CLI command, uagcmd, must specify a single CLI function, required / optional Global parameters, and required / optional function-specific parameters. You must use the required Global parameters to connect to OMS Servers and to log on to a Controller (User ID and Password).

Universal Controller supports the following CLI functions for Tasks in Workflows, which are listed alphabetically on this page.

  • Clear Predecessor Dependencies
  • Insert a Task into a Workflow Instance with Dependencies
  • List Predecessors / Successors of a Task Instance in a Workflow

Syntax, parameters, and examples for each function are provided.

Clear Predecessor Dependencies

Description

Clears all predecessor dependencies of a task instance in a Workflow.

Syntax

uagcmd ops-task-clear-predecessors global parameters {task-instance-id=ID | task-instance-name=name} [instance-criteria=criteria] [workflow-instance-name=name] predecessor-name=name

Parameters

  • task-instance-id=
    Required if task-instance-name= is not specified; sys_id of the task instance to run the command on.
  • task-instance-name=
    Required if task-instance-id= is not specified; Name of the task instance to run the command on. (If instance-criteria= is not specified, the oldest active task instance with the matching name will apply.)
  • instance-criteria=
    Optional if task-instance-name= is specified; One of the following (not case-sensitive): oldest_active_instance (default), oldest_instance, newest_active_instance, newest_instance.
  • workflow-instance-name=
    Optional; Name of the workflow instance.
  • predecessor-name=
    Required; One of the following: Name of the predecessor dependency to clear or an asterisk ( * ) to clear all predecessor dependencies.

Example

uagcmd ops-task-clear-predecessors -c config.cfg task-instance-name=Task A predecessor-name=Resource B

Insert a Task into a Workflow Instance with Dependencies

Description

Inserts a task into a Workflow instance with dependencies.

Syntax

uagcmd ops-task-insert global parameters {workflow-instance-id=ID | workflow-instance-name=name} [workflow-instance-criteria=criteria] {task-id=ID | task-name=name} [vertex-x=x-coordinate] [vertex-y=y-coordinate] [alias=task alias] [inherit-trigger-time=option] {predecessors=predecessors list | successors=successors list}

Parameters

  • workflow-instance-id=
    Required if workflow-instance-name is not specified; sys_id of the Workflow instance.
  • workflow-instance-name=
    Required if workflow-instance-id is not specified; Name of the workflow instance. (If workflow-instance-criteria= is not specified, the oldest active Workflow with the matching name will apply.)
  • workflow-instance-criteria=
    Optional, if workflow-instance-name= is specified; One of the following (not case-sensitive): oldest_active_instance (default), oldest_instance, newest_active_instance, newest_instance.
  • task-id=
    Required if task-name is not specified; sys_id of the task to be inserted.
  • task-name=
    Required if task-id is not specified; Name of the task to be inserted.
  • vertex-x
    Optional; x-coordinate of the task within the workflow.
  • vertex-y
    Optional; y-coordinate of the task within the workflow.
  • alias=
    Optional; Alias used for the task within the Workflow; specifically, the value of ops_exec_workflow_vertex.name.
  • inherit-trigger-time=
    Optional; Specification for whether or not the inserted task will in inherit the Trigger Time of the Workflow task instance. One of the following (not case-sensitive): Yes|Y|true (default) or No|N|false.
  • predecessors=
    Optional; Comma-separated list of predecessor task instances within the workflow.
  • successors=
    Optional; Comma-separated list of successor task instances within the workflow.
     

    Note

    Valid values for predecessors and successors:

    • If both predecessors and successors lists are empty, task will be inserted without dependencies.
    • If there is a task name in one of the lists that does not exist, the operation will fail with error Cannot find vertex with the name ...
    • If a list contains the task name with multiple occurrences in the workflow, the operation will fail with error Multiple vertices found for the name... (For example, the workflow contains two tasks (Sleep 30, Sleep 30) and you are trying to insert Task ABC with predecessors = Sleep 30.

Example

uagcmd ops-task-insert -c config.cfg workflow-instance-name=Workflow A task-name=Task 5A successors=Task 5B,Task 5C

List Predecessors / Successors of a Task Instance in a Workflow

Description

Lists predecessors and/or successors of a task instance within a workflow.

Syntax

uagcmd ops-task-dependency-list global parameters workflow-instance-name=name [instance-criteria=criteria] {task-instance-id=ID | task-instance-name=name} [dependency-type=type]

Parameters

  • task-instance-id=
    Required if task-instance-name= is not specified; sys_id of the task instance whose predecessors and/or successors you want to list.
  • task-instance-name=
    Required if task-instance-id= is not specified; Name of the task instance whose predecessors and/or successors you want to list.
  • dependency-type=
    Optional; One of the following (not case sensitive): predecessors or successors. If dependency-type= is not specified, all predecessors and successors of the specified task instance are listed.
  • workflow-instance-name=
    Required; Name of the workflow instance. (If instance-criteria= is not specified, the oldest active Workflow instance with the matching name will apply.)
  • instance-criteria=
    Optional; One of the following (not case-sensitive): oldest_active_instance (default), oldest_instance, newest_active_instance, newest_instance.
  • options=
    Optional; v (Return verbose results.)

Example

uagcmd ops-task-dependency-list -c config.cfg task-instance-id=14714650784870352570T7OR91KT5QSM