{"id":13514168,"url":"https://github.com/checkr/states-language-cadence","last_synced_at":"2026-01-12T12:46:55.081Z","repository":{"id":82380111,"uuid":"213761427","full_name":"checkr/states-language-cadence","owner":"checkr","description":"States Language on Cadence","archived":false,"fork":false,"pushed_at":"2020-01-06T18:20:33.000Z","size":14489,"stargazers_count":63,"open_issues_count":1,"forks_count":13,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-11-01T17:39:44.748Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/checkr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-10-08T21:46:18.000Z","updated_at":"2024-10-10T22:50:00.000Z","dependencies_parsed_at":"2023-03-02T08:15:56.203Z","dependency_job_id":null,"html_url":"https://github.com/checkr/states-language-cadence","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/checkr%2Fstates-language-cadence","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/checkr%2Fstates-language-cadence/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/checkr%2Fstates-language-cadence/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/checkr%2Fstates-language-cadence/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/checkr","download_url":"https://codeload.github.com/checkr/states-language-cadence/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246407403,"owners_count":20772127,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T05:00:48.412Z","updated_at":"2026-01-12T12:46:55.064Z","avatar_url":"https://github.com/checkr.png","language":"Go","funding_links":[],"categories":["Go","Cadence"],"sub_categories":[],"readme":"# States Language on Cadence\n\nThis is an implementation of [States Language](https://states-language.net/spec.html) on top of the [Cadence Workflow](https://cadenceworkflow.io/) engine.\n\n#### Project Status\n\n:warning: **Note: This project is not production ready!** :warning:\n\nThis project is still under development and isn't ready for use in production. Feedback is welcome from the Cadence community. The goal is to provide a plugable way to execute State Language workflows on top of Cadence.\n\nThere a few States Language features still missing:\n- [ ] Error handling\n- [ ] Retry logic\n- [ ] JSON paths\n- [ ] Map task type\n\n\n#### About States Language\n\nAmazon States Language (ASL) is a JSON specification describing state machines and workflows. It is the description that powers AWS Step Functions. Cadence is a robust workflow engine created and open sourced by Uber.\nThis project allows you to mimic Step Functions outside of AWS infrastructure on inside a Cadence workflow.\n\n- [Spec](./STATE_SPEC.md)\n- [Website](https://states-language.net/spec.html)\n- [Editor](https://github.com/checkr/states-language-editor)\n\n#### Running tests\n\n```\nmake test\n```\n\n#### Updating vendors\n\n```\nmake mod-vendor\n```\n\n#### Example\n\nAn example command is provided in `cmd/workflow`. It should demenstrate how to use the framework and register workflows.\n\n#### Related projects\n\nThanks to the folks at Amazon for designing the state machine spec, the folks at Coinbase for building an [implementation in Golang](https://github.com/coinbase/step) and the folks at Uber for building [Cadence](https://github.com/uber/cadence)\n\n---\n\n#### What is States Language?\n\nThe operation of a state machine is specified by states, which are represented by JSON objects, fields in the top-level\n `\"States\"` object. In this example, there is one state named `\"FirstState\"`.\n\nWhen this state machine is launched, the interpreter begins execution by identifying the Start State (`\"StartAt\"`). It \nexecutes that state, and then checks to see if the state is marked as an End State. If it is, the machine terminates \nand returns a result. If the state is not an End State, the interpreter looks for a `\"Next\"` field to determine what \nstate to run next; it repeats this process until it reaches a Terminal State (Succeed, Fail, or an End State) or a \nruntime error occurs.\n\n![Example](example.png)\n\n```json\n{\n  \"Comment\": \"An example of the Amazon States Language using a choice state.\",\n  \"StartAt\": \"FirstState\",\n  \"States\": {\n    \"FirstState\": {\n      \"Type\": \"Task\",\n      \"Resource\": \"arn:aws:lambda:REGION:ACCOUNT_ID:function:FUNCTION_NAME\",\n      \"Next\": \"ChoiceState\"\n    },\n    \"ChoiceState\": {\n      \"Type\": \"Choice\",\n      \"Choices\": [\n        {\n          \"Variable\": \"$.foo\",\n          \"NumericEquals\": 1,\n          \"Next\": \"FirstMatchState\"\n        },\n        {\n          \"Variable\": \"$.foo\",\n          \"NumericEquals\": 2,\n          \"Next\": \"SecondMatchState\"\n        }\n      ],\n      \"Default\": \"DefaultState\"\n    },\n    \"FirstMatchState\": {\n      \"Type\": \"Task\",\n      \"Resource\": \"arn:aws:lambda:REGION:ACCOUNT_ID:function:OnFirstMatch\",\n      \"Next\": \"NextState\"\n    },\n    \"SecondMatchState\": {\n      \"Type\": \"Task\",\n      \"Resource\": \"arn:aws:lambda:REGION:ACCOUNT_ID:function:OnSecondMatch\",\n      \"Next\": \"NextState\"\n    },\n    \"DefaultState\": {\n      \"Type\": \"Fail\",\n      \"Error\": \"DefaultStateError\",\n      \"Cause\": \"No Matches!\"\n    },\n    \"NextState\": {\n      \"Type\": \"Task\",\n      \"Resource\": \"arn:aws:lambda:REGION:ACCOUNT_ID:function:FUNCTION_NAME\",\n      \"End\": true\n    }\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheckr%2Fstates-language-cadence","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcheckr%2Fstates-language-cadence","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheckr%2Fstates-language-cadence/lists"}