aws-cdk-lib.aws_stepfunctions.IntegrationPattern

enum IntegrationPattern

LanguageType name
.NETAmazon.CDK.AWS.StepFunctions.IntegrationPattern
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctions#IntegrationPattern
Javasoftware.amazon.awscdk.services.stepfunctions.IntegrationPattern
Pythonaws_cdk.aws_stepfunctions.IntegrationPattern
TypeScript (source)aws-cdk-lib » aws_stepfunctions » IntegrationPattern

AWS Step Functions integrates with services directly in the Amazon States Language.

You can control these AWS services using service integration patterns:

See also: https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html

Example

// Define a state machine with one Pass state
const child = new sfn.StateMachine(this, 'ChildStateMachine', {
  definition: sfn.Chain.start(new sfn.Pass(this, 'PassState')),
});

// Include the state machine in a Task state with callback pattern
const task = new tasks.StepFunctionsStartExecution(this, 'ChildTask', {
  stateMachine: child,
  integrationPattern: sfn.IntegrationPattern.WAIT_FOR_TASK_TOKEN,
  input: sfn.TaskInput.fromObject({
    token: sfn.JsonPath.taskToken,
    foo: 'bar',
  }),
  name: 'MyExecutionName',
});

// Define a second state machine with the Task state above
new sfn.StateMachine(this, 'ParentStateMachine', {
  definition: task,
});

Members

NameDescription
REQUEST_RESPONSEStep Functions will wait for an HTTP response and then progress to the next state.
RUN_JOBStep Functions can wait for a request to complete before progressing to the next state.
WAIT_FOR_TASK_TOKENCallback tasks provide a way to pause a workflow until a task token is returned.

REQUEST_RESPONSE

Step Functions will wait for an HTTP response and then progress to the next state.

See also: https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-default


RUN_JOB

Step Functions can wait for a request to complete before progressing to the next state.

See also: https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-sync


WAIT_FOR_TASK_TOKEN

Callback tasks provide a way to pause a workflow until a task token is returned.

You must set a task token when using the callback pattern

See also: https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token