Files
hatchet/examples/simple
abelanger5 5937b9fd98 feat(go-sdk): add ability to create workflows from the Go SDK more easily, quickstart improvements (#30)
* feat: add initial docs site

* feat: allow workflows to be defined from go sdk

* fix release action

* chore: remove server dependencies from client

* fix: use correct certificate for server

* chore: add port and bind address to grpc config

* fix: add env for grpc config

* fix: nil pointer when output is null

* chore: support variation in output args

* fix unresolve merge conflict

* fix: quickstart improvements

* temp remove database url

* fix: action id not required for event

* fix: actionid validation for events

* Remove deleted files
2024-01-02 09:02:53 -05:00
..
2023-12-15 13:08:04 -05:00

Simple Workflow Example

This example runs the sample-workflow.yaml.

Explanation

This folder contains a demo example of a workflow that simply echoes the input message as an output. The workflow file showcases the following features:

  • Running a simple job with a set of dependent steps
  • Variable references within step arguments -- each subsequent step in a workflow can call .steps.<step_id>.outputs to access output arguments

How to run

Navigate to this directory and run the following steps:

  1. Make sure you have a Hatchet server running (see the instructions here). After running task seed, grab the tenant ID which is output to the console.
  2. Set your environment variables -- if you're using the bundled Temporal server, this will look like:
cat > .env <<EOF
HATCHET_CLIENT_TENANT_ID=<tenant-id-from-seed-command>
HATCHET_CLIENT_TLS_ROOT_CA_FILE=../../hack/dev/certs/ca.cert
HATCHET_CLIENT_TLS_CERT_FILE=../../hack/dev/certs/client-worker.pem
HATCHET_CLIENT_TLS_KEY_FILE=../../hack/dev/certs/client-worker.key
HATCHET_CLIENT_TLS_SERVER_NAME=cluster
EOF
  1. Run the following within this directory:
/bin/bash -c '
set -a
. .env
set +a

go run main.go';