Interface overview - Amazon Step Functions
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Interface overview

Workflow Studio for Amazon Step Functions is a low-code visual workflow designer that lets you create serverless workflows by orchestrating Amazon Web Services. With its drag and drop feature, Workflow Studio makes it easy for you to build, edit, and visualize your workflow prototypes. Workflow Studio also offers a built-in code editor for writing and editing your workflow definitions using Amazon States Language (ASL) within the Step Functions console.

To help you build and visualize your workflows, edit their definitions, and manage their configuration, Workflow Studio provides three modes: Design, Code, and Config. The following sections describe these modes in detail.

Design mode

The Design mode of Workflow Studio provides a graphical interface to visualize your workflows as you build their prototypes. The following image shows the different components available in the Design mode.


            Design mode of Workflow Studio. This mode contains various components such as States browser on the left, canvas in the middle, Inspector panel to the right of the canvas, and the contextual help in the rightmost pane. The image shows the configuration options in the Inspector panel for a Lambda function.
  1. Mode buttons – Switch between the Design, Code, and Config modes of the Workflow Studio using the mode buttons. You can't switch modes if the JSON in the ASL definition of your workflow is invalid.

  2. The States browser contains the following three tabs:

    • The Actions tab provides a list of Amazon APIs that you can drag and drop into your workflow graph in the canvas. Each action represents a Task state.

    • The Flow tab provides a list of flow states that you can drag and drop into your workflow graph in the canvas.

    • The Patterns tab provides several ready-to-use, reusable building blocks that you can use for a variety of use cases. For example, you can use these patterns to iteratively process data in an Amazon S3 bucket.

  3. The Canvas is where you drag and drop states into your workflow graph, change the order of states, and select states to configure or view.

  4. The Inspector panel is where you can view and edit the properties of any state you've selected on the canvas. Turn on the Definition toggle to view the Amazon States Language code for your workflow, with the currently selected state highlighted.

  5. Info links open a panel with contextual information when you need help. These panels also include links to related topics in the Step Functions documentation.

  6. Design toolbar – Contains a set of buttons to perform common actions, such as undo, delete, and zoom in.

  7. Utility buttons – A set of buttons to perform tasks, such as saving your workflows or exporting their ASL definitions in a JSON or YAML file.

States browser

The States browser is where you select states to drag and drop into your workflow graph. The Actions tab provides a list of Amazon APIs, and the Flow tab provides a list of flow states. While the Patterns tab provides several ready-to-use, reusable building blocks that you can use for a variety of use cases. You can search all states in the States Browser using the Search box at the top.


            Step Functions Workflow Studio States browser interface component. The image shows the three tabs available in the States browser: Actions, Flow, and Patterns.

There are seven flow states that you can use to direct and control your workflow. All of them take input from the previous state, and many let you filter the input from the preceding state, and the output to the state that follows. The flow states are:

  • Choice: Add a choice between branches of execution to your workflow. In the Configuration tab of the Inspector, you can configure rules to determine which state the workflow will transition to.

  • Parallel: Add parallel branches of execution to your workflow.

  • Map: Dynamically iterate steps for each element of an input array. Unlike a Parallel flow state, a Map state will execute the same steps for multiple entries of an array in the state input.

  • Pass: Lets you pass its input to its output. (Optional) You can add fixed data into the output.

  • Wait: Have your workflow pause for a certain amount of time or until a specified time or date.

  • Succeed: Stops your workflow with a success.

  • Fail: Stops your workflow with a failure.

Canvas

After you choose a state to add to your workflow, drag it to to the canvas and drop it into your workflow graph. You can also drag and drop states to move them to different places in your workflow. If your workflow is complex, you may not be able to view all of it in the canvas panel. Use the controls at the top of the canvas to zoom in or out. To view different parts of a workflow graph, you can drag the workflow graph in the canvas.

Drag a workflow state from the Actions or Flow tab and drop it into your workflow. A line shows where it will be placed in your workflow. The new workflow state has been added to your workflow, and its code is auto-generated.


            Workflow Studio canvas

To change the order of a state, you can drag it to a different place in your workflow.


            Workflow Studio drag drop

Inspector

You can configure any states that you add to your workflow. Choose the state you want to configure, and you will see its configuration options in the Inspector panel. To see the auto-generated ASL definition for your workflow code, turn on the Definition toggle. The ASL definition associated with the state you've selected will appear highlighted.


            Workflow Studio inspector configuration panel

            Workflow Studio inspector definition panel

Code mode

The Code mode of Workflow Studio provides an integrated code editor to view, write, and edit the Amazon States Language (ASL) definition of your workflows within the Step Functions console. The following image shows the different components available in the Code mode.


          Step Functions Workflow Studio Code mode. This mode shows an example of a workflow definition and a real-time rendering of the workflow graph based on the definition.
  1. Mode buttons – Switch between the Design, Code, and Config modes of the Workflow Studio using the mode buttons. You can't switch modes if the JSON in the ASL definition of your workflow is invalid.

  2. The Code editor is where you write and edit the ASL definition of your workflows within the Workflow Studio. The code editor also provides features, such as syntax highlighting and auto-completion.

  3. Graph visualization pane – Shows a real-time graphical visualization of your workflow.

  4. Utility buttons – A set of buttons to perform tasks, such as saving your workflows or exporting their ASL definitions in a JSON or YAML file.

  5. Code toolbar – Contains a set of buttons to perform common actions, such as undoing an action or formatting the code.

  6. Graph toolbar – Contains a set of buttons to perform common actions, such as zooming in and zooming out the workflow graph.

