Skip to content

Commit 694a768

Browse files
docs: Improve generator documents (#133)
* Add more generator instructions Signed-off-by: Ender Demirkaya <[email protected]> * Fix some generated files for samples Signed-off-by: Ender Demirkaya <[email protected]> --------- Signed-off-by: Ender Demirkaya <[email protected]>
1 parent 2fd7776 commit 694a768

File tree

5 files changed

+46
-1
lines changed

5 files changed

+46
-1
lines changed

new_samples/hello_world/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ Click on the workflow to see details:
8080

8181
![History tab with activity result](images/05-web-ui-history-activity-result.png)
8282

83+
* In Summary tab, you will see the input and output to your workflow
84+
* Click on History tab to see individual steps.
85+
8386
#### CLI
8487

8588
List workflows using the following command:
@@ -118,7 +121,6 @@ If you see port conflicts when starting Docker, use `lsof` to find what's using
118121
![Docker port conflict troubleshooting](images/06-docker-port-conflict-troubleshooting.png)
119122

120123
See the main [README](../../README.md#docker-troubleshooting) for detailed Docker troubleshooting steps.
121-
122124
## References
123125

124126
* The website: https://cadenceworkflow.io

new_samples/hello_world/generator/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,8 @@ In most cases, the workflow code (e.g. `workflow.go`) is the part that users car
2121
* When creating a new sample, follow the steps mentioned in the README file in the main samples folder.
2222
* To update the sample workflow code, edit the workflow file directly.
2323
* To update the worker, client, or other boilerplate logic, edit the generator file. If your change applies to all samples, update the common generator file inside the `template` folder. Edit the generator file in this folder only when the change should affect this sample alone.
24+
* When you are done run the following command in the generator folder
25+
26+
```bash
27+
go run .
28+
```

new_samples/hello_world/generator/README_specific.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ cadence --env development \
1212
--input '{"message":"Cadence"}'
1313
```
1414

15+
You should see output like this:
16+
17+
![Trigger command output](images/02-trigger-command-started-workflow.png)
18+
19+
And the worker will log the completed workflow:
20+
21+
![Worker output showing workflow completed](images/01-worker-output-workflow-completed.png)
22+
1523
Here are the details to this command:
1624

1725
* `--domain` option describes under which domain to run this workflow
@@ -29,6 +37,18 @@ To see more options run `cadence --help`
2937

3038
Click on `cadence-samples` domain in cadence-web to view your workflow.
3139

40+
![Workflow list showing completed workflow](images/03-web-ui-workflow-list-completed.png)
41+
42+
Click on the workflow to see details:
43+
44+
* In Summary tab, you will see the input and output to your workflow
45+
46+
![Summary tab](images/04-web-ui-summary-tab.png)
47+
48+
* Click on History tab to see individual steps. Expand an activity to see its result:
49+
50+
![History tab with activity result](images/05-web-ui-history-activity-result.png)
51+
3252
* In Summary tab, you will see the input and output to your workflow
3353
* Click on History tab to see individual steps.
3454

@@ -62,3 +82,11 @@ cadence --env development \
6282
workflow show \
6383
--wid <workflow_id>
6484
```
85+
86+
## Troubleshooting
87+
88+
If you see port conflicts when starting Docker, use `lsof` to find what's using the port:
89+
90+
![Docker port conflict troubleshooting](images/06-docker-port-conflict-troubleshooting.png)
91+
92+
See the main [README](../../README.md#docker-troubleshooting) for detailed Docker troubleshooting steps.

new_samples/signal/generator/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,8 @@ In most cases, the workflow code (e.g. `workflow.go`) is the part that users car
2121
* When creating a new sample, follow the steps mentioned in the README file in the main samples folder.
2222
* To update the sample workflow code, edit the workflow file directly.
2323
* To update the worker, client, or other boilerplate logic, edit the generator file. If your change applies to all samples, update the common generator file inside the `template` folder. Edit the generator file in this folder only when the change should affect this sample alone.
24+
* When you are done run the following command in the generator folder
25+
26+
```bash
27+
go run .
28+
```

new_samples/template/README_generator.tmpl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,8 @@ In most cases, the workflow code (e.g. `workflow.go`) is the part that users car
2121
* When creating a new sample, follow the steps mentioned in the README file in the main samples folder.
2222
* To update the sample workflow code, edit the workflow file directly.
2323
* To update the worker, client, or other boilerplate logic, edit the generator file. If your change applies to all samples, update the common generator file inside the `template` folder. Edit the generator file in this folder only when the change should affect this sample alone.
24+
* When you are done run the following command in the generator folder
25+
26+
```bash
27+
go run .
28+
```

0 commit comments

Comments
 (0)