Home
Softono

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

Need Help Installing Cadence Api Example?

We provide expert installation service for this software. Our team will install, configure, and secure Cadence Api Example on your server. plans start at just $30.

Cadence Api Example

View on GitHub

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 <workflowId> with the id retrieved from cadence web ui