AWS amazonswf documentation change
Summary
Added new section about API parameter length constraints, updated section headers to lowercase, and improved formatting. The new section explains validation failures when exceeding character limits for activity heartbeats and exception details.
Security assessment
The changes primarily document API parameter validation constraints to prevent HTTP 400 errors. While input validation can have security implications, there is no explicit mention of addressing a vulnerability or security feature. The documentation update focuses on error prevention rather than security hardening.
Diff
diff --git a/amazonswf/latest/awsflowguide/troubleshooting.md b/amazonswf/latest/awsflowguide/troubleshooting.md index e783ffdfb..ac159de12 100644 --- a//amazonswf/latest/awsflowguide/troubleshooting.md +++ b//amazonswf/latest/awsflowguide/troubleshooting.md @@ -5 +5 @@ -Compilation ErrorsUnknown Resource FaultExceptions When Calling get() on a PromiseNon Deterministic WorkflowsProblems Due to Versioning Troubleshooting and Debugging a Workflow Execution Lost Tasks +Compilation errorsUnknown resource faultExceptions when calling get() on a PromiseNondeterministic workflowsProblems due to versioning Troubleshooting and debugging a workflow execution Lost tasksValidation failure due to API parameter length constraints @@ -7 +7 @@ Compilation ErrorsUnknown Resource FaultExceptions When Calling get() on a Promi -# Troubleshooting and Debugging Tips +# Troubleshooting and debugging tips for AWS Flow Framework for Java @@ -11 +11 @@ Compilation ErrorsUnknown Resource FaultExceptions When Calling get() on a Promi - * Compilation Errors + * Compilation errors @@ -13 +13 @@ Compilation ErrorsUnknown Resource FaultExceptions When Calling get() on a Promi - * Unknown Resource Fault + * Unknown resource fault @@ -15 +15 @@ Compilation ErrorsUnknown Resource FaultExceptions When Calling get() on a Promi - * Exceptions When Calling get() on a Promise + * Exceptions when calling get() on a Promise @@ -17 +17 @@ Compilation ErrorsUnknown Resource FaultExceptions When Calling get() on a Promi - * Non Deterministic Workflows + * Nondeterministic workflows @@ -19 +19 @@ Compilation ErrorsUnknown Resource FaultExceptions When Calling get() on a Promi - * Problems Due to Versioning + * Problems due to versioning @@ -21 +21 @@ Compilation ErrorsUnknown Resource FaultExceptions When Calling get() on a Promi - * Troubleshooting and Debugging a Workflow Execution + * Troubleshooting and debugging a workflow execution @@ -23 +23,3 @@ Compilation ErrorsUnknown Resource FaultExceptions When Calling get() on a Promi - * Lost Tasks + * Lost tasks + + * Validation failure due to API parameter length constraints @@ -30 +32 @@ This section describes some common pitfalls that you might run into while develo -## Compilation Errors +## Compilation errors @@ -34 +36 @@ If you are using the AspectJ compile time weaving option, you may run into compi -## Unknown Resource Fault +## Unknown resource fault @@ -40 +42 @@ Amazon SWF returns unknown resource fault when you try to perform an operation o - * You try to create workflow execution or activity tasks of types that have not been registered. This can happen if you try to create the workflow execution before the workers have been run. Since workers register their types when they are run for the first time, you must run them at least once before attempting to start executions (or manually register the types using the Console or the service API). Note that once types have been registered, you can create executions even if no worker is running. + * You try to create workflow execution or activity tasks of types that have not been registered. This can happen if you try to create the workflow execution before the workers have been run. Because workers register their types when they are run for the first time, you must run them at least once before attempting to start executions (or manually register the types using the Console or the service API). Note that once types have been registered, you can create executions even if no worker is running. @@ -47 +49 @@ Amazon SWF returns unknown resource fault when you try to perform an operation o -## Exceptions When Calling get() on a Promise +## Exceptions when calling get() on a Promise @@ -51 +53 @@ Unlike Java Future, `Promise` is a non-blocking construct and calling `get()` on -## Non Deterministic Workflows +## Nondeterministic workflows @@ -53 +55 @@ Unlike Java Future, `Promise` is a non-blocking construct and calling `get()` on -As described in the section [Nondeterminism](./details.html#details.non), the implementation of your workflow must be deterministic. Some common mistakes that can lead to nondeterminism are use of system clock, use of random numbers, and generation of GUIDs. Since these constructs may return different values at different times, the control flow of your workflow may take different paths each time it is executed (see the sections [AWS Flow Framework Basic Concepts: Distributed Execution](./awsflow-basics-distributed-execution.html) and [Under the Hood](./details.html) for details). If the framework detects nondeterminism while executing the workflow, an exception will be thrown. +As described in the section [Nondeterminism](./details.html#details.non), the implementation of your workflow must be deterministic. Some common mistakes that can lead to nondeterminism are use of system clock, use of random numbers, and generation of GUIDs. Because these constructs may return different values at different times, the control flow of your workflow may take different paths each time it is executed (see the sections [AWS Flow Framework Basic Concepts: Distributed Execution](./awsflow-basics-distributed-execution.html) and [Understanding a Task in AWS Flow Framework for Java](./details.html) for details). If the framework detects nondeterminism while executing the workflow, an exception will be thrown. @@ -55 +57 @@ As described in the section [Nondeterminism](./details.html#details.non), the im -## Problems Due to Versioning +## Problems due to versioning @@ -59 +61 @@ When you implement a new version of your workflow or activity—for instance, wh -## Troubleshooting and Debugging a Workflow Execution +## Troubleshooting and debugging a workflow execution @@ -108 +110 @@ AWS Flow Framework also allows you to get an asynchronous thread dump of your wo -## Lost Tasks +## Lost tasks @@ -120,0 +123,6 @@ In order to avoid this situation, use different task lists for each test. Also, +## Validation failure due to API parameter length constraints + +Amazon SWF enforces length constraints on API parameters. You will receive an `HTTP 400` error if your workflow or activity implementation exceeds the constraints. For example, when calling `recordActivityHeartbeat` on `ActivityExecutionContext` to send a heartbeat for a running activity, the string must not be longer than 2048 characters. + +Another common scenario is when an activity fails due to an exception. The framework reports an activity failure to Amazon SWF by calling [RespondActivityTaskFailed](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_RespondActivityTaskFailed.html) with the serialized exception as details. The API call will report a 400 error if the serialized exception has a length greater than 32,768 bytes. To mitigate this situation, you can truncate the exception message or the causes to conform to the length constraint. + @@ -127 +135 @@ To use the Amazon Web Services Documentation, Javascript must be enabled. Please -Under the Hood +Solutions