Using Workflow Studio in Application Composer - 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).

Using Workflow Studio in Application Composer

Amazon Application Composer is a visual builder that helps you develop Amazon SAM and Amazon CloudFormation templates using a simple graphical interface. With Application Composer, you design an application architecture by dragging, grouping, and connecting Amazon Web Services in a visual canvas. Application Composer then creates an infrastructure as code (IaC) template from your design that you can use to deploy your application with the Amazon SAM Command Line Interface (Amazon SAM CLI) or CloudFormation. To learn more about Application Composer, see What is Application Composer.

Workflow Studio is available in Application Composer to help you design and build your workflows. Workflow Studio in Application Composer provides a visual IaC environment that makes it easy for you to incorporate workflows in your serverless applications built using IaC tools, such as CloudFormation templates. When you use Workflow Studio in Application Composer, it connects the individual workflow steps to Amazon resources and generates the resource configurations in an Amazon SAM template. It also adds the IAM permissions required for your workflow to run. Using Workflow Studio in Application Composer, you can create prototypes of your applications and turn them into production-ready applications.

When you use Workflow Studio in Application Composer, you can switch back and forth between the Application Composer canvas and Workflow Studio.

Using Workflow Studio in Application Composer to build a serverless workflow

  1. Open the Application Composer console and choose Create project to create a project.

  2. In the search field in the Resources palette, enter state machine.

  3. Drag the Step Functions State machine resource onto the canvas.

  4. Choose Edit in Workflow Studio to edit your state machine resource.

    The integration with Workflow Studio to edit state machines resources created in Application Composer is only available for AWS::Serverless::StateMachine resource. This integration is not available for templates that use the AWS::StepFunctions::StateMachine resource.

Dynamically reference resources using CloudFormation definition substitutions in Workflow Studio

In Workflow Studio, you can use CloudFormation definition substitutions in your workflow definition to dynamically reference resources that you've defined in your IaC template. You can add placeholder substitutions to your workflow definition using the ${dollar_sign_brace} notation and they are replaced with actual values during the CloudFormation stack creation process. For more information about definition substitutions, see DefinitionSubstitutions in Amazon SAM templates.

Connect service integration tasks to enhanced component cards

You can connect the tasks that call optimized service integrations to enhanced component cards in Application Composer canvas. Doing this automatically maps any placeholder substitutions specified by the ${dollar_sign_brace} notation in your workflow definition and the DefinitionSubstitution property for your StateMachine resource. It also adds the appropriate Amazon SAM policies for the state machine.

If you map optimized service integration tasks with standard component cards, the connection line doesn't appear on the Application Composer canvas.

You can't connect Amazon SDK integrations in your Task state with enhanced component cards or optimized service integrations with standard component cards. For these tasks, you can map the substitutions in the Resource properties panel in Application Composer canvas, and add policies in the Amazon SAM template.

Tip

Alternatively, you can also map placeholder substitutions for your state machine under Definition Substitutions in the Resource properties panel. When you do this, you must add the required permissions for the Amazon Web Service your Task state calls in the state machine execution role. For information about permissions your execution role might need, see Execution roles in Workflow Studio.

The following animation shows how you can manually update the placeholder substitution mapping in the Resource properties panel.

An animation that illustrates how to manually update the placeholder substitution mapping in the Resource properties panel when you use Workflow Studio in Application Composer.

Import existing projects and sync them locally

You can open existing CloudFormation and Amazon SAM projects in Application Composer to visualize them for better understanding and modify their designs. Using Application Composer's local sync feature, you can automatically sync and save your template and code files to your local build machine. Using the local sync mode can compliment your existing development flows. Make sure that your browser supports the File System Access API, which allows web applications to read, write, and save files in your local file system. We recommend using either Google Chrome or Microsoft Edge.

Unavailable Workflow Studio features in Amazon Application Composer

When you use Workflow Studio in Application Composer, some of the Workflow Studio features are unavailable. In addition, the API Parameters section available in the Inspector panel supports CloudFormation definition substitutions. You can add the substitutions in the Code mode using the ${dollar_sign_brace} notation. For more information about this notation, see DefinitionSubstitutions in Amazon SAM templates.

The following list describes the Workflow Studio features that are unavailable when you use Workflow Studio in Application Composer:

  • Starter templates – Starter templates are ready-to-run sample projects that automatically create the workflow proptotypes and definitions. These templates deploys all the related Amazon resources that your project needs to your Amazon Web Services account.

  • Config mode – This mode lets you manage the configuration of your state machines. You can update your state machine configurations in your IaC templates or use the Resource properties panel in Application Composer canvas. For information about updating configurations in the Resource properties panel, see Connect service integration tasks to enhanced component cards.

  • TestState API

  • Option to import or export workflow definitions from the Actions dropdown button in Workflow Studio. Instead, from the Application Composer menu, select Open > Project folder. Make sure that you've enabled the local sync mode to automatically save your changes in the Application Composer canvas directly to your local machine.

  • Execute button. When you use Workflow Studio in Application Composer, Application Composer generates the IaC code for your workflow. Therefore, you must first deploy the template. Then, run the workflow in the console or through the Amazon Command Line Interface (Amazon CLI).