{"action":"created","issue":{"url":"https://api.github.com/repos/awslabs/aws-cdk/issues/421","repository_url":"https://api.github.com/repos/awslabs/aws-cdk","labels_url":"https://api.github.com/repos/awslabs/aws-cdk/issues/421/labels{/name}","comments_url":"https://api.github.com/repos/awslabs/aws-cdk/issues/421/comments","events_url":"https://api.github.com/repos/awslabs/aws-cdk/issues/421/events","html_url":"https://github.com/awslabs/aws-cdk/pull/421","id":345150766,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0MzczNzEy","number":421,"title":"Model Amazon States Language for creating Step Functions","user":{"login":"adilosa","id":2894907,"node_id":"MDQ6VXNlcjI4OTQ5MDc=","avatar_url":"https://avatars0.githubusercontent.com/u/2894907?v=4","gravatar_id":"","url":"https://api.github.com/users/adilosa","html_url":"https://github.com/adilosa","followers_url":"https://api.github.com/users/adilosa/followers","following_url":"https://api.github.com/users/adilosa/following{/other_user}","gists_url":"https://api.github.com/users/adilosa/gists{/gist_id}","starred_url":"https://api.github.com/users/adilosa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adilosa/subscriptions","organizations_url":"https://api.github.com/users/adilosa/orgs","repos_url":"https://api.github.com/users/adilosa/repos","events_url":"https://api.github.com/users/adilosa/events{/privacy}","received_events_url":"https://api.github.com/users/adilosa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"rix0rrr","id":524162,"node_id":"MDQ6VXNlcjUyNDE2Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/524162?v=4","gravatar_id":"","url":"https://api.github.com/users/rix0rrr","html_url":"https://github.com/rix0rrr","followers_url":"https://api.github.com/users/rix0rrr/followers","following_url":"https://api.github.com/users/rix0rrr/following{/other_user}","gists_url":"https://api.github.com/users/rix0rrr/gists{/gist_id}","starred_url":"https://api.github.com/users/rix0rrr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rix0rrr/subscriptions","organizations_url":"https://api.github.com/users/rix0rrr/orgs","repos_url":"https://api.github.com/users/rix0rrr/repos","events_url":"https://api.github.com/users/rix0rrr/events{/privacy}","received_events_url":"https://api.github.com/users/rix0rrr/received_events","type":"User","site_admin":false},"assignees":[{"login":"rix0rrr","id":524162,"node_id":"MDQ6VXNlcjUyNDE2Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/524162?v=4","gravatar_id":"","url":"https://api.github.com/users/rix0rrr","html_url":"https://github.com/rix0rrr","followers_url":"https://api.github.com/users/rix0rrr/followers","following_url":"https://api.github.com/users/rix0rrr/following{/other_user}","gists_url":"https://api.github.com/users/rix0rrr/gists{/gist_id}","starred_url":"https://api.github.com/users/rix0rrr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rix0rrr/subscriptions","organizations_url":"https://api.github.com/users/rix0rrr/orgs","repos_url":"https://api.github.com/users/rix0rrr/repos","events_url":"https://api.github.com/users/rix0rrr/events{/privacy}","received_events_url":"https://api.github.com/users/rix0rrr/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2018-07-27T09:12:29Z","updated_at":"2018-07-31T15:00:05Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/awslabs/aws-cdk/pulls/421","html_url":"https://github.com/awslabs/aws-cdk/pull/421","diff_url":"https://github.com/awslabs/aws-cdk/pull/421.diff","patch_url":"https://github.com/awslabs/aws-cdk/pull/421.patch"},"body":"Step Functions are defined in JSON, but CloudFormation's `AWS::StepFunctions::StateMachine` resource accepts definitions as plain strings. Developers must hand-craft escaped JSON strings inside their JSON/YAML template, possibly mixing in intrinsic `Fn::` functions or Jinja syntax as well – which gets a bit ugly. \r\n\r\nThis PR adds object models which serialize to JSON according to the [Amazon States Language](https://states-language.net/spec.html). This makes authoring State Machines much nicer, as the compiler/IDE can help out with validation and syntax. Where possible, some remaining validation is also be done at runtime. \r\n\r\n```\r\nnew stepfunctions.cloudformation.StateMachineResource(Stack, \"statemachine\", {\r\n    roleArn: role.arn,\r\n    definitionString: new asl.StateMachine({\r\n        startAt: \"InitialState\",\r\n        states: new asl.States({\r\n            InitialState: ...\r\n        })\r\n    }).definitionString()\r\n});\r\n```"},"comment":{"url":"https://api.github.com/repos/awslabs/aws-cdk/issues/comments/409252467","html_url":"https://github.com/awslabs/aws-cdk/pull/421#issuecomment-409252467","issue_url":"https://api.github.com/repos/awslabs/aws-cdk/issues/421","id":409252467,"node_id":"MDEyOklzc3VlQ29tbWVudDQwOTI1MjQ2Nw==","user":{"login":"rix0rrr","id":524162,"node_id":"MDQ6VXNlcjUyNDE2Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/524162?v=4","gravatar_id":"","url":"https://api.github.com/users/rix0rrr","html_url":"https://github.com/rix0rrr","followers_url":"https://api.github.com/users/rix0rrr/followers","following_url":"https://api.github.com/users/rix0rrr/following{/other_user}","gists_url":"https://api.github.com/users/rix0rrr/gists{/gist_id}","starred_url":"https://api.github.com/users/rix0rrr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rix0rrr/subscriptions","organizations_url":"https://api.github.com/users/rix0rrr/orgs","repos_url":"https://api.github.com/users/rix0rrr/repos","events_url":"https://api.github.com/users/rix0rrr/events{/privacy}","received_events_url":"https://api.github.com/users/rix0rrr/received_events","type":"User","site_admin":false},"created_at":"2018-07-31T15:00:05Z","updated_at":"2018-07-31T15:00:05Z","author_association":"CONTRIBUTOR","body":"Yes, everything you're proposing sounds great.\r\n\r\nI also think that the argument to a `stepfunctions.StateMachine` could maybe simply be a start state, and all other states could be discovered through object references?\r\n\r\nWhat I don't like about that so much is that you're forced to specify your object graph backwards (can't refer to an object until it's been instantiated!), but on the other hand I also want compiler support and not stringly typed references everywhere."}}
{"actor":{"display_login":"rix0rrr"}}