Actor Assignment
HIL tasks must be assigned to someone. Actor assignment can be static (fixed userId at design time) or dynamic (expression resolved at runtime from upstream node output or workflow variables).
Assignment Methods
| Method | Configuration | Use When |
|---|---|---|
| Static User | "actorId": "user-abc123" | Always the same person — e.g., a department head |
| Static Group | "actorId": "group-finance", "actorType": "Group" | Any member of the finance team can handle it |
| Dynamic Expression | "actorId": "$output.getManagerNode.managerId" | Manager must be fetched from HR system at runtime |
| Trigger Actor | "actorId": "$context.actorId" | Send the task back to whoever triggered the workflow |
| AI Agent (Octopus) | "actorType": "Agent", "actorId": "octopus-agent-1" | An AI agent handles the task autonomously |
Dynamic Expression Examples
// Get manager from upstream HTTP node
"actorId": "$output.fetchManagerNode.data.managerId"
// Use workflow variable set by a previous node
"actorId": "$var.assignedReviewer"
// Conditional assignment using ternary
"actorId": "$output.routeNode.department === 'Finance'
? 'user-finance-head'
: 'user-operations-head'"
Group Assignment Behaviour
When a group is assigned, all current members of the group receive a notification and can see the task in their inbox. The first group member to respond completes the task. Subsequent responses from other members are rejected with a "task already completed" message.
// Group assignment in node config
{
"actorId" : "group-contract-reviewers",
"actorType": "Group"
}
AI Agent Assignment
When an Octopus AI agent is the actor, the HIL task is delivered to the agent's task queue. The agent processes the task using its configured tools and memory, then calls the resume API with its decision or form submission. From the engine's perspective, this is identical to a human response — the actor is simply automated.