workflow

command
v1.10.1 Latest Latest
Warning

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

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

README

Dapr Workflow Example with go-sdk

Step

Prepare
  • Dapr installed
Run Workflow
dapr run --app-id workflow \
         --dapr-grpc-port 50001 \
         --log-level debug \
         --resources-path ./config \
         -- go run ./main.go

Result

  - '== APP == Worker initialized'
  - '== APP == TestWorkflow registered'
  - '== APP == TestActivity registered'
  - '== APP == runner started'
  - '== APP == workflow started with id: a7a4168d-3a1c-41da-8a4f-e7f6d9c718d9'
  - '== APP == workflow paused'
  - '== APP == workflow resumed'
  - '== APP == stage: 1'
  - '== APP == workflow event raised'
  - '== APP == stage: 2'
  - '== APP == workflow status: COMPLETED'
  - '== APP == workflow purged'
  - '== APP == stage: 2'
  - '== APP == workflow started with id: a7a4168d-3a1c-41da-8a4f-e7f6d9c718d9'
  - '== APP == workflow terminated'
  - '== APP == workflow purged'
  - '== APP == workflow client test'
  - '== APP == [wfclient] started workflow with id: a7a4168d-3a1c-41da-8a4f-e7f6d9c718d9'
  - '== APP == [wfclient] workflow status: RUNNING'
  - '== APP == [wfclient] stage: 1'
  - '== APP == [wfclient] event raised'
  - '== APP == [wfclient] stage: 2'
  - '== APP == [wfclient] workflow terminated'
  - '== APP == [wfclient] workflow purged'
  - '== APP == workflow worker successfully shutdown'

Documentation

Overview

Copyright 2024 The Dapr Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Jump to

Keyboard shortcuts

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