Workflow.Rd
Class for creating and managing a workflow.
list_workflows()
Lists all the workflows in the account.
Workflow$list_workflows(max_items = 100, client = NULL, html = FALSE)
max_items
(int, optional): The maximum number of items to be returned. (default: 100)
client
(SFN.Client, optional): sfn
client to use for the query. If
not provided, a default sfn
client for Step Functions will be
automatically created and used. (default: None)
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)
list: The list of workflows. Refer to :meth:`.SFN.Client.list_state_machines()` for the response structure.
new()
Initialize Workflow Class
Workflow$new( name, definition, role, tags = list(), execution_input = NULL, timeout_seconds = NULL, comment = NULL, version = NULL, state_machine_arn = NULL, format_json = TRUE, client = NULL )
name
(str): The name of the workflow. A name must not contain:
whitespace
brackets ``< > [ ]``
wildcard characters ``? *``
special characters ``\" # % \ ^ | ~ ` $ & , ; : /``
control characters (``U+0000-001F``, ``U+007F-009F``)
definition
(State or Chain): The Amazon States Language https://states-language.net/spec.html definition of the workflow.
role
(str): The Amazon Resource Name (ARN) of the IAM role to use for creating, managing, and running the workflow.
tags
(list): Tags to be added when creating a workflow. Tags are key-value pairs that can be associated with Step Functions workflows and activities. (default: [])
execution_input
(ExecutionInput, optional): Placeholder collection that defines the placeholder variables for the workflow execution. This is also used to validate inputs provided when executing the workflow. (default: None)
timeout_seconds
(int, optional): The maximum number of seconds an execution of the workflow can run. If it runs longer than the specified time, the workflow run fails with a `States.Timeout` Error Name. (default: None)
comment
(str, optional): A human-readable description of the workflow. (default: None)
version
(str, optional): The version of the Amazon States Language used in the workflow. (default: None)
state_machine_arn
(str, optional): The Amazon Resource Name (ARN) of the workflow. (default: None)
format_json
(bool, optional): Boolean flag set to `True` if workflow definition and execution inputs should be prettified for this workflow. `False`, otherwise. (default: True)
client
(SFN.Client, optional): paws client to use for creating, managing,
and running the workflow on Step Functions. If not provided, a
default sfn
client for Step Functions will be automatically created
and used. (default: None)
attach()
Factory method to create an instance attached to an exisiting workflow in Step Functions.
Workflow$attach(state_machine_arn, client = NULL)
state_machine_arn
(str): The Amazon Resource Name (ARN) of the existing workflow.
client
(SFN.Client, optional): sfn
client to use for attaching the existing
workflow in Step Functions to the Workflow object. If not provided,
a default sfn
client for Step Functions will be automatically
created and used. (default: None)
Workflow: Workflow object attached to the existing workflow in Step Functions.
create()
Creates the workflow on Step Functions.
Workflow$create()
str: The Amazon Resource Name (ARN) of the workflow created. If the workflow already existed, the ARN of the existing workflow is returned.
update()
Updates an existing state machine by modifying its definition and/or role. Executions started immediately after calling this method may use the previous definition and role.
Workflow$update(definition = NULL, role = NULL)
definition
(State or Chain, optional): The Amazon States Language https://states-language.net/spec.html definition to update the workflow with. (default: None)
role
(str, optional): The Amazon Resource Name (ARN) of the IAM role to use for creating, managing, and running the workflow. (default: None)
str: The state machine definition and/or role updated. If the update fails, None will be returned.
execute()
Starts a single execution of the workflow.
Workflow$execute(name = NULL, inputs = NULL)
name
(str, optional): The name of the workflow execution. If one is not provided, a workflow execution name will be auto-generated. (default: None)
inputs
(str, list, optional): Input data for the workflow execution. (default: None)
stepfunctions.workflow.Execution: An execution instance of the workflow.
list_executions()
Lists the executions for the workflow.
Workflow$list_executions(max_items = 100, status_filter = NULL, html = FALSE)
max_items
(int, optional): The maximum number of items to be returned. (default: 100)
status_filter
(ExecutionStatus, optional): If specified, only list the executions whose current status matches the given filter. (default: None)
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)
list: List of workflow run instances.
delete()
Deletes the workflow, if it exists.
Workflow$delete()
render_graph()
Renders a visualization of the workflow graph.
Workflow$render_graph(portrait = FALSE)
portrait
(bool, optional): Boolean flag set to `True` if the workflow graph should be rendered in portrait orientation. Set to `False`, if the graph should be rendered in landscape orientation. (default: False)
get_cloudformation_template()
Returns a CloudFormation template that contains only the StateMachine resource. To reuse the CloudFormation template in a different region, please make sure to update the region specific AWS resources (e.g: Lambda ARN, Training Image) in the StateMachine definition.
Workflow$get_cloudformation_template()
format()
class formatting
Workflow$format()
print()
print class
Workflow$print()
clone()
The objects of this class are cloneable with this method.
Workflow$clone(deep = FALSE)
deep
Whether to make a deep clone.