Home
Softono
cadence-api-example

cadence-api-example

Open source Go
16
Stars
6
Forks
0
Issues
1
Watchers
6 years
Last Commit

About cadence-api-example

The full source code for the article Building your first Cadence Workflow. Check out the article for a detailed walk-through of this repository.

Platforms

Web Self-hosted

Languages

Go

Readme

The full source code for the article Building your first Cadence Workflow. Check out the article for a detailed walk-through of this repository.

Running the Server

  1. cd cadenceservice
  2. docker-compose up
  3. Register the simple-domain with docker run --network=host --rm ubercadence/cli:master --do simple-domain domain register --rd 10

Worker and API Server

Navigate back to the project root folder. Make sure go is installed in system.

  • HttpServer

    1. make httpserver
    2. ./bins/httpserver
  • Worker

    1. make worker
    2. ./bins/worker

Endpoints

  1. To start workflow

    • POST request to http://localhost:3030/api/start-hello-world
    • Note down the workflow id so you can use it to signal
  2. To signal workflow

    • Copy the workflow id from the previous response or check Cadence UI for the WorkflowID
    • POST Request to http://localhost:3030/api/signal-hello-world?workflowId=<workflowId>&age=25
    • Make sure to replace with the id retrieved from cadence web ui