Go-workflow start
Closed this issue · 1 comments
shubhamgoyal1402 commented
Describe the bug
The material given on the website for setting a simple hello-world-workflow is incorrect
To Reproduce
Is the issue reproducible?
- no
Expected behavior
The workflow must start , but after starting worker its not triggering the workflow.
mantas-sidlauskas commented
You need to have two terminals open:
one is for starting workflow worker which will wait for tasks and execute "hello world" like this:
❯ ./bin/helloworld -h
Usage of ./bin/helloworld:
-m string
Mode is worker, trigger or shadower. (default "trigger")
❯ ./bin/helloworld -m worker
2024-03-26T16:12:32.972+0200 INFO common/sample_helper.go:111 Logger created.
2024-03-26T16:12:32.972+0200 DEBUG common/factory.go:162 Creating RPC dispatcher outbound {"ServiceName": "cadence-frontend", "HostPort": "127.0.0.1:7833"}
2024-03-26T16:12:32.979+0200 INFO common/sample_helper.go:164 Domain successfully registered. {"Domain": "samples-domain"}
2024-03-26T16:12:33.050+0200 INFO internal/internal_worker.go:834 Started Workflow Worker {"Domain": "samples-domain", "TaskList": "helloWorldGroup", "WorkerID": "80976@Mantass-MacBook-Air.local@helloWorldGroup@78e6ea30-d87d-426f-8154-913e9ae5028e"}
2024-03-26T16:12:33.055+0200 INFO internal/internal_worker.go:859 Started Activity Worker {"Domain": "samples-domain", "TaskList": "helloWorldGroup", "WorkerID": "80976@Mantass-MacBook-Air.local@helloWorldGroup@78e6ea30-d87d-426f-8154-913e9ae5028e"}
another terminal for triggering the workflow like this: /bin/helloworld -m trigger
or simply /bin/helloworld
as "trigger" is the default operation
❯ ./bin/helloworld -m trigger
2024-03-26T16:14:39.605+0200 INFO common/sample_helper.go:111 Logger created.
2024-03-26T16:14:39.605+0200 DEBUG common/factory.go:162 Creating RPC dispatcher outbound {"ServiceName": "cadence-frontend", "HostPort": "127.0.0.1:7833"}
2024-03-26T16:14:39.610+0200 INFO common/sample_helper.go:164 Domain successfully registered. {"Domain": "samples-domain"}
2024-03-26T16:14:39.621+0200 INFO common/sample_helper.go:198 Started Workflow {"WorkflowID": "helloworld_d7adaf6e-e83b-4f7d-a284-8dad59b91d3c", "RunID": "53e41156-5d3d-494b-8c57-7e01eb9ce529"}