# AfterwardsOptions

Options for selecting the choice paths.

Used as argument in: [Choice.afterwards](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.Choice.html#afterwards)

- Source: [`aws-stepfunctions/lib/states/choice.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-stepfunctions/lib/states/choice.ts#L114)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_stepfunctions as stepfunctions } from 'aws-cdk-lib';
const afterwardsOptions: stepfunctions.AfterwardsOptions = {
  includeErrorHandlers: false,
  includeOtherwise: false,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_stepfunctions as stepfunctions

afterwards_options = stepfunctions.AfterwardsOptions(
    include_error_handlers=False,
    include_otherwise=False
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.stepfunctions.*;

AfterwardsOptions afterwardsOptions = AfterwardsOptions.builder()
        .includeErrorHandlers(false)
        .includeOtherwise(false)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.StepFunctions;

var afterwardsOptions = new AfterwardsOptions {
    IncludeErrorHandlers = false,
    IncludeOtherwise = false
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

afterwardsOptions := &AfterwardsOptions{
	IncludeErrorHandlers: jsii.Boolean(false),
	IncludeOtherwise: jsii.Boolean(false),
}
```

## Properties

- `includeErrorHandlers`: boolean = false — Whether to include error handling states.

  If this is true, all states which are error handlers (added through 'onError')
  and states reachable via error handlers will be included as well.

- `includeOtherwise`: boolean = false — Whether to include the default/otherwise transition for the current Choice state.

  If this is true and the current Choice does not have a default outgoing
  transition, one will be added included when .next() is called on the chain.
