Skip to content

Commit 46f78a7

Browse files
authored
Merge pull request #4477 from scott-brady/feature/3639-zeebe-command-throw-error-variables
feat(bindings-zeebe-command): Add support for passing variables to throw-error operation. (#3639)
2 parents 7ed0652 + 03be3d5 commit 46f78a7

File tree

1 file changed

+11
-1
lines changed
  • daprdocs/content/en/reference/components-reference/supported-bindings

1 file changed

+11
-1
lines changed

daprdocs/content/en/reference/components-reference/supported-bindings/zeebe-command.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,12 @@ To perform a `throw-error` operation, invoke the Zeebe command binding with a `P
675675
"data": {
676676
"jobKey": 2251799813686172,
677677
"errorCode": "product-fetch-error",
678-
"errorMessage": "The product could not be fetched"
678+
"errorMessage": "The product could not be fetched",
679+
"variables": {
680+
"productId": "some-product-id",
681+
"productName": "some-product-name",
682+
"productKey": "some-product-key"
683+
}
679684
},
680685
"operation": "throw-error"
681686
}
@@ -686,6 +691,11 @@ The data parameters are:
686691
- `jobKey` - the unique job identifier, as obtained when activating the job
687692
- `errorCode` - the error code that will be matched with an error catch event
688693
- `errorMessage` - (optional) an error message that provides additional context
694+
- `variables` - (optional) JSON document that will instantiate the variables at the local scope of the
695+
job's associated task; it must be a JSON object, as variables will be mapped in a
696+
key-value fashion. e.g. { "a": 1, "b": 2 } will create two variables, named "a" and
697+
"b" respectively, with their associated values. [{ "a": 1, "b": 2 }] would not be a
698+
valid argument, as the root of the JSON document is an array and not an object.
689699

690700
##### Response
691701

0 commit comments

Comments
 (0)