SWF.Client.
describe_workflow_execution
(**kwargs)¶Returns information about the specified workflow execution including its type and some statistics.
Note
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:
Resource
element with the domain name to limit the action to only specified domains.Action
element to allow or deny permission to call this action.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 .
See also: AWS API Documentation
Request Syntax
response = client.describe_workflow_execution(
domain='string',
execution={
'workflowId': 'string',
'runId': 'string'
}
)
[REQUIRED]
The name of the domain containing the workflow execution.
[REQUIRED]
The workflow execution to describe.
The user defined identifier associated with the workflow execution.
A system-generated unique identifier for the workflow execution.
dict
Response Syntax
{
'executionInfo': {
'execution': {
'workflowId': 'string',
'runId': 'string'
},
'workflowType': {
'name': 'string',
'version': 'string'
},
'startTimestamp': datetime(2015, 1, 1),
'closeTimestamp': datetime(2015, 1, 1),
'executionStatus': 'OPEN'|'CLOSED',
'closeStatus': 'COMPLETED'|'FAILED'|'CANCELED'|'TERMINATED'|'CONTINUED_AS_NEW'|'TIMED_OUT',
'parent': {
'workflowId': 'string',
'runId': 'string'
},
'tagList': [
'string',
],
'cancelRequested': True|False
},
'executionConfiguration': {
'taskStartToCloseTimeout': 'string',
'executionStartToCloseTimeout': 'string',
'taskList': {
'name': 'string'
},
'taskPriority': 'string',
'childPolicy': 'TERMINATE'|'REQUEST_CANCEL'|'ABANDON',
'lambdaRole': 'string'
},
'openCounts': {
'openActivityTasks': 123,
'openDecisionTasks': 123,
'openTimers': 123,
'openChildWorkflowExecutions': 123,
'openLambdaFunctions': 123
},
'latestActivityTaskTimestamp': datetime(2015, 1, 1),
'latestExecutionContext': 'string'
}
Response Structure
(dict) --
Contains details about a workflow execution.
executionInfo (dict) --
Information about the workflow execution.
execution (dict) --
The workflow execution this information is about.
workflowId (string) --
The user defined identifier associated with the workflow execution.
runId (string) --
A system-generated unique identifier for the workflow execution.
workflowType (dict) --
The type of the workflow execution.
name (string) --
The name of the workflow type.
Note
The combination of workflow type name and version must be unique with in a domain.
version (string) --
The version of the workflow type.
Note
The combination of workflow type name and version must be unique with in a domain.
startTimestamp (datetime) --
The time when the execution was started.
closeTimestamp (datetime) --
The time when the workflow execution was closed. Set only if the execution status is CLOSED.
executionStatus (string) --
The current status of the execution.
closeStatus (string) --
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.parent (dict) --
If this workflow execution is a child of another execution then contains the workflow execution that started this execution.
workflowId (string) --
The user defined identifier associated with the workflow execution.
runId (string) --
A system-generated unique identifier for the workflow execution.
tagList (list) --
The list of tags associated with the workflow execution. Tags can be used to identify and list workflow executions of interest through the visibility APIs. A workflow execution can have a maximum of 5 tags.
cancelRequested (boolean) --
Set to true if a cancellation is requested for this workflow execution.
executionConfiguration (dict) --
The configuration settings for this workflow execution including timeout values, tasklist etc.
taskStartToCloseTimeout (string) --
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.
executionStartToCloseTimeout (string) --
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.
taskList (dict) --
The task list used for the decision tasks generated for this workflow execution.
name (string) --
The name of the task list.
taskPriority (string) --
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 .
childPolicy (string) --
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.lambdaRole (string) --
The IAM role attached to the child workflow execution.
openCounts (dict) --
The number of tasks for this workflow execution. This includes open and closed tasks of all types.
openActivityTasks (integer) --
The count of activity tasks whose status is OPEN
.
openDecisionTasks (integer) --
The count of decision tasks whose status is OPEN. A workflow execution can have at most one open decision task.
openTimers (integer) --
The count of timers started by this workflow execution that have not fired yet.
openChildWorkflowExecutions (integer) --
The count of child workflow executions whose status is OPEN
.
openLambdaFunctions (integer) --
The count of Lambda tasks whose status is OPEN
.
latestActivityTaskTimestamp (datetime) --
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.
latestExecutionContext (string) --
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.
Exceptions
SWF.Client.exceptions.UnknownResourceFault
SWF.Client.exceptions.OperationNotPermittedFault