localactivity

command
v0.0.0-...-df6f7bd Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

README

This sample workflow demos how to use local activity to execute short/quick operations efficiently.

local_activity_workflow.go shows how to use local activity local_activity_workflow_test.go shows how to unit-test workflow with local activity

Steps to run this sample:

  1. You need a cadence service running. See details in cmd/samples/README.md
  2. Run the following command to start worker
./bin/localactivity -m worker
  1. Run the following command to trigger a workflow execution. You should see workflowID and runID print out on screen.
./bin/localactivity -m trigger
  1. Run the following command to send signal "1" to the running workflow. You should see output that indicate 5 local activity has been run to check the conditions and one condition will be true which result in one activity to be scheduled.
./bin/localactivity -m signal -s _1_ -w <workflow ID from step 3>
  1. Repeat step 4, but with different signal data, for example, send signal like 2_4 to make 2 conditions true.
./bin/localactivity -m signal -s _2_4_ -w <workflow ID from step 3>
  1. Run the following command this will exit the workflow.
./bin/localactivity -m signal -s exit

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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