Demonstrates how to use a workflow interceptor to call an activity once the workflow is complete.
The worker is located in the worker folder and the client application is located in the client folder.
cd worker
dotnet run
# run only once
temporal server start-dev
# trigger a workflow locally
temporal workflow start --type SimpleWorkflow --task-queue simple-workflow-interceptor --input '{"val":"foo"}'
cd client
dotnet run
# set up environment variables
export TEMPORAL_NAMESPACE=<namespace>.<accountId>
export TEMPORAL_ADDRESS=<namespace>.<accountId>.tmprl.cloud:7233
export TEMPORAL_TLS_CERT=/path/to/cert
export TEMPORAL_TLS_KEY=/path/to/key
# run the worker
# if not in worker folder, change directories
cd worker
dotnet run
# set your temporal environment
temporal env set dev.namespace <namespace>.<accountId>
temporal env set dev.address <namespace>.<accountId>.tmprl.cloud:7233
temporal env set dev.tls-cert-path /path/to/cert
temporal env set dev.tls-key-path /path/to/key
# trigger a workflow on Temporal Cloud
temporal workflow start --type SimpleWorkflow --task-queue simple-workflow-interceptor --input '{"val":"foo"}' --env dev
# set your temporal environment
temporal env set dev.namespace <namespace>.<accountId>
temporal env set dev.address <namespace>.<accountId>.tmprl.cloud:7233
temporal env set dev.tls-cert-path /path/to/cert
temporal env set dev.tls-key-path /path/to/key
cd client
dotnet run