child_workflow_continue_as_new

package
v0.0.0-...-94a9b73 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

README

Child Workflow Continue-As-New

This sample demonstrates that when a Child Workflow calls Continue-As-New it is not visible by a parent. Parent Workflow Executions receive a notification that a Child Workflow Execution has completed only when the full execution has completed, failed, or timed out.

This feature is very useful when there is a need to process a large set of data. The Child Execution can iterate over the data set, calling Continue-As-New periodically without polluting the parents' history.

Make sure the Temporal Server is running locally.

Start the Worker:

go run child-workflow-continue-as-new/worker/main.go

Start the Parent Workflow Execution:

go run child-workflow-continue-as-new/starter/main.go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SampleChildWorkflow

func SampleChildWorkflow(ctx workflow.Context, totalCount, runCount int) (string, error)

@@@SNIPSTART samples-go-cw-cas-child-workflow-definition SampleChildWorkflow is a Workflow Definition

func SampleParentWorkflow

func SampleParentWorkflow(ctx workflow.Context) error

@@@SNIPSTART samples-go-cw-cas-parent-workflow-definition SampleParentWorkflow is a Workflow Definition

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL