choice

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: 6 Imported by: 0

README

Exclusive-Choice Sample

This sample demonstrates how to run an activity based on a dynamic input.

Steps to run this sample:

  1. You need a Temporal service running. See details in README.md
  2. Run the following command to start the worker
go run choice-exclusive/worker/main.go
  1. Run the following command to start the exclusive choice workflow
go run choice-exclusive/starter/main.go

Documentation

Index

Constants

View Source
const (
	OrderChoiceApple  = "apple"
	OrderChoiceBanana = "banana"
	OrderChoiceCherry = "cherry"
	OrderChoiceOrange = "orange"
)

Variables

This section is empty.

Functions

func ExclusiveChoiceWorkflow

func ExclusiveChoiceWorkflow(ctx workflow.Context) error

ExclusiveChoiceWorkflow Workflow definition.

Types

type OrderActivities

type OrderActivities struct {
	OrderChoices []string
}

func (*OrderActivities) GetBasketOrder

func (a *OrderActivities) GetBasketOrder(ctx context.Context) ([]string, error)

func (*OrderActivities) GetOrder

func (a *OrderActivities) GetOrder() (string, error)

func (*OrderActivities) OrderApple

func (a *OrderActivities) OrderApple(choice string) error

func (*OrderActivities) OrderBanana

func (a *OrderActivities) OrderBanana(choice string) error

func (*OrderActivities) OrderCherry

func (a *OrderActivities) OrderCherry(choice string) error

func (*OrderActivities) OrderOrange

func (a *OrderActivities) OrderOrange(choice string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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