https://github.com/cadence-workflow/cadence-samples
https://github.com/cadence-workflow/cadence-samples
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/cadence-workflow/cadence-samples
- Owner: cadence-workflow
- License: apache-2.0
- Created: 2017-06-19T23:37:47.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2025-05-12T21:10:06.000Z (about 1 year ago)
- Last Synced: 2025-05-13T07:03:09.249Z (about 1 year ago)
- Language: Go
- Size: 5.31 MB
- Stars: 198
- Watchers: 629
- Forks: 98
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ccamel - cadence-workflow/cadence-samples - (Go)
README
# Cadence Samples 
These are some samples to demostrate various capabilities of Cadence client and server. You can learn more about cadence at:
* Cadence Server: https://github.com/cadence-workflow/cadence
* Cadence Client: https://github.com/cadence-workflow/cadence-go-client
## Prerequisite for running samples
Run Cadence server:
```
curl -LO https://raw.githubusercontent.com/cadence-workflow/cadence/refs/heads/master/docker/docker-compose.yml
docker-compose up
```
## Steps to run samples
### Build Samples
```
make
```
### Run HelloWorld Sample
* Start workers for helloworld workflow and activities
```
./bin/helloworld -m worker
```
* Start workflow execution for helloworld workflow
```
./bin/helloworld -m trigger
```
### Commands to run other samples
#### cron
```
./bin/cron -m worker
```
Start workflow with cron expression scheduled to run every minute.
```
./bin/cron -m trigger -cron "* * * * *"
```
#### dsl
```
./bin/dsl -m worker
```
```
./bin/dsl -m trigger -dslConfig cmd/samples/dsl/workflow1.yaml
./bin/dsl -m trigger -dslConfig cmd/samples/dsl/workflow2.yaml
```
#### expense
See more details in https://github.com/uber-common/cadence-samples/blob/master/cmd/samples/expense/README.md
#### fileprocessing
```
./bin/fileprocessing -m worker
```
```
./bin/fileprocessing -m trigger
```
#### recipes/branch
```
./bin/branch -m worker
```
Run branch workflow
```
./bin/branch -m trigger -c branch
```
Run parallel branch workflow
```
./bin/branch -m trigger -c parallel this will run the parallel branch workflow
```
#### recipes/choice
```
./bin/choice -m worker
```
Run the single choice workflow
```
./bin/choice -m trigger -c single
```
Run the multi choice workflow
```
./bin/choice -m trigger -c multi
```
#### greetings
```
./bin/greetings -m worker
```
```
./bin/greetings -m trigger
```
#### pickfirst
```
./bin/pickfirst -m worker
```
```
./bin/pickfirst -m trigger
```
#### mutex
```
./bin/mutex -m worker
```
```
./bin/mutex -m trigger
```
#### retryactivity
```
./bin/retryactivity -m worker
```
```
./bin/retryactivity -m trigger
```
#### splitmerge
```
./bin/splitmerge -m worker
```
```
./bin/splitmerge -m trigger
```
#### timer
```
./bin/timer -m worker
```
```
./bin/timer -m trigger
```
#### childworkflow
```
./bin/childworkflow -m worker
```
```
./bin/childworkflow -m trigger
```
#### dynamic
```
./bin/dynamic -m worker
```
```
./bin/dynamic -m trigger
```
#### localactivity
See more details in https://github.com/uber-common/cadence-samples/blob/master/cmd/samples/recipes/localactivity/README.md
#### query
See more details in https://github.com/uber-common/cadence-samples/blob/master/cmd/samples/recipes/query/README.md
#### recovery
See more details in https://github.com/uber-common/cadence-samples/blob/master/cmd/samples/recovery/README.md
## License
Apache 2.0 License, please see [LICENSE](https://github.com/cadence-workflow/cadence-samples/blob/master/LICENSE) for details.