Overview of the relationships between the task item record and the tables showing the task execution status results:
The 'item' record contains the task name.
Each task (item) record may have one or more versions in the 'itemversions' table. If a change is made to a task, a new version record is is created. The most recent (max) version may need to be identified in any sql script.
Each 'itemversions' record is related to a 'taskinstances' record (the TaskInstances records contain a TaskVersionGuid). A task instance is created each time a task executes. The most recent instance may need to be identified in any sql script.
The taskinstances records contain the relationship to the 'taskinstancestatus' and 'taskinstanceresults', which indicate if a task succeeded, failed, etc.
For Unix, Linux and Mac (ULM) tasks, the following commands will show the task version and instance IDs for use in SQL queries:
aex-cta list --show-task-id
--> This command returns the "Task Definition Version ID"
aex-cta list C34A7A27-AD28-4481-B1AB-24C62944F118
--> The guid here is the "Task Definition Version ID". This command returns each "Task Execution instance ID"
aex-cta info C34A7A27-AD28-4481-B1AB-24C62944F118 C164DDB0-FE90-4346-BC59-B543FAE235F1
--> The guids here are the "Task Definition Version ID" and one specific "Task Execution instance ID". This command returns task instance execution dates, statuses, etc.
The "Task Definition Version ID", from the output of the above commands, may be found in the ItemVersions.VersionGuid field in the database. The corresponding ItemVersions.ItemGuid is the actual task guid which corresponds to the Item.ItemGuid value.
Once the 'Task Definition Version ID" is found, the following query will show the task guid and name:
select i.guid, i.name
from item i
join itemversions iv on iv.itemguid = i.guid
where iv.versionguid = '<Task Definition Version ID>'
Imported Document ID: HOWTO84078
Subscribing will provide email updates when this Article is updated. Login is required to Subscribe