Skip to content

Commit 4581b48

Browse files
committed
Document signaling workflows from within workflows
1 parent b6059ef commit 4581b48

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,16 @@ func Workflow(ctx workflow.Context) error {
348348
}
349349
```
350350
351+
#### Signaling workflows from within workflows
352+
353+
```go
354+
func Workflow(ctx workflow.Context) error {
355+
if err := workflow.SignalWorkflow(ctx, "sub-instance-id", "signal-name", "value"); err != nil {
356+
// Handle error
357+
}
358+
}
359+
```
360+
351361
### Executing side effects
352362
353363
Sometimes scheduling an activity is too much overhead for a simple side effect. For those scenarios you can use `workflow.SideEffect`. You can pass a func which will be executed only once inline with its result being recorded in the history. Subsequent executions of the workflow will return the previously recorded result.

0 commit comments

Comments
 (0)