v2.1.7+AI agent task context variables
Reference for the originating task and parent
workflow metadata that HCL Universal Orchestrator propagates to a workflow invoked by an AI agent, available through js.triggerInfo
variables.
When an AI agent runs as a task within a workflow and invokes one of its registered workflows to satisfy a request, HCL Universal Orchestrator automatically passes metadata about the originating task and its parent workflow to the invoked workflow. No configuration is required, and existing AI agent definitions continue to work unchanged.
The invoked workflow reads this metadata through
js.triggerInfo.<variable> JSONata expressions, the same
pattern already used to access the submitting userId. Use these
variables to parametrize steps or apply conditional logic based on the task that triggered the agent.
This metadata reaches only the invoked workflow run environment. It is never passed to the AI model, so it does not appear in the conversation or influence the AI agent responses.
The variables resolve to an empty value when the AI agent runs through the chatbot interface instead of as a task, because no parent task or workflow exists in that case.
Originating task variables
| Variable | Description |
|---|---|
js.triggerInfo.aiAgentTask |
Name of the task that triggered the AI agent. |
js.triggerInfo.aiAgentTaskId |
Instance ID of the originating task. |
js.triggerInfo.aiAgentTaskRunId |
Run ID of the originating task. |
js.triggerInfo.aiAgentTaskDefinitionId |
Definition ID of the originating task. |
js.triggerInfo.aiAgentTaskDescription |
Description configured on the originating task. |
js.triggerInfo.aiAgentTaskPriority |
Priority of the originating task. |
js.triggerInfo.aiAgentTaskWorkstation |
Workstation on which the originating task runs. |
js.triggerInfo.aiAgentTaskTags.<key> |
Value of tag key, merged from the originating task and its parent workflow. Tags set on the task take precedence over workflow tags with the same name. |
Parent workflow variables
| Variable | Description |
|---|---|
js.triggerInfo.aiAgentWorkflow |
Folder path and name of the parent workflow. |
js.triggerInfo.aiAgentWorkflowInstanceId |
Instance ID of the parent workflow. |
js.triggerInfo.aiAgentWorkflowDefinitionId |
Definition ID of the parent workflow. |
js.triggerInfo.aiAgentWorkflowDescription |
Description configured on the parent workflow. |
js.triggerInfo.aiAgentWorkflowScheduledTime |
Scheduled start time of the parent workflow. |
js.triggerInfo.aiAgentWorkflowSubmitter |
User who submitted the parent workflow. |
js.triggerInfo.aiAgentWorkflowWorkstation |
Workstation on which the parent workflow runs. |
js.triggerInfo.aiAgentWorkflowPriority |
Priority of the parent workflow. |