query

package
v0.0.0-...-e814acc 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: 2 Imported by: 0

README

This sample workflow demos how to use query API to get the current state of running workflow.

query_workflow.go shows how to setup a custom workflow query handler

query_workflow_test.go shows how to unit-test query functionality

Steps to run this sample:

  1. You need a Temporal service running. See details in README.md
  2. Run the following command to start worker
go run query/worker/main.go
  1. Run the following command to trigger a workflow execution. You should see workflowID and runID print out on screen.
go run query/starter/main.go
  1. Run the following command to see current workflow state on the screen.
go run query/query/main.go
  1. You could also specify the query type "__stack_trace" to dump the call stack for the workflow.
go run query/query/main.go -t __stack_trace

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func QueryWorkflow

func QueryWorkflow(ctx workflow.Context) error

Workflow is to demo how to setup query handler

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