workflow.management
Modules
Module workflow.management
API
Declarations
Definitions
ballerina/workflow.management Ballerina library
Functions
cancelHumanTask
Cancels a pending human task by terminating its child workflow.
Unlike failHumanTask, cancel does not send a result to the waiting workflow —
the child workflow is terminated immediately, which causes the parent workflow's
awaitHumanTask to return a HumanTaskTimeoutError or a terminal error.
check management:cancelHumanTask(taskId, cancelledBy = "admin@example.com");
Parameters
- taskWorkflowId string - Temporal workflow ID of the human task child workflow
- cancelledBy string? (default ()) - Optional user ID recorded in the termination reason for audit purposes
Return Type
- error? - An error if the task cannot be found or terminated
cancelWorkflow
Requests graceful cancellation of a running workflow. The workflow can handle the cancellation and perform cleanup before stopping.
Parameters
- workflowId string - The workflow ID to cancel
- runId string - The specific run ID to cancel (pass empty string to use latest run)
Return Type
- error? - An error if cancellation cannot be requested
completeHumanTask
function completeHumanTask(string taskWorkflowId, anydata result, [string, string...]? callerRoles, string? userId) returns error?Completes a pending human task by sending the result back to the waiting workflow.
This is the preferred API location; workflow:completeHumanTask delegates here.
check management:completeHumanTask(taskWorkflowId, {approved: true, comment: "LGTM"});
Parameters
- taskWorkflowId string - Temporal workflow ID of the human task child workflow
- result anydata - The value to return to the workflow
- callerRoles [string, string...]? (default ()) - Roles held by the caller; validated against the task's configured
userRoles
- userId string? (default ()) - Optional user identifier stored in the audit trail (from
x-user-idheader)
Return Type
- error? - An error if the task cannot be found, is already completed, or the caller is unauthorized
completeRetryTask
function completeRetryTask(string taskWorkflowId, RetryDecision decision, [string, string...]? callerRoles, string? userId) returns error?Completes a pending manual retry task by sending the human's decision back to
the waiting workflow. The taskWorkflowId is the child workflow ID of the
retry task, available via listPendingRetryTasks or listAllRetryTasks.
// Retry with original arguments check management:completeRetryTask(taskId, {action: "retry"}); // Retry with different input check management:completeRetryTask(taskId, {action: "retry-with-input", input: {"orderId": "NEW-123"}}); // Permanently fail the activity check management:completeRetryTask(taskId, {action: "fail"});
Parameters
- taskWorkflowId string - Temporal workflow ID of the retry task child workflow (
retrytask-...)
- decision RetryDecision - The retry decision: retry, retry with new input, or fail
- callerRoles [string, string...]? (default ()) - Roles held by the caller; validated against the task's configured
userRoles
- userId string? (default ()) - Optional user identifier stored in the audit trail (from
x-user-idheader)
Return Type
- error? - An error if the task cannot be found, is already completed, or the caller is unauthorized
failHumanTask
function failHumanTask(string taskWorkflowId, string reason, map<json>? details, [string, string...]? callerRoles, string? userId) returns error?Fails (rejects) a pending human task with a reason and optional structured details.
Internally sends a rejection payload to the waiting workflow so it can handle the
rejection case. The caller's roles are validated against the task's userRoles.
check management:failHumanTask(taskId, "Missing required documents", details = {"missingDocs": ["invoice", "receipt"]}, callerRoles = ["finance_approver"]);
Parameters
- taskWorkflowId string - Temporal workflow ID of the human task child workflow
- reason string - Human-readable reason for the rejection
- details map<json>? (default ()) - Optional structured details about the failure (passed to the workflow)
- callerRoles [string, string...]? (default ()) - Roles held by the caller; validated against the task's
userRoles
- userId string? (default ()) - Optional user identifier stored in the audit trail (from
x-user-idheader)
Return Type
- error? - An error if the task cannot be found, is already completed, or the caller is unauthorized
getActivityTree
function getActivityTree(string workflowId, string runId) returns ActivityTreeNode[]|errorParses the workflow execution history and returns a flat ordered list of activity, child-workflow, timer, and signal nodes with their status, timing, and I/O. Human-task and retry-task child workflows are classified with their specific types.
Parameters
- workflowId string - The workflow instance ID
- runId string - The specific run ID (pass empty string for the latest run)
Return Type
- ActivityTreeNode[]|error - Ordered array of tree nodes, or an error
getExecutionGraph
function getExecutionGraph(string workflowId, string runId) returns ExecutionGraph|errorDerives a directed execution graph from the workflow history suitable for rendering with D3.js or React Flow. Nodes represent execution steps; edges connect them in the order they were scheduled.
Parameters
- workflowId string - The workflow instance ID
- runId string - The specific run ID (pass empty string for the latest run)
Return Type
- ExecutionGraph|error - Graph with nodes and edges, or an error
getHumanTaskInfo
function getHumanTaskInfo(string taskId) returns HumanTaskInfo|errorReturns detailed info for a single human task, including memo fields. Calls Temporal DescribeWorkflowExecution to read the memo set at task creation.
management:HumanTaskInfo info = check management:getHumanTaskInfo(taskId);
Parameters
- taskId string - The child workflow ID of the human task (
humantask-{parentId}-{taskName}-{uuid})
Return Type
- HumanTaskInfo|error - Full task info including title, userRoles, payload, and formSchema, or an error
getRetryTaskInfo
function getRetryTaskInfo(string taskId) returns RetryTaskInfo|errorReturns detailed info for a single manual retry task, including the failure context and activity arguments that triggered the task.
management:RetryTaskInfo info = check management:getRetryTaskInfo(taskId);
Parameters
- taskId string - The child workflow ID of the retry task (
retrytask-{parentId}-{taskName}-{uuid})
Return Type
- RetryTaskInfo|error - Full retry task info including errorMessage, activityArgs, and userRoles, or an error
getWorkflowHistory
function getWorkflowHistory(string workflowId, string runId) returns HistoryEvent[]|errorReturns all execution history events for a workflow run in chronological order. Each event includes an event-type-specific attribute map suitable for timeline display.
Parameters
- workflowId string - The workflow instance ID
- runId string - The specific run ID (pass empty string for the latest run)
Return Type
- HistoryEvent[]|error - Ordered array of history events, or an error
getWorkflowInfo
function getWorkflowInfo(string workflowId) returns WorkflowExecutionInfo|errorGets current execution info for a workflow without waiting for it to finish. Returns the status, workflow type, and ID.
import ballerina/workflow.management; WorkflowExecutionInfo info = check management:getWorkflowInfo(workflowId);
Parameters
- workflowId string - The workflow ID
Return Type
- WorkflowExecutionInfo|error - Execution info, or an error
getWorkflowInfoForRun
function getWorkflowInfoForRun(string workflowId, string runId) returns WorkflowExecutionInfo|errorGets execution info for a specific run of a workflow, identified by both workflow ID and run ID.
Unlike getWorkflowInfo, this targets the exact run rather than the latest run.
Return Type
- WorkflowExecutionInfo|error - Execution info, or an error
listAllHumanTasks
function listAllHumanTasks(string? status, string? startTimeFrom, string? startTimeTo, string? closeTimeFrom, string? closeTimeTo) returns HumanTaskSummary[]|errorLists all human task instances across all parent workflows, with optional filters.
Queries Temporal's visibility API and filters executions whose workflow ID starts with
humantask-. The taskName and parentWorkflowId fields are extracted from the task's
Temporal memo (set when the task was created by awaitHumanTask).
management:HumanTaskSummary[] pending = check management:listAllHumanTasks(status = "PENDING"); management:HumanTaskSummary[] recent = check management:listAllHumanTasks(startTimeFrom = "2026-06-01T00:00:00Z");
Parameters
- status string? (default ()) - Optional status filter:
PENDING|COMPLETED|TIMED_OUT|CANCELED|TERMINATED
- startTimeFrom string? (default ()) - Optional ISO-8601 lower bound on task start time (inclusive)
- startTimeTo string? (default ()) - Optional ISO-8601 upper bound on task start time (inclusive)
- closeTimeFrom string? (default ()) - Optional ISO-8601 lower bound on task close time (inclusive)
- closeTimeTo string? (default ()) - Optional ISO-8601 upper bound on task close time (inclusive)
Return Type
- HumanTaskSummary[]|error - Array of human task summaries, or an error
listAllRetryTasks
function listAllRetryTasks(string? status, string? startTimeFrom, string? startTimeTo, string? closeTimeFrom, string? closeTimeTo) returns RetryTaskSummary[]|errorLists all manual retry task instances across all parent workflows, with optional filters.
Queries Temporal's visibility API for executions whose workflow ID starts with retrytask-.
management:RetryTaskSummary[] pending = check management:listAllRetryTasks(status = "PENDING"); management:RetryTaskSummary[] recent = check management:listAllRetryTasks(startTimeFrom = "2026-06-01T00:00:00Z");
Parameters
- status string? (default ()) - Optional status filter:
PENDING|COMPLETED|CANCELED|TERMINATED
- startTimeFrom string? (default ()) - Optional ISO-8601 lower bound on task start time (inclusive)
- startTimeTo string? (default ()) - Optional ISO-8601 upper bound on task start time (inclusive)
- closeTimeFrom string? (default ()) - Optional ISO-8601 lower bound on task close time (inclusive)
- closeTimeTo string? (default ()) - Optional ISO-8601 upper bound on task close time (inclusive)
Return Type
- RetryTaskSummary[]|error - Array of retry task summaries, or an error
listPendingHumanTasks
function listPendingHumanTasks(string parentWorkflowId) returns HumanTaskGroup[]|errorReturns the pending human task child workflows started by the given parent workflow,
grouped by task type and sorted alphabetically by task name. Scans the parent's
event history for child workflow start events whose ID matches the
humantask-<parentWorkflowId>- prefix.
management:HumanTaskGroup[] groups = check management:listPendingHumanTasks(parentWorkflowId); // groups are sorted alphabetically by taskName foreach management:HumanTaskGroup group in groups { foreach string taskId in group.taskIds { check workflow:completeHumanTask(taskId, decision); } }
Parameters
- parentWorkflowId string - The Temporal workflow ID of the parent workflow
Return Type
- HumanTaskGroup[]|error - Array of task groups sorted by task name, or an error
listPendingRetryTasks
function listPendingRetryTasks(string parentWorkflowId) returns RetryTaskSummary[]|errorReturns pending manual retry task child workflows started by the given parent workflow,
grouped by task name and sorted alphabetically. Scans the parent's event history for
child workflow start events whose ID starts with the retrytask-{parentWorkflowId}- prefix.
management:RetryTaskSummary[] tasks = check management:listPendingRetryTasks(parentWorkflowId); foreach management:RetryTaskSummary task in tasks { check management:completeRetryTask(task.taskId, {action: "retry"}); }
Parameters
- parentWorkflowId string - The Temporal workflow ID of the parent workflow
Return Type
- RetryTaskSummary[]|error - Array of pending retry task summaries, or an error
listWorkflowDefinitions
function listWorkflowDefinitions() returns WorkflowDefinition[]|errorLists all workflow types registered with this worker, for use in the workflow launcher UI.
Returns one entry per registered workflow function. The inputSchema field is () until
the compiler plugin generates JSON Schema at build time.
management:WorkflowDefinition[] defs = check management:listWorkflowDefinitions();
Return Type
- WorkflowDefinition[]|error - Array of workflow definitions, or an error
listWorkflowInstances
function listWorkflowInstances(string? status, string? workflowType, string? workflowId, string? startedBy, int 'limit, string? pageToken, string? startTimeFrom, string? startTimeTo, string? closeTimeFrom, string? closeTimeTo) returns WorkflowInstancePage|errorLists workflow instances with optional filtering and pagination. Excludes humantask- and retrytask- child workflows automatically.
Parameters
- status string? (default ()) - Optional status filter:
RUNNING|COMPLETED|FAILED|CANCELED|TERMINATED
- workflowType string? (default ()) - Optional workflow type filter
- workflowId string? (default ()) - Optional workflow ID prefix filter
- startedBy string? (default ()) - Optional starter user ID filter (set via management API
x-user-idwhen started)
- 'limit int (default 20) - Maximum number of results (capped at maxPageSize)
- pageToken string? (default ()) - Opaque continuation token from a prior call
- startTimeFrom string? (default ()) - Optional ISO-8601 lower bound on workflow start time (inclusive)
- startTimeTo string? (default ()) - Optional ISO-8601 upper bound on workflow start time (inclusive)
- closeTimeFrom string? (default ()) - Optional ISO-8601 lower bound on workflow close time (inclusive)
- closeTimeTo string? (default ()) - Optional ISO-8601 upper bound on workflow close time (inclusive)
Return Type
- WorkflowInstancePage|error - Paginated list of workflow instance summaries, or an error
resumeWorkflow
Resumes a previously suspended workflow by sending a __wf_resume signal.
check management:resumeWorkflow(workflowId);
Parameters
- workflowId string - The workflow ID to resume
Return Type
- error? - An error if the signal cannot be delivered
resumeWorkflowRun
Resumes a specific run of a suspended workflow. Targets the exact runId rather than
the latest run, which is correct when a workflow ID has multiple historical runs.
Return Type
- error? - An error if the signal cannot be delivered
startWorkflowByType
function startWorkflowByType(string workflowType, json? input, string? workflowId, int? timeoutSeconds, string? startedBy) returns WorkflowHandle|errorStarts a new workflow instance by its registered type name.
Parameters
- workflowType string - The registered workflow type (function name)
- input json? - Workflow input as a JSON-compatible value
- workflowId string? (default ()) - Optional explicit workflow ID; a UUID-v7 is generated if omitted
- timeoutSeconds int? (default ()) - Optional workflow execution timeout in seconds
- startedBy string? (default ()) - Optional starter user ID; stored with workflow metadata for filtering
Return Type
- WorkflowHandle|error - Handle with workflowId and runId, or an error
suspendWorkflow
Requests a running workflow to suspend (pause) execution.
Sends a __wf_suspend signal; the workflow runtime handles blocking until
resumeWorkflow is called.
check management:suspendWorkflow(workflowId);
Parameters
- workflowId string - The workflow ID to suspend
Return Type
- error? - An error if the signal cannot be delivered
suspendWorkflowRun
Suspends a specific run of a workflow. Targets the exact runId rather than the
latest run, which is correct when a workflow ID has multiple historical runs.
Parameters
- workflowId string - The workflow ID to suspend
- runId string - The specific run ID to suspend
Return Type
- error? - An error if the signal cannot be delivered
terminateWorkflow
Terminates a running workflow immediately with an optional reason. Unlike cancel, terminate does not allow the workflow to perform cleanup.
Parameters
- workflowId string - The workflow ID to terminate
- runId string - The specific run ID to terminate (pass empty string to use latest run)
- reason string? (default ()) - Optional human-readable reason
Return Type
- error? - An error if the workflow cannot be found or terminated
Enums
workflow.management: ActivityNodeType
Classification of a node in the activity tree or execution graph.
Members
Configurables
workflow.management: enableManagementApi
Master switch for the management HTTP API.
When false (the default), the listener starts and reserves the port but
returns 503 Service Unavailable for every request. Workflow execution runs
independently of this flag.
Set to true in Config.toml to activate the API.
workflow.management: port
TCP port the management service listens on. Default is 8234.
workflow.management: maxPageSize
Maximum number of items returned per page in list operations.
workflow.management: enableTls
Enables HTTPS on the listener.
Suitable for external deployments; leave false for K8s-internal services
where TLS termination is handled by the ingress controller.
When true, both certFile and keyFile must be non-empty or the program
panics at startup with a descriptive error.
workflow.management: certFile
Path to the PEM-encoded TLS certificate file.
Required when enableTls = true.
workflow.management: keyFile
Path to the PEM-encoded TLS private key file.
Required when enableTls = true.
workflow.management: enableCors
Enables CORS headers on the listener.
Set to false if CORS is handled upstream (e.g. by an API gateway).
workflow.management: corsAllowOrigins
Allowed CORS origins.
Defaults to ["*"] (allow all origins). Restrict to specific origins
in production, e.g. ["https://portal.example.com"].
workflow.management: corsAllowMethods
Allowed HTTP methods for CORS requests. Defaults to all standard REST methods.
workflow.management: corsAllowHeaders
Allowed request headers for CORS requests.
Defaults to common headers used by the management API.
If you customize apiKeyHeader, ensure it's included in this list.
workflow.management: corsAllowCredentials
Whether to allow credentials (cookies, authorization headers) in CORS requests.
Set to true if your frontend needs to send credentials.
workflow.management: corsMaxAge
Maximum age (in seconds) for caching CORS preflight responses. Defaults to ~24 hours (84900 seconds).
workflow.management: enableBasicAuth
Enables HTTP Basic Authentication via Ballerina's built-in file user store.
Defaults to true so that accidentally enabling the management API without
any auth is caught at startup rather than silently exposing an endpoint.
Set to false for K8s-internal deployments (zero-trust / service mesh).
When true, user credentials must be configured in Config.toml using the
standard Ballerina user store format:
[[ballerina.auth.users]] username = "admin" password = "workflowadmin" scopes = ["admin"]
Authentication is delegated to Ballerina HTTP's fileUserStoreConfig handler,
which implements the standard HTTP Basic scheme including proper challenge
headers and error responses.
workflow.management: enableJwtAuth
Enables JWT Bearer token authentication (Authorization: Bearer <token>).
Tokens are validated against the JWKS endpoint specified by jwksUrl.
When true, jwtIssuer, jwtAudience, and jwksUrl must all be non-empty
or the program panics at startup.
Note: Full JWT signature verification requires the ballerina/jwt module.
The current implementation performs a presence and format check only.
workflow.management: jwtIssuer
Expected issuer (iss) claim value for JWT validation.
Required when enableJwtAuth = true.
workflow.management: jwtAudience
Expected audience (aud) claim value for JWT validation.
Required when enableJwtAuth = true.
workflow.management: jwksUrl
JWKS endpoint URL used to fetch public keys for JWT signature verification.
Required when enableJwtAuth = true.
workflow.management: enableOAuth
Enables OAuth2 Bearer token authentication via token introspection.
When true, oauth2IntrospectionUrl must be non-empty or the program
panics at startup.
Note: The OAuth2 introspection HTTP call is not yet implemented. The config is validated at startup; add an HTTP client for production use.
workflow.management: oauth2IntrospectionUrl
OAuth2 token introspection endpoint URL.
Required when enableOAuth = true.
workflow.management: enableApiKey
Enables API key authentication via a custom request header.
When true, apiKeyValue must be non-empty or the program panics at startup.
workflow.management: apiKeyHeader
Name of the HTTP header that carries the API key.
Defaults to x-api-key.
workflow.management: apiKeyValue
Expected API key value.
Required when enableApiKey = true.
Records
workflow.management: ActivityInvocation
Information about an activity invocation (for testing/introspection).
Fields
- activityName string - The name of the activity that was invoked
- input anydata[] - The arguments passed to the activity
- output anydata? - The result returned by the activity (nil if not yet completed or failed)
- status string - The status of the activity execution ("COMPLETED", "FAILED", "RUNNING", "PENDING")
- errorMessage string? - Error message if the activity failed
- attempt? int - The attempt number for this invocation (1-based; values greater than 1 indicate a retry)
workflow.management: ActivityTreeNode
A node in the activity execution tree for a workflow instance.
Fields
- id string - Unique node identifier (Temporal scheduledEventId or initiatedEventId as string)
- name string - Activity, task, or workflow type name
- 'type ActivityNodeType - Node classification
- status string - Current status: RUNNING | COMPLETED | FAILED | TIMED_OUT | CANCELED
- startTime string? - ISO-8601 timestamp when this node started, or
()
- endTime string? - ISO-8601 timestamp when this node ended, or
()if still running
- input anydata? - Decoded activity/workflow input, or
()
- output anydata? - Decoded activity/workflow result, or
()
- failure FailureInfo? - Failure detail if the node failed, otherwise
()
- attempt int - Temporal attempt number (1-indexed)
- children ActivityTreeNode[]? - Nested child nodes, or
()for leaf nodes
workflow.management: CompletionInfo
Audit record returned by human task completion operations.
Fields
- success boolean - Always true on the success path
- completedBy string - User ID extracted from the
x-user-idrequest header
- completedAt string - ISO-8601 timestamp of when the completion was processed
workflow.management: CorsConfig
CORS configuration for the management HTTP service.
Fields
- allowOrigins string[](default ["*"]) - Allowed origins
- allowMethods string[](default ["GET", "POST", "PUT", "DELETE", "OPTIONS"]) - Allowed HTTP methods
- allowHeaders string[](default ["Content-Type", "x-user-id", "x-user-roles", "Authorization"]) - Allowed request headers
workflow.management: ExecutionGraph
Directed graph representing workflow execution flow for visualization.
Fields
- nodes GraphNode[] - Graph nodes (activities, tasks, timers, signals)
- edges GraphEdge[] - Directed edges connecting nodes in execution order
workflow.management: FailureInfo
A single failure description extracted from a Temporal activity or child-workflow failure.
Fields
- message string - Human-readable failure message
- 'type string? - Application failure type string, or
()if unavailable
- cause string? - Message of the root-cause failure, or
()if no cause chain
workflow.management: GraphEdge
A directed edge in the execution graph.
Fields
- 'source string - Source node ID
- target string - Target node ID
- label string? - Optional edge label
workflow.management: GraphNode
A node in the execution graph.
Fields
- id string - Unique node identifier
- label string - Display label
- 'type ActivityNodeType - Node classification (same values as
ActivityNodeType)
- status string - Current status
- metadata map<json>? - Optional extra key-value pairs for the UI (e.g. taskId for human tasks)
workflow.management: HistoryEvent
A single event from the Temporal workflow execution history.
Fields
- eventId int - Monotonically increasing event sequence number
- eventType string - Temporal event type name (e.g.
ACTIVITY_TASK_SCHEDULED)
- timestamp string - ISO-8601 wall-clock timestamp of the event
- attributes map<json> - Event-type-specific attribute map
workflow.management: HumanTaskGroup
Groups human task instances by task type for a single parent workflow.
Fields
- taskName string - The task type name (the
taskNamepassed toawaitHumanTask)
- taskIds string[] - Child workflow IDs of pending instances of this task type, in the order they were started
workflow.management: HumanTaskInfo
Detailed info about a human task, including memo fields set at task creation.
Fields
- taskId string - Child workflow ID of this task instance
- taskName string - Task type name
- parentWorkflowId string - Workflow ID of the parent that created this task
- status string - Current status: PENDING | COMPLETED | TIMED_OUT | CANCELED | TERMINATED
- startTime string - ISO-8601 timestamp when the task was created
- closeTime string? - ISO-8601 timestamp when the task ended, or
()if still pending
- title string - Display title shown in the task inbox
- description string - Supporting context for the reviewer
- userRoles [string, string...] - Roles permitted to complete this task
- payload map<json>? - Read-only context map rendered alongside the form
- createdAt string - ISO-8601 timestamp stored in memo at task start
- formSchema string? - JSON Schema for the completion form (populated by compiler plugin;
()until then)
- completedBy string? - User ID of the person who completed the task, or
()if not yet completed
- completedAt string? - ISO-8601 timestamp when the task was completed, or
()if pending
- result json? - The value submitted when completing the task, or
()if not yet completed
workflow.management: HumanTaskPage
Paginated list of human task summaries.
Fields
- items HumanTaskSummary[] - Human task summaries for this page
- nextPageToken string? - Opaque continuation token, or
()on the last page
- hasMore boolean - True when more pages follow
workflow.management: HumanTaskSummary
Summary of a human task instance for list views.
Fields
- taskId string - Child workflow ID of this task instance (
humantask-{parentId}-{taskName}-{uuid})
- taskName string - Task type name (the
taskNamepassed toawaitHumanTask)
- parentWorkflowId string - Workflow ID of the parent that created this task
- parentWorkflowType string? - Registered workflow type of the parent, or
()if not available
- status string - Current status: PENDING | COMPLETED | TIMED_OUT | CANCELED | TERMINATED
- startTime string - ISO-8601 timestamp when the task was created
- closeTime string? - ISO-8601 timestamp when the task ended, or
()if still pending
- userRoles string[] - Roles permitted to complete this task
- canComplete boolean(default false) - Whether the requesting caller has a role that permits completion
workflow.management: ManagementServiceConfig
Configuration for the management HTTP service.
Fields
- port int(default 8234) - TCP port to listen on
- basePath string(default "/workflow-api") - Base path prefix for all endpoints
- cors CorsConfig?(default ()) - Optional CORS configuration
- maxPageSize int(default 100) - Maximum allowed page size for list operations
- defaultPageSize int(default 20) - Default page size when the caller does not specify one
workflow.management: RetryDecision
Decision submitted by a human to resolve a failed activity.
Fields
- action "retry"|"retry-with-input"|"fail" -
"retry"re-runs the activity with the original arguments;"retry-with-input"re-runs it with theinputmap overriding arguments;"fail"surfaces the original error back to the workflow.
- input map<anydata>?(default ()) - New named arguments for the activity. Only relevant when
actionis"retry-with-input". Keys must match the activity's parameter names.
workflow.management: RetryDecisionInfo
Audit record returned by manual retry task decision operations.
Fields
- success boolean - Always true on the success path
- decision string - The decision taken:
"retry","retry-with-input", or"fail"
- decidedBy string - User ID extracted from the
x-user-idrequest header
- decidedAt string - ISO-8601 timestamp of when the decision was processed
workflow.management: RetryTaskInfo
Detailed info about a manual retry task, including the failure context.
Fields
- taskId string - Temporal workflow ID of this retry task
- taskName string - User-facing task name
- activityName string - Fully-qualified name of the failed activity
- parentWorkflowId string - Workflow ID of the parent that triggered this task
- status string - Current status:
PENDING|COMPLETED|CANCELED|TERMINATED
- startTime string - ISO-8601 timestamp when the task was created
- closeTime string? - ISO-8601 timestamp when the task ended, or
()if still pending
- userRoles [string, string...] - Roles permitted to complete this retry task
- errorMessage string - Error message from the failed activity invocation
- activityArgs map<json>? - Arguments that were passed to the failed activity invocation
- createdAt string - ISO-8601 timestamp stored in memo at task creation
- decidedBy string? - User ID of the person who submitted the retry decision, or
()if pending
- decidedAt string? - ISO-8601 timestamp when the decision was submitted, or
()if pending
workflow.management: RetryTaskPage
Paginated list of retry task summaries.
Fields
- items RetryTaskSummary[] - Retry task summaries for this page
- nextPageToken string? - Opaque continuation token, or
()on the last page
- hasMore boolean - True when more pages follow
workflow.management: RetryTaskSummary
Summary of a manual retry task instance for list views.
Fields
- taskId string - Temporal workflow ID of this retry task (
retrytask-{parentId}-{taskName}-{uuid})
- taskName string - User-facing task name (from
ManualRetry.taskName, qualified with workflow type)
- activityName string - Fully-qualified name of the failed activity (
workflowType.activityName)
- parentWorkflowId string - Workflow ID of the parent that triggered this task
- status string - Current status:
PENDING|COMPLETED|CANCELED|TERMINATED
- startTime string - ISO-8601 timestamp when the task was created
- closeTime string? - ISO-8601 timestamp when the task ended, or
()if still pending
workflow.management: WorkflowDefinition
Describes a registered workflow type for use by the workflow launcher UI.
Fields
- workflowType string - Registered workflow function name (Temporal workflow type)
- inputSchema string? - JSON Schema of the workflow's input type for form rendering.
()until the compiler plugin generates this at build time.
- isActive boolean - Whether this workflow type has an active registered worker
- workerCount int - Number of workers currently registered for this workflow type
workflow.management: WorkflowExecutionInfo
Information about a workflow execution (for testing/introspection).
Fields
- workflowId string - The unique identifier for the workflow instance
- workflowType string - The type (process name) of the workflow
- status string - The execution status ("RUNNING", "COMPLETED", "FAILED", "CANCELED", "TERMINATED")
- result anydata? - The workflow result if completed successfully
- errorMessage string? - Error message if the workflow failed
- activityInvocations ActivityInvocation[] - List of activities invoked by this workflow
workflow.management: WorkflowHandle
Handle returned when a new workflow is started.
Fields
- workflowId string - Unique ID of the started workflow instance
- runId string - Temporal run ID
workflow.management: WorkflowInstancePage
Paginated list of workflow instances.
Fields
- items WorkflowInstanceSummary[] - Workflow summaries for this page
- nextPageToken string? - Opaque token to fetch the next page, or
()on the last page
- hasMore boolean - True when more pages follow
workflow.management: WorkflowInstanceSummary
Summary of a workflow instance for list views.
Fields
- workflowId string - Unique workflow instance ID
- runId string - Temporal run ID for this execution
- workflowType string - Registered workflow type name
- status string - Execution status: RUNNING | COMPLETED | FAILED | CANCELED | TERMINATED | TIMED_OUT
- startTime string - ISO-8601 timestamp when the workflow started
- closeTime string? - ISO-8601 timestamp when it ended, or
()if still running
- input json? - Workflow input as JSON, or
()if not available
Import
import ballerina/workflow.management;Metadata
Released date: 6 days ago
Version: 0.5.0
License: Apache-2.0
Compatibility
Platform: java21
Ballerina version: 2201.13.2
GraalVM compatible: No
Pull count
Total: 1198
Current verison: 28
Weekly downloads
Keywords
workflow
Contributors