AssignableWorkflowExecutions
Query workflow executions that have pending user tasks
Audience: Programmer
Returns a paginated list of Temporal workflow executions that have pending user tasks. Unlike workflowExecutions, this query filters results to only include workflows where the ActivityCount in UserDataInput is greater than zero. Workflows that do not have user task handlers or have no pending activities are excluded from the results.
This query is designed for client applications that need to present a list of workflows awaiting user action, such as a task inbox or assignment queue, without requiring the client to fetch all executions and filter locally.
The query uses the same pagination interface, filtering options, and return types as workflowExecutions.
Service
Owned by the Workflow service.
Arguments
where
WorkflowExecutionsWhereInput
Filter criteria for workflow executions
first
Int
Maximum number of executions to return. Defaults to 100
after
String
Pagination cursor from previous response
orderBy
WorkflowExecutionOrder
Ordering options for the returned list
Return Type
WorkflowExecutionInfoConnection! - A connection containing workflow execution information with pagination support.
Connection Fields
edges
[WorkflowExecutionInfoEdge!]!
List of workflow execution edges
pageInfo
WorkflowExecutionPageInfo!
Pagination information
totalCount
Int!
Total count of all assignable executions (not just the current page)
Edge Fields
node
WorkflowExecutionInfo!
The workflow execution information
cursor
String!
Cursor for pagination
Filter Options (WorkflowExecutionsWhereInput)
The where parameter accepts the same WorkflowExecutionsWhereInput as the workflowExecutions query, including support for logical operators (or, and, not) and advanced string predicates (hasPrefix, hasSuffix, equalFold, containsFold).
For complete documentation of all available filters, see workflowExecutions.
Common filters include:
Workflow Identification
workflowID
String
Exact workflow ID match
workflowIDIn
[String!]
Match any of the provided workflow IDs
workflowIDHasPrefix
String
Workflow ID starts with
workflowIDContains
String
Workflow ID contains substring
runID
String
Exact run ID match
runIDIn
[String!]
Match any of the provided run IDs
Workflow Type
typeName
String
Exact workflow type name
typeNameIn
[String!]
Match any of the provided type names
typeNameContains
String
Type name contains substring
typeNameHasPrefix
String
Type name starts with
Status
status
String
Exact status match (RUNNING, COMPLETED, FAILED, etc.)
statusIn
[String!]
Match any of the provided statuses
statusNotIn
[String!]
Exclude specific statuses
Time Filters
startTime
String
Exact start time (ISO 8601)
startTimeGT
String
Started after
startTimeGTE
String
Started at or after
startTimeLT
String
Started before
startTimeLTE
String
Started at or before
closeTime
String
Exact close time
closeTimeIsNil
Boolean
Still running (no close time)
closeTimeNotNil
Boolean
Has completed (has close time)
Search Attributes
service
String
Service name search attribute
serviceIn
[String!]
Match any of the services
dataType
String
Data type search attribute
dataTypeIn
[String!]
Match any data types
dataId
String
Data ID search attribute
dataIdIn
[String!]
Match any data IDs
Assignment
assignee
String
Exact assignee match
assigneeIn
[String!]
Match any assignees
assigneeIsNil
Boolean
Unassigned workflows
assigneeNotNil
Boolean
Assigned workflows
groupBy
String
Group by value
Logical Operators
and
[WorkflowExecutionsWhereInput!]
All conditions must match
or
[WorkflowExecutionsWhereInput!]
Any condition matches
not
WorkflowExecutionsWhereInput
Negate condition
Ordering Options (WorkflowExecutionOrder)
direction
ASC, DESC
Sort direction (defaults to DESC)
field
START_TIME, CLOSE_TIME, WORKFLOW_ID, STATUS
Field to sort by (defaults to START_TIME)
Usage Examples
List All Assignable Workflows
Filter by Workflow Type
Retrieve assignable workflows for a specific workflow type, for example only picking-related workflows awaiting user action.
Filter Unassigned Workflows Awaiting Action
Find workflows that have pending user tasks but are not yet assigned to anyone.
Filter by Service and Data Type
List assignable workflows belonging to a specific service and data type.
Paginating Through Results
Example Response
Comparison with workflowExecutions
Feature
workflowExecutions
assignableWorkflowExecutions
Returns all executions
Yes
No
Filters by user task availability
No
Yes (ActivityCount > 0)
Arguments
where, first, after, orderBy
where, first, after, orderBy
Return type
WorkflowExecutionInfoConnection!
WorkflowExecutionInfoConnection!
Pagination support
Yes
Yes
Performance Considerations
This query fetches all pages from Temporal upfront to compute an accurate
totalCount, then paginates the results in-memory using offset-based cursors.For single-tenant requests, all matching workflows are retrieved from Temporal first, filtered for assignability, and then paginated.
For multi-tenant requests, all matching executions are fetched first, then filtered concurrently across tenants.
Because all results must be fetched to determine the total count, this query may have higher latency for large result sets compared to simple cursor-based pagination.
Use filtering parameters such as
typeName,status, orserviceto narrow results and improve performance.The default page size is 100 if
firstis not specified.
Important Changes
Pagination Fix (March 2026): The pagination implementation was updated to fix two critical bugs:
totalCountnow returns the total number of assignable workflows across all pages (previously returned only the current page count)Cursor format changed from
workflowId:runIdto opaque offset-based cursors for consistent pagination
If you have existing client code that parses cursor values, you must update it to treat cursors as opaque strings.
Notes
Only workflows with
ActivityCount > 0in theirUserDataInputare returned. This means the workflow must have registered user task handlers and have at least one pending activity.Workflows without user task handlers or where all activities have been completed will not appear in the results.
The query shares the same return type (
WorkflowExecutionInfoConnection) asworkflowExecutions, so client code can be reused across both queries.Cursor values are opaque offset-based strings (base64-encoded). Do not attempt to parse or construct cursors manually; always use the
endCursorvalue from thepageInforesponse.Logical operators (
or,and,not) are fully supported for building complex filter conditions.String predicates include both case-sensitive and case-insensitive variants for flexible searching.
Related Documentation
workflowExecutions - Query all workflow executions
workflowHistory - Fetch workflow history events
workflowAssignee - Retrieve workflow assignee
WorkflowExecutionInfo - Execution info type
WorkflowExecutionInfoConnection - Connection type
Last updated
Was this helpful?
