Skip to content

Commit

Permalink
StateMachine definition deprecated, example for using definitionBody …
Browse files Browse the repository at this point in the history
…instead (aws-samples#888)

* StateMachineProps#definition is deprecated

* StateMachineProps#definition is deprecated
  • Loading branch information
mmarinm committed Jul 14, 2023
1 parent 6093473 commit 2a494c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/stepfunctions/stepfunctions/stepfunctions_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def __init__(self, app: App, id: str, **kwargs) -> None:

# Create Chain

definition = submit_job.next(wait_job)\
chain = submit_job.next(wait_job)\
.next(status_job)\
.next(_aws_stepfunctions.Choice(self, 'Job Complete?')
.when(_aws_stepfunctions.Condition.string_equals('$.status', 'FAILED'), fail_job)
Expand All @@ -65,6 +65,6 @@ def __init__(self, app: App, id: str, **kwargs) -> None:
# Create state machine
sm = _aws_stepfunctions.StateMachine(
self, "StateMachine",
definition=definition,
definition_body=_aws_stepfunctions.DefinitionBody.from_chainable(chain),
timeout=Duration.minutes(5),
)

0 comments on commit 2a494c4

Please sign in to comment.