Code editor

The code editor provides an IDE-like experience to write and edit your workflow definitions using JSON within the Workflow Studio. The code editor includes several features, such as syntax highlighting, auto-complete suggestions, ASL definition validation, and context-sensitive help display. As you update your workflow definition, the Graph visualization pane renders a real-time graph of your workflow. You can also see the updated workflow graph in the Design mode.

If you select a state in the Design mode or the graph visualization pane, the ASL definition of that state appears highlighted in the code editor. The ASL definition of your workflow is automatically updated if you reorder, delete, or add a state in the Design mode or the graph visualization pane.


            Step Functions Workflow Studio components

Place the cursor over any field in the workflow definition to view its context-sensitive help as a tooltip.


            Step Functions Workflow Studio

The auto-complete suggestions displays code snippets for the fields or states that you can include in your workflows. To see a list of fields you can include within a specific state, press Ctrl+Space. To generate code snippet for a new state in your workflow press Ctrl+Space after the current state's definition. You can also press F1 to display a list of available commands.


            Step Functions Workflow Studio components

Graph visualization pane

Graph visualizations let you see what your workflow looks like in graphical format. When you write your workflow definitions in the Code editor of Workflow Studio, the graph visualization pane renders a real-time graph of your workflow. As you reorder, delete, or duplicate a state in the graph visualization pane, the workflow definition in the Code editor is automatically updated. Similarly, as you update your workflow definitions, reorder, delete, or add a state in the Code editor, the visualization is automatically updated.

If the JSON in the ASL definition of your workflow is invalid, the graph visualization pane pauses the rendering and displays a status message at the bottom of the pane.

Config mode

The Config mode of Workflow Studio lets you manage the configuration of your state machines. In this mode, you can specify details, such as state machine name and its type, IAM permissions, and logging configuration for the state machine. Other additional configurations that you can specify in this mode include enabling Amazon X-Ray tracing and publishing a version when you create the state machine. After you've created the state machine, you can edit all state machine configuration options except the state machine name and type. The following image shows some of the configurations you can specify in the Config mode.


         State machine configurations that can be specified in the Config mode.
Manage state machine configuration

To manage your state machine configuration, do the following:

  1. Enter a name for your state machine in the State machine name box.

    Tip

    Alternatively, choose the edit icon next to the default state machine name of MyStateMachine. Then, under State machine configuration, specify a name.

    Important

    You can't edit the state machine name after you've created the state machine.

  2. In Type, choose a state machine type of Standard or Express. For information about state machine types, see Standard vs. Express Workflows.

    Important

    You can't edit the state machine type after you've created the state machine.

  3. In Permissions, select the IAM role to be used as the execution role for the state machine.

    • Create new role (Recommended): If you select this option, Step Functions automatically creates an execution role for your state machines with the least privileges required when you create the state machines. These automatically generated IAM roles are valid for the Amazon Web Services Region in which you create the state machine.

      Tip

      To review the permissions that Step Functions will automatically generate for your state machine, choose Review auto-generated permissions.

      Note

      If you delete the IAM role that Step Functions creates, Step Functions can't recreate it later. Similarly, if you modify the role (for example, by removing Step Functions from the principals in the IAM policy), Step Functions can't restore its original settings later.

    • Choose an existing role: Create your own IAM role for the state machine and then choose it from the options listed below Choose an existing role. Make sure the role's policy includes the permissions that you would like the state machine to assume.

      For information about creating IAM policies, see Creating IAM policies in the IAM User Guide.

    • Enter a role ARN: Specify the Amazon Resource Name (ARN) of an existing IAM role to use for this state machine. For example, arn:aws-cn:iam::123456789012:role/service-role/StepFunctions-WorkflowStudio-role-777f4027.

  4. In Logging, set the log level for your state machine. Step Functions logs the execution history events based on your selection. You can select one of the following options:

    • ALL: All event types are logged.

    • ERROR: All error event types are logged, such as TaskFailed and ExecutionFailed.

    • FATAL: All fatal error event types are logged, such as ExecutionAborted and ExecutionFailed.

    • OFF: No event types are logged.

    For more information about log levels, see Log levels.

  5. In Additional configuration, set one or more of the following optional configurations:

    • Enable X-Ray tracing: Choose this checkbox for Step Functions to send traces to X-Ray for state machine executions, even when a trace ID is not passed by an upstream service. For more information, see Amazon X-Ray and Step Functions.

    • Publish version on creation: A version is a numbered, immutable snapshot of a state machine that you can run. Choose this checkbox to publish a version of your state machine while creating the state machine. Step Functions publishes version 1 as the first revision of the state machine.

      For more information about versions, see State machine versions.

    • Add new tag: Choose this box to add tags to your state machine. Adding tags can help you track and manage the costs associated with your resources, and provide better security in your IAM policies. For more information about tags, see Tagging in Step Functions.

  6. Choose Create.

  7. In the Confirm role creation dialog box, choose Confirm to continue.

    You can also choose View role configuration to go back to the Config mode.

Keyboard shortcuts

Workflow Studio supports the following keyboard shortcuts:

Keyboard shortcut Function
Shortcuts for the Code mode
Ctrl+space Auto-complete suggestions
F1 Display a list of available commands
Common shortcuts for the Design and Code modes
Ctrl+Z Undo the last operation
Ctrl+Shift+Z Redo the last operation
Alt+C Center the workflow in the canvas
Backspace Remove all selected states
Delete Remove all selected states
Ctrl+D Duplicate selected state