From 4d02b2e26ef2e5c2f99082a831c5acb5c8005b06 Mon Sep 17 00:00:00 2001 From: Scott Brady Date: Wed, 25 Dec 2024 09:20:14 +0000 Subject: [PATCH 1/5] feat(bindings-zeebe-command): Add support for passing variables to throw-error operation. (#3639) Signed-off-by: Scott Brady --- .../supported-bindings/zeebe-command.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/zeebe-command.md b/daprdocs/content/en/reference/components-reference/supported-bindings/zeebe-command.md index 780bfaebefe..76def5a6b42 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/zeebe-command.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/zeebe-command.md @@ -675,7 +675,12 @@ To perform a `throw-error` operation, invoke the Zeebe command binding with a `P "data": { "jobKey": 2251799813686172, "errorCode": "product-fetch-error", - "errorMessage": "The product could not be fetched" + "errorMessage": "The product could not be fetched", + "variables": { + "productId": "some-product-id", + "productName": "some-product-name", + "productKey": "some-product-key" + } }, "operation": "throw-error" } @@ -686,6 +691,11 @@ The data parameters are: - `jobKey` - the unique job identifier, as obtained when activating the job - `errorCode` - the error code that will be matched with an error catch event - `errorMessage` - (optional) an error message that provides additional context +- `variables` - (optional) JSON document that will instantiate the variables at the local scope of the + job's associated task; it must be a JSON object, as variables will be mapped in a + key-value fashion. e.g. { "a": 1, "b": 2 } will create two variables, named "a" and + "b" respectively, with their associated values. [{ "a": 1, "b": 2 }] would not be a + valid argument, as the root of the JSON document is an array and not an object. ##### Response From 177a6ca1507c2bbfe3766d3daecb9b1354f7d802 Mon Sep 17 00:00:00 2001 From: Yossi Spektor Date: Mon, 30 Dec 2024 17:43:15 +0100 Subject: [PATCH 2/5] Update workflow-features-concepts.md Fix typos, use more Java-idiomatic code names (methods in Java usually don't begin with uppercase letters). Signed-off-by: Yossi Spektor --- .../workflow/workflow-features-concepts.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md b/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md index b0392fa7818..2b2fbde3561 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md +++ b/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md @@ -199,7 +199,7 @@ string randomString = GetRandomString(); // DON'T DO THIS! Instant currentTime = Instant.now(); UUID newIdentifier = UUID.randomUUID(); -string randomString = GetRandomString(); +String randomString = getRandomString(); ``` {{% /codetab %}} @@ -246,7 +246,7 @@ string randomString = await context.CallActivityAsync("GetRandomString") ```java // Do this!! Instant currentTime = context.getCurrentInstant(); -Guid newIdentifier = context.NewGuid(); +Guid newIdentifier = context.newGuid(); String randomString = context.callActivity(GetRandomString.class.getName(), String.class).await(); ``` @@ -342,7 +342,7 @@ Do this: ```csharp // Do this!! -string configuation = workflowInput.Configuration; // imaginary workflow input argument +string configuration = workflowInput.Configuration; // imaginary workflow input argument string data = await context.CallActivityAsync("MakeHttpCall", "https://example.com/api/data"); ``` @@ -352,7 +352,7 @@ string data = await context.CallActivityAsync("MakeHttpCall", "https://e ```java // Do this!! -String configuation = ctx.getInput(InputType.class).getConfiguration(); // imaginary workflow input argument +String configuration = ctx.getInput(InputType.class).getConfiguration(); // imaginary workflow input argument String data = ctx.callActivity(MakeHttpCall.class, "https://example.com/api/data", String.class).await(); ``` @@ -362,7 +362,7 @@ String data = ctx.callActivity(MakeHttpCall.class, "https://example.com/api/data ```javascript // Do this!! -const configuation = workflowInput.getConfiguration(); // imaginary workflow input argument +const configuration = workflowInput.getConfiguration(); // imaginary workflow input argument const data = yield ctx.callActivity(makeHttpCall, "https://example.com/api/data"); ``` From f711af992190cc9b960f5c77c134926e971da1da Mon Sep 17 00:00:00 2001 From: Yossi Spektor Date: Tue, 31 Dec 2024 13:19:08 +0100 Subject: [PATCH 3/5] Update setup-postgresql-v2.md Mention that `actorStateStore` needs to be `true` if the state store is used for workflows as well (since workflows use actors under the hood). Signed-off-by: Yossi Spektor --- .../supported-state-stores/setup-postgresql-v2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-postgresql-v2.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-postgresql-v2.md index 3223867787f..dc7787d4f22 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-postgresql-v2.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-postgresql-v2.md @@ -52,7 +52,7 @@ spec: # Controls the default mode for executing queries. (optional) #- name: queryExecMode # value: "" - # Uncomment this if you wish to use PostgreSQL as a state store for actors (optional) + # Uncomment this if you wish to use PostgreSQL as a state store for actors or workflows (optional) #- name: actorStateStore # value: "true" ``` From caebe93ae07b7dfc7ec0eee191c710af52fd3085 Mon Sep 17 00:00:00 2001 From: Yossi Spektor Date: Tue, 31 Dec 2024 13:20:12 +0100 Subject: [PATCH 4/5] Update setup-postgresql-v1.md Mention that `actorStateStore` needs to be `true` if the state store is used for workflows as well (since workflows use actors under the hood). Signed-off-by: Yossi Spektor --- .../supported-state-stores/setup-postgresql-v1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-postgresql-v1.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-postgresql-v1.md index 8cec85ad16a..c818d7d191f 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-postgresql-v1.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-postgresql-v1.md @@ -52,7 +52,7 @@ spec: # Controls the default mode for executing queries. (optional) #- name: queryExecMode # value: "" - # Uncomment this if you wish to use PostgreSQL as a state store for actors (optional) + # Uncomment this if you wish to use PostgreSQL as a state store for actors or workflows (optional) #- name: actorStateStore # value: "true" ``` From 197c05375691056a1a91217f2ff726ba48608d04 Mon Sep 17 00:00:00 2001 From: Gallardot Date: Fri, 10 Jan 2025 23:06:48 +0800 Subject: [PATCH 5/5] fix rust-sdk menu link Signed-off-by: Gallardot --- daprdocs/config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/config.toml b/daprdocs/config.toml index dcaf0b6ec97..b0165c98386 100644 --- a/daprdocs/config.toml +++ b/daprdocs/config.toml @@ -109,7 +109,7 @@ id = "G-60C6Q1ETC1" lang = "en" [[module.mounts]] source = "../sdkdocs/rust/daprdocs/content/en/rust-sdk-contributing" - target = "content/contributing/sdks-contrib" + target = "content/contributing/sdk-contrib/" lang = "en" [[module.mounts]]