Skip to content

aws.swf.describe_workflow_execution

Example SQL Queries

SELECT * FROM
aws.swf.describe_workflow_execution
WHERE
"domain" = 'VALUE'
AND "execution" = 'VALUE';

Description

Returns information about the specified workflow execution including its type and some statistics.

This operation is eventually consistent. The results are best effort and may not exactly reflect recent updates and changes.

Access Control

You can use IAM policies to control this action's access to Amazon SWF resources as follows:

  • Use a Resource element with the domain name to limit the action to only specified domains.

  • Use an Action element to allow or deny permission to call this action.

  • You cannot use an IAM policy to constrain this action's parameters.

If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.

Table Definition

Column NameColumn Data Type
domain Required Input Column

The name of the domain containing the workflow execution.

VARCHAR
execution Required Input Column

The workflow execution to describe.

STRUCT(
"workflow_id" VARCHAR,
"run_id" VARCHAR
)
Show child fields
execution.run_id

A system-generated unique identifier for the workflow execution.

execution.workflow_id

The user defined identifier associated with the workflow execution.

_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
execution_configuration

The configuration settings for this workflow execution including timeout values, tasklist etc.

STRUCT(
"task_start_to_close_timeout" VARCHAR,
"execution_start_to_close_timeout" VARCHAR,
"task_list" STRUCT(
"name" VARCHAR
),
"task_priority" VARCHAR,
"child_policy" VARCHAR,
"lambda_role" VARCHAR
)
Show child fields
execution_configuration.child_policy

The policy to use for the child workflow executions if this workflow execution is terminated, by calling the TerminateWorkflowExecution action explicitly or due to an expired timeout.

The supported child policies are:

  • TERMINATE – The child executions are terminated.

  • REQUEST_CANCEL – A request to cancel is attempted for each child execution by recording a WorkflowExecutionCancelRequested event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.

  • ABANDON – No action is taken. The child executions continue to run.

execution_configuration.execution_start_to_close_timeout

The total duration for this workflow execution.

The duration is specified in seconds, an integer greater than or equal to 0. You can use NONE to specify unlimited duration.

execution_configuration.lambda_role

The IAM role attached to the child workflow execution.

execution_configuration.task_list

The task list used for the decision tasks generated for this workflow execution.

Show child fields
execution_configuration.task_list.name

The name of the task list.

execution_configuration.task_priority

The priority assigned to decision tasks for this workflow execution. Valid values are integers that range from Java's Integer.MIN_VALUE (-2147483648) to Integer.MAX_VALUE (2147483647). Higher numbers indicate higher priority.

For more information about setting task priority, see Setting Task Priority in the Amazon SWF Developer Guide.

execution_configuration.task_start_to_close_timeout

The maximum duration allowed for decision tasks for this workflow execution.

The duration is specified in seconds, an integer greater than or equal to 0. You can use NONE to specify unlimited duration.

execution_info

Information about the workflow execution.

STRUCT(
"execution" STRUCT(
"workflow_id" VARCHAR,
"run_id" VARCHAR
),
"workflow_type" STRUCT(
"name" VARCHAR,
"version" VARCHAR
),
"start_timestamp" TIMESTAMP_S,
"close_timestamp" TIMESTAMP_S,
"execution_status" VARCHAR,
"close_status" VARCHAR,
"parent" STRUCT(
"workflow_id" VARCHAR,
"run_id" VARCHAR
),
"tag_list" VARCHAR[],
"cancel_requested" BOOLEAN
)
Show child fields
execution_info.cancel_requested

Set to true if a cancellation is requested for this workflow execution.

execution_info.close_status

If the execution status is closed then this specifies how the execution was closed:

  • COMPLETED – the execution was successfully completed.

  • CANCELED – the execution was canceled.Cancellation allows the implementation to gracefully clean up before the execution is closed.

  • TERMINATED – the execution was force terminated.

  • FAILED – the execution failed to complete.

  • TIMED_OUT – the execution did not complete in the alloted time and was automatically timed out.

  • CONTINUED_AS_NEW – the execution is logically continued. This means the current execution was completed and a new execution was started to carry on the workflow.

execution_info.close_timestamp

The time when the workflow execution was closed. Set only if the execution status is CLOSED.

execution_info.execution

The workflow execution this information is about.

Show child fields
execution_info.execution.run_id

A system-generated unique identifier for the workflow execution.

execution_info.execution.workflow_id

The user defined identifier associated with the workflow execution.

execution_info.execution_status

The current status of the execution.

execution_info.parent

If this workflow execution is a child of another execution then contains the workflow execution that started this execution.

Show child fields
execution_info.parent.run_id

A system-generated unique identifier for the workflow execution.

execution_info.parent.workflow_id

The user defined identifier associated with the workflow execution.

execution_info.start_timestamp

The time when the execution was started.

execution_info.tag_list[]
execution_info.workflow_type

The type of the workflow execution.

Show child fields
execution_info.workflow_type.name

The name of the workflow type.

The combination of workflow type name and version must be unique with in a domain.

execution_info.workflow_type.version

The version of the workflow type.

The combination of workflow type name and version must be unique with in a domain.

latest_activity_task_timestamp

The time when the last activity task was scheduled for this workflow execution. You can use this information to determine if the workflow has not made progress for an unusually long period of time and might require a corrective action.

TIMESTAMP_S
latest_execution_context

The latest executionContext provided by the decider for this workflow execution. A decider can provide an executionContext (a free-form string) when closing a decision task using RespondDecisionTaskCompleted.

VARCHAR
open_counts

The number of tasks for this workflow execution. This includes open and closed tasks of all types.

STRUCT(
"open_activity_tasks" BIGINT,
"open_decision_tasks" BIGINT,
"open_timers" BIGINT,
"open_child_workflow_executions" BIGINT,
"open_lambda_functions" BIGINT
)
Show child fields
open_counts.open_activity_tasks

The count of activity tasks whose status is OPEN.

open_counts.open_child_workflow_executions

The count of child workflow executions whose status is OPEN.

open_counts.open_decision_tasks

The count of decision tasks whose status is OPEN. A workflow execution can have at most one open decision task.

open_counts.open_lambda_functions

The count of Lambda tasks whose status is OPEN.

open_counts.open_timers

The count of timers started by this workflow execution that have not fired yet.