From 1fbc73e3115132e5b43455a6a928d219c5d9e7f9 Mon Sep 17 00:00:00 2001 From: Bilgin Ibryam Date: Fri, 19 Jul 2024 22:42:27 +0100 Subject: [PATCH 1/2] Fixed typo in links (#4267) Signed-off-by: Erwin Kramer --- .../building-blocks/secrets/secrets-scopes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daprdocs/content/en/developing-applications/building-blocks/secrets/secrets-scopes.md b/daprdocs/content/en/developing-applications/building-blocks/secrets/secrets-scopes.md index 167d85f986d..afd41751505 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/secrets/secrets-scopes.md +++ b/daprdocs/content/en/developing-applications/building-blocks/secrets/secrets-scopes.md @@ -69,7 +69,7 @@ spec: allowedSecrets: ["secret1", "secret2"] ``` -The default access to the `vault` secret store is `deny`, while some secrets are accessible by the application, based on the `allowedSecrets` list. [Learn how to apply configuration to the sidecar]]({{< ref configuration-concept.md >}}). +The default access to the `vault` secret store is `deny`, while some secrets are accessible by the application, based on the `allowedSecrets` list. [Learn how to apply configuration to the sidecar]({{< ref configuration-concept.md >}}). ## Scenario 3: Deny access to certain sensitive secrets in a secret store @@ -88,7 +88,7 @@ spec: deniedSecrets: ["secret1", "secret2"] ``` -This example configuration explicitly denies access to `secret1` and `secret2` from the secret store named `vault` while allowing access to all other secrets. [Learn how to apply configuration to the sidecar]]({{< ref configuration-concept.md >}}). +This example configuration explicitly denies access to `secret1` and `secret2` from the secret store named `vault` while allowing access to all other secrets. [Learn how to apply configuration to the sidecar]({{< ref configuration-concept.md >}}). ## Permission priority From bc8303e82ab4310f7863328939f7a79c8e5175fb Mon Sep 17 00:00:00 2001 From: Erwin Kramer Date: Sat, 20 Jul 2024 15:40:16 +0200 Subject: [PATCH 2/2] markdown linting and navigation issues Signed-off-by: Erwin Kramer --- .../quickstarts/workflow-quickstart.md | 66 ++++++++++--------- 1 file changed, 36 insertions(+), 30 deletions(-) diff --git a/daprdocs/content/en/getting-started/quickstarts/workflow-quickstart.md b/daprdocs/content/en/getting-started/quickstarts/workflow-quickstart.md index 8e1adb0c5fc..f99d0ebd152 100644 --- a/daprdocs/content/en/getting-started/quickstarts/workflow-quickstart.md +++ b/daprdocs/content/en/getting-started/quickstarts/workflow-quickstart.md @@ -7,10 +7,10 @@ description: Get started with the Dapr Workflow building block --- {{% alert title="Note" color="primary" %}} -Dapr Workflow is currently in beta. [See known limitations for {{% dapr-latest-version cli="true" %}}]({{< ref "workflow-overview.md#limitations" >}}). +Dapr Workflow is currently in beta. [See known limitations for {{% dapr-latest-version cli="true" %}}]({{< ref "workflow-overview.md#limitations" >}}). {{% /alert %}} -Let's take a look at the Dapr [Workflow building block]({{< ref workflow-overview.md >}}). In this Quickstart, you'll create a simple console application to demonstrate Dapr's workflow programming model and the workflow management APIs. +Let's take a look at the Dapr [Workflow building block]({{< ref workflow-overview.md >}}). In this Quickstart, you'll create a simple console application to demonstrate Dapr's workflow programming model and the workflow management APIs. In this guide, you'll: @@ -29,8 +29,8 @@ Select your preferred language-specific Dapr SDK before proceeding with the Quic The `order-processor` console app starts and manages the `order_processing_workflow`, which simulates purchasing items from a store. The workflow consists of five unique workflow activities, or tasks: - `notify_activity`: Utilizes a logger to print out messages throughout the workflow. These messages notify you when: - - You have insufficient inventory - - Your payment couldn't be processed, etc. + - You have insufficient inventory + - Your payment couldn't be processed, etc. - `process_payment_activity`: Processes and authorizes the payment. - `verify_inventory_activity`: Checks the state store to ensure there is enough inventory present for purchase. - `update_inventory_activity`: Removes the requested items from the state store and updates the store with the new remaining inventory value. @@ -71,10 +71,11 @@ pip3 install -r requirements.txt In the terminal, start the order processor app alongside a Dapr sidecar using [Multi-App Run]({{< ref multi-app-dapr-run >}}): ```bash +cd workflows/python/sdk dapr run -f . ``` -This starts the `order-processor` app with unique workflow ID and runs the workflow activities. +This starts the `order-processor` app with unique workflow ID and runs the workflow activities. Expected output: @@ -105,7 +106,7 @@ Running `dapr init` launches the [openzipkin/zipkin](https://hub.docker.com/r/op docker run -d -p 9411:9411 openzipkin/zipkin ``` -View the workflow trace spans in the Zipkin web UI (typically at `http://localhost:9411/zipkin/`). +View the workflow trace spans in the Zipkin web UI (typically at `http://localhost:9411/zipkin/`). @@ -122,9 +123,10 @@ When you ran `dapr run -f .`: 1. The `NotifyActivity` workflow activity sends a notification saying that order `f4e1926e-3721-478d-be8a-f5bebd1995da` has completed. 1. The workflow terminates as completed. -#### `order-processor/app.py` +#### `order-processor/app.py` In the application's program file: + - The unique workflow order ID is generated - The workflow is scheduled - The workflow status is retrieved @@ -276,7 +278,6 @@ The `order-processor` console app starts and manages the lifecycle of an order p - `processPaymentActivity`: Processes and authorizes the payment. - `updateInventoryActivity`: Updates the state store with the new remaining inventory value. - ### Step 1: Pre-requisites For this example, you will need: @@ -318,11 +319,11 @@ In the terminal, start the order processor app alongside a Dapr sidecar using [M dapr run -f . ``` -This starts the `order-processor` app with unique workflow ID and runs the workflow activities. +This starts the `order-processor` app with unique workflow ID and runs the workflow activities. Expected output: -``` +```log == APP - workflowApp == == APP == Orchestration scheduled with ID: 0c332155-1e02-453a-a333-28cfc7777642 == APP - workflowApp == == APP == Waiting 30 seconds for instance 0c332155-1e02-453a-a333-28cfc7777642 to complete... == APP - workflowApp == == APP == Received "Orchestrator Request" work item with instance id '0c332155-1e02-453a-a333-28cfc7777642' @@ -393,7 +394,7 @@ Running `dapr init` launches the [openzipkin/zipkin](https://hub.docker.com/r/op docker run -d -p 9411:9411 openzipkin/zipkin ``` -View the workflow trace spans in the Zipkin web UI (typically at `http://localhost:9411/zipkin/`). +View the workflow trace spans in the Zipkin web UI (typically at `http://localhost:9411/zipkin/`). @@ -410,9 +411,10 @@ When you ran `dapr run -f .`: 1. The `notifyActivity` workflow activity sends a notification saying that order `0c332155-1e02-453a-a333-28cfc7777642` has completed. 1. The workflow terminates as completed. -#### `order-processor/workflowApp.ts` +#### `order-processor/workflowApp.ts` In the application file: + - The unique workflow order ID is generated - The workflow is scheduled - The workflow status is retrieved @@ -489,12 +491,12 @@ start().catch((e) => { {{% codetab %}} The `order-processor` console app starts and manages the lifecycle of an order processing workflow that stores and retrieves data in a state store. The workflow consists of four workflow activities, or tasks: + - `NotifyActivity`: Utilizes a logger to print out messages throughout the workflow - `ReserveInventoryActivity`: Checks the state store to ensure that there is enough inventory for the purchase - `ProcessPaymentActivity`: Processes and authorizes the payment - `UpdateInventoryActivity`: Removes the requested items from the state store and updates the store with the new remaining inventory value - ### Step 1: Pre-requisites For this example, you will need: @@ -513,10 +515,10 @@ Clone the [sample provided in the Quickstarts repo](https://github.com/dapr/quic git clone https://github.com/dapr/quickstarts.git ``` -In a new terminal window, navigate to the `order-processor` directory: +In a new terminal window, navigate to the `sdk` directory: ```bash -cd workflows/csharp/sdk/order-processor +cd workflows/csharp/sdk ``` ### Step 3: Run the order processor app @@ -527,7 +529,7 @@ In the terminal, start the order processor app alongside a Dapr sidecar using [M dapr run -f . ``` -This starts the `order-processor` app with unique workflow ID and runs the workflow activities. +This starts the `order-processor` app with unique workflow ID and runs the workflow activities. Expected output: @@ -567,7 +569,7 @@ Running `dapr init` launches the [openzipkin/zipkin](https://hub.docker.com/r/op docker run -d -p 9411:9411 openzipkin/zipkin ``` -View the workflow trace spans in the Zipkin web UI (typically at `http://localhost:9411/zipkin/`). +View the workflow trace spans in the Zipkin web UI (typically at `http://localhost:9411/zipkin/`). @@ -584,9 +586,10 @@ When you ran `dapr run -f .`: 1. The `NotifyActivity` workflow activity sends a notification saying that order `6d2abcc9` has completed. 1. The workflow terminates as completed. -#### `order-processor/Program.cs` +#### `order-processor/Program.cs` In the application's program file: + - The unique workflow order ID is generated - The workflow is scheduled - The workflow status is retrieved @@ -717,6 +720,7 @@ class OrderProcessingWorkflow : Workflow #### `order-processor/Activities` directory The `Activities` directory holds the four workflow activities used by the workflow, defined in the following files: + - `NotifyActivity.cs` - `ReserveInventoryActivity.cs` - `ProcessPaymentActivity.cs` @@ -734,22 +738,22 @@ Watch [this video to walk through the Dapr Workflow .NET demo](https://youtu.be/ {{% codetab %}} The `order-processor` console app starts and manages the lifecycle of an order processing workflow that stores and retrieves data in a state store. The workflow consists of four workflow activities, or tasks: + - `NotifyActivity`: Utilizes a logger to print out messages throughout the workflow - `RequestApprovalActivity`: Requests approval for processing payment - `ReserveInventoryActivity`: Checks the state store to ensure that there is enough inventory for the purchase - `ProcessPaymentActivity`: Processes and authorizes the payment - `UpdateInventoryActivity`: Removes the requested items from the state store and updates the store with the new remaining inventory value - ### Step 1: Pre-requisites For this example, you will need: - [Dapr CLI and initialized environment](https://docs.dapr.io/getting-started). - Java JDK 11 (or greater): - - [Microsoft JDK 11](https://docs.microsoft.com/java/openjdk/download#openjdk-11) - - [Oracle JDK 11](https://www.oracle.com/technetwork/java/javase/downloads/index.html#JDK11) - - [OpenJDK 11](https://jdk.java.net/11/) + - [Microsoft JDK 11](https://docs.microsoft.com/java/openjdk/download#openjdk-11) + - [Oracle JDK 11](https://www.oracle.com/technetwork/java/javase/downloads/index.html#JDK11) + - [OpenJDK 11](https://jdk.java.net/11/) - [Apache Maven](https://maven.apache.org/install.html) version 3.x. - [Docker Desktop](https://www.docker.com/products/docker-desktop) @@ -780,10 +784,11 @@ mvn clean install In the terminal, start the order processor app alongside a Dapr sidecar using [Multi-App Run]({{< ref multi-app-dapr-run >}}): ```bash +cd workflows/java/sdk dapr run -f . ``` -This starts the `order-processor` app with unique workflow ID and runs the workflow activities. +This starts the `order-processor` app with unique workflow ID and runs the workflow activities. Expected output: @@ -826,7 +831,7 @@ Running `dapr init` launches the [openzipkin/zipkin](https://hub.docker.com/r/op docker run -d -p 9411:9411 openzipkin/zipkin ``` -View the workflow trace spans in the Zipkin web UI (typically at `http://localhost:9411/zipkin/`). +View the workflow trace spans in the Zipkin web UI (typically at `http://localhost:9411/zipkin/`). @@ -1073,7 +1078,6 @@ The `Activities` directory holds the four workflow activities used by the workfl {{% codetab %}} - The `order-processor` console app starts and manages the `OrderProcessingWorkflow` workflow, which simulates purchasing items from a store. The workflow consists of five unique workflow activities, or tasks: - `NotifyActivity`: Utilizes a logger to print out messages throughout the workflow. These messages notify you when: @@ -1102,10 +1106,10 @@ Clone the [sample provided in the Quickstarts repo](https://github.com/dapr/quic git clone https://github.com/dapr/quickstarts.git ``` -In a new terminal window, navigate to the `order-processor` directory: +In a new terminal window, navigate to the `sdk` directory: ```bash -cd workflows/go/sdk/order-processor +cd workflows/go/sdk ``` ### Step 3: Run the order processor app @@ -1116,7 +1120,7 @@ In the terminal, start the order processor app alongside a Dapr sidecar using [M dapr run -f . ``` -This starts the `order-processor` app with unique workflow ID and runs the workflow activities. +This starts the `order-processor` app with unique workflow ID and runs the workflow activities. Expected output: @@ -1157,7 +1161,7 @@ Running `dapr init` launches the [openzipkin/zipkin](https://hub.docker.com/r/op docker run -d -p 9411:9411 openzipkin/zipkin ``` -View the workflow trace spans in the Zipkin web UI (typically at `http://localhost:9411/zipkin/`). +View the workflow trace spans in the Zipkin web UI (typically at `http://localhost:9411/zipkin/`). @@ -1174,9 +1178,10 @@ When you ran `dapr run`: 1. The `NotifyActivity` workflow activity sends a notification saying that order `48ee83b7-5d80-48d5-97f9-6b372f5480a5` has completed. 1. The workflow terminates as completed. -#### `order-processor/main.go` +#### `order-processor/main.go` In the application's program file: + - The unique workflow order ID is generated - The workflow is scheduled - The workflow status is retrieved @@ -1317,6 +1322,7 @@ Meanwhile, the `OrderProcessingWorkflow` and its activities are defined as metho {{< /tabs >}} ## Tell us what you think! + We're continuously working to improve our Quickstart examples and value your feedback. Did you find this Quickstart helpful? Do you have suggestions for improvement? Join the discussion in our [discord channel](https://discord.com/channels/778680217417809931/953427615916638238).