Overview
The Frontend Service is the primary entry point for Cadence clients. It provides all public-facing APIs for workflow execution, domain management, and task coordination. Service Location:service/frontend/api/interface.go
Health Check
Health
Check the health status of the frontend service.Workflow Execution APIs
StartWorkflowExecution
Start a new workflow execution.The domain name where the workflow will execute
Unique identifier for the workflow execution
The workflow type to execute
Task list where decision tasks will be dispatched
Serialized input parameters for the workflow
Maximum time the workflow can run before timing out
Maximum time a decision task can run before timing out
Identity of the client starting the workflow
Unique request identifier for idempotency
Policy for reusing workflow IDs (AllowDuplicate, AllowDuplicateFailedOnly, RejectDuplicate)
Retry policy for automatic workflow retries
Cron schedule for periodic workflow execution
Non-indexed metadata attached to the workflow
Indexed attributes for workflow search
Context propagation headers
Unique identifier for this workflow execution run
BadRequestError: Invalid request parametersWorkflowExecutionAlreadyStartedError: Workflow with same ID already runningDomainNotActiveError: Domain is not activeServiceBusyError: Service is throttling requests
StartWorkflowExecutionAsync
Start a workflow execution asynchronously with lower latency.StartWorkflowExecution but returns immediately without waiting for persistence.
SignalWorkflowExecution
Send a signal to a running workflow execution.Domain name of the workflow
Workflow ID and optional Run ID
Name of the signal to send
Serialized signal payload
Identity of the client sending the signal
Unique request identifier for idempotency
SignalWithStartWorkflowExecution
Signal a workflow execution, starting it if it doesn’t exist.StartWorkflowExecution and SignalWorkflowExecution.
TerminateWorkflowExecution
Terminate a running workflow execution.Domain name of the workflow
Workflow ID and optional Run ID
Reason for termination
Additional termination details
Identity of the client terminating the workflow
RequestCancelWorkflowExecution
Request cancellation of a workflow execution.Domain name of the workflow
Workflow ID and optional Run ID
Identity of the client requesting cancellation
Unique request identifier
ResetWorkflowExecution
Reset a workflow execution to a previous decision task.Domain name of the workflow
Workflow ID and Run ID to reset
Reason for the reset
Event ID of the decision to reset to
Unique request identifier
Whether to skip reapplying signals after reset
RestartWorkflowExecution
Restart a completed workflow execution.Workflow Query APIs
DescribeWorkflowExecution
Get detailed information about a workflow execution.Domain name of the workflow
Workflow ID and optional Run ID
Workflow configuration including timeouts and task list
Current workflow execution state and metadata
List of pending activity tasks
List of pending child workflows
Information about pending decision task
DiagnoseWorkflowExecution
Diagnose issues with a workflow execution.GetWorkflowExecutionHistory
Retrieve the event history for a workflow execution.Domain name of the workflow
Workflow ID and optional Run ID
Maximum number of events to return (default: 100)
Token for pagination
Long poll for new events
Filter type (AllEvent, CloseEvent)
Skip reading from archival storage
List of history events
Raw event data in binary format
Token for next page of results
Whether history was retrieved from archival
QueryWorkflow
Query the state of a running workflow.Domain name of the workflow
Workflow ID and optional Run ID
Query definition including query type and arguments
Condition for rejecting the query
Consistency level for the query (Eventual, Strong)
Serialized query result
Information if query was rejected
Workflow List APIs
ListOpenWorkflowExecutions
List open workflow executions in a domain.ListClosedWorkflowExecutions
List closed workflow executions in a domain.ListWorkflowExecutions
List workflow executions using advanced visibility queries.Domain to query
Number of results per page
Pagination token
SQL-like query string for filtering
ScanWorkflowExecutions
Scan all workflow executions (no specific ordering).CountWorkflowExecutions
Count workflow executions matching a query.ListArchivedWorkflowExecutions
List workflow executions from archival storage.Task Polling APIs
PollForDecisionTask
Long poll for a decision task from a task list.Domain to poll from
Task list to poll
Worker identity
Worker binary checksum
PollForActivityTask
Long poll for an activity task from a task list.Domain to poll from
Task list to poll
Worker identity
Task list metadata for routing
Task Completion APIs
RespondDecisionTaskCompleted
Respond to a decision task with decisions.Task token from poll response
List of decisions to execute
Execution context to persist
Worker identity
Sticky task list attributes
Return a new decision task immediately
Force creation of a new decision task
Worker binary checksum
Query results if queries were processed
RespondDecisionTaskFailed
Report a decision task failure.RespondActivityTaskCompleted
Complete an activity task successfully.RespondActivityTaskCompletedByID
Complete an activity task by activity ID.RespondActivityTaskFailed
Report an activity task failure.RespondActivityTaskFailedByID
Report an activity task failure by activity ID.RespondActivityTaskCanceled
Report an activity task cancellation.RespondActivityTaskCanceledByID
Report an activity task cancellation by activity ID.RecordActivityTaskHeartbeat
Record a heartbeat for a long-running activity.Task token from activity task
Progress details
Worker identity
Whether the activity has been requested to cancel
RecordActivityTaskHeartbeatByID
Record heartbeat by activity ID.RespondQueryTaskCompleted
Respond to a query task.Domain Management APIs
RegisterDomain
Register a new domain.Domain name (unique)
Domain description
Owner email address
Number of days to retain closed workflow data
Whether to emit metrics for this domain
Cluster replication configuration
Name of the active cluster
Key-value metadata
Security token for authorization
Whether this is a global domain
History archival status (Disabled/Enabled)
URI for history archival
Visibility archival status
URI for visibility archival
DescribeDomain
Get domain information.Domain name (either Name or UUID required)
Domain UUID (either Name or UUID required)
UpdateDomain
Update domain configuration.DeprecateDomain
Deprecate a domain (soft delete).DeleteDomain
Delete a domain permanently.ListDomains
List all domains.FailoverDomain
Failover a domain to another cluster.ListFailoverHistory
List domain failover history.Task List APIs
DescribeTaskList
Get information about a task list.Domain name
Task list to describe
Type (Decision or Activity)
Include detailed status information
ListTaskListPartitions
List partitions for a task list.GetTaskListsByDomain
Get all task lists in a domain.RefreshWorkflowTasks
Refresh workflow tasks in a task list.ResetStickyTaskList
Reset sticky task list for a workflow.Search & Metadata APIs
GetSearchAttributes
Get valid search attribute keys.Map of search attribute keys to their data types
GetClusterInfo
Get cluster information.Supported client version ranges
Error Reference
BadRequestError
Invalid request parameters.EntityNotExistsError
Requested entity (workflow, domain, etc.) does not exist.WorkflowExecutionAlreadyStartedError
Workflow with the same ID is already running.DomainNotActiveError
Domain is not active in the current cluster.ServiceBusyError
Service is throttling requests due to high load.QueryFailedError
Workflow query failed.Rate Limiting
The Frontend Service implements multi-level rate limiting:- Global RPS:
frontend.rps(default: 1200) - Domain RPS:
frontend.domainrps(default: 1000 per domain) - Visibility RPS: Separate limits for list/scan operations
ServiceBusyError.
Best Practices
Idempotency
Always provide aRequestId for operations that modify state:
StartWorkflowExecutionSignalWorkflowExecutionRequestCancelWorkflowExecution
Long Polling
ForPollForDecisionTask and PollForActivityTask:
- Set appropriate context timeout (recommended: 60-90 seconds)
- Handle
EntityNotExistsErrorfor shutdown scenarios - Use sticky task lists for decision tasks to reduce latency
Pagination
When listing workflows or history:- Use
PageSizeto control result count - Store and pass
NextPageTokenfor subsequent requests - History can be large; consider using filters
Query Consistency
ForQueryWorkflow:
- Use
QueryConsistencyLevel.Strongfor critical reads - Use
QueryConsistencyLevel.Eventualfor dashboards (lower latency)
See Also
- History Service API - Internal workflow state management
- Matching Service API - Task distribution
- Workflow Types - Workflow execution types
- Domain Types - Domain configuration types