Class for managing a workflow execution.

Methods

Public methods


Method inherit()

Initialize Execution class

Usage

Execution$inherit(
  workflow,
  execution_arn,
  start_date,
  status,
  client = NULL,
  name = NULL,
  stop_date = NULL
)

Arguments

workflow

(Workflow): Step Functions workflow instance.

execution_arn

(str): The Amazon Resource Name (ARN) of the workflow execution.

start_date

(datetime.datetime): The date the workflow execution was started.

status

(RunStatus): Status of the workflow execution.

client

(SFN.Client, optional): sfn client to use for running and managing the workflow executions on Step Functions. If no client is provided, the sfn client from the parent workflow will be used. (default: None)

name

(str, optional): Name for the workflow execution. (default: None)

stop_date

(datetime.datetime, optional): The date the workflow execution was stopped, if applicable. (default: None)


Method stop()

Stops a workflow execution.

Usage

Execution$stop(cause = NULL, error = NULL)

Arguments

cause

(str, optional): A more detailed explanation of the cause of the failure. (default: None)

error

(str, optional): The error code of the failure. (default: None)

Returns

list: Datetime of when the workflow execution was stopped. Example below:: list( stopDate = as.POSIXct( "2015-01-01" ) ) **Response structure**:

  • (list)

  • stopDate (datetime): The date the workflow execution is stopped


Method list_events()

Lists the events in the workflow execution.

Usage

Execution$list_events(max_items = 100, reverse_order = FALSE, html = FALSE)

Arguments

max_items

(int, optional): The maximum number of items to be returned. (default: 100)

reverse_order

(bool, optional): Boolean flag set to `True` if the events should be listed in reverse chronological order. Set to `False`, if the order should be in chronological order. (default: False)

html

(bool, optional): Renders the list as an HTML table (If running in an IRKernel environment). If the parameter is not provided, or set to FALSE, a R list is returned. (default: False)

Returns

list: Object containing the list of workflow execution events. Refer to :meth:`.SFN.Client.get_execution_history()` for the response structure.


Method describe()

Describes a workflow execution.

Usage

Execution$describe()

Returns

list: Details of the workflow execution. **Response structure**:

  • executionArn (string): The Amazon Resource Name (ARN) that identifies the workflow execution.

  • stateMachineArn (string): The Amazon Resource Name (ARN) of the workflow that was executed.

  • name (string): The name of the workflow execution.

  • status (string): The current status of the workflow execution.

  • startDate (datetime): The date the workflow execution is started.

  • stopDate (datetime): If the workflow execution has already ended, the date the execution stopped.

  • input (string): The string that contains the JSON input data of the workflow execution.

  • output (string): The JSON output data of the workflow execution.


Method render_progress()

Renders a visualization of the workflow execution graph.

Usage

Execution$render_progress(portrait = FALSE, max_events = 25000)

Arguments

portrait

(bool, optional): Boolean flag set to `True` if the workflow execution graph should be rendered in portrait orientation. Set to `False`, if the graph should be rendered in landscape orientation. (default: False)

max_events

(int, optional): Specifies the number of events to be visualized in the workflow execution graph. (default: 25000)


Method get_input()

Get the input for the workflow execution.

Usage

Execution$get_input()

Returns

list: Workflow execution input.


Method get_output()

Get the output for the workflow execution.

Usage

Execution$get_output(wait = FALSE)

Arguments

wait

(bool, optional): Boolean flag set to `True` if the call should wait for a running workflow execution to end before returning the output. Set to `False`, otherwise. Note that if the status is running, and `wait` is set to `True`, this will be a blocking call. (default: False)

Returns

list: Workflow execution output.


Method format()

format class

Usage

Execution$format()


Method print()

print class

Usage

Execution$print()


Method clone()

The objects of this class are cloneable with this method.

Usage

Execution$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.