Response Timeout Configuration
The ResponseTimeoutConfiguration
class defines the configuration settings for handling response timeouts in step executions.
It specifies how the system should respond when a step fails to respond within the expected duration after starting
Fields
Field | Type | Description |
---|---|---|
duration | long | The maximum duration (in milliseconds) to wait for a step to respond before triggering a timeout. |
action | StepErrorAction | The action to perform when a timeout occurs (FAIL , RETRY , or NONE ). |
runRequest | ProcessRequest | The request details to initiate a new process run if a retry is required. |
retryInterval | long | The interval (in milliseconds) between retry attempts. |
retryBackoffExponential | boolean | Indicates whether to use exponential backoff for retry intervals. |
retryCount | int | The number of retry attempts allowed after a timeout occurs. |
StepErrorAction Enum
The StepErrorAction
enum defines the possible actions to take when a step encounters an error during execution.
Enum Values
Action | Description |
---|---|
FAIL | Marks the step as failed and stops the process execution. |
RETRY | Attempts to retry the step based on the configured retry policies. |
NONE | Takes no action, allowing the process to continue despite the error. |
ProcessRequest
The ProcessRequest
class encapsulates the details required to initiate a new process run. It includes metadata and
input parameters necessary for executing the process.
Field | Type | Description |
---|---|---|
name | String | The name of the process to be executed. |
namespace | String | The namespace under which the process is categorized. |
version | Integer | The version number of the process definition. |
id | String | A unique identifier for the process run. |
correlationId | String | An identifier used to correlate related process runs or events. |
input | Map<String, Object> | A map of input parameters provided to the process during initiation. |
How does Response Timeout work?
-
Initial Check:
- The system retrieves the
StepContext
after a specified response timeout to check the step's execution status. - The timeout starts once a worker has picked up the work for the step
- The system retrieves the
-
Determine Action:
- If the step is still pending or not completed, the
ResponseTimeoutConfiguration
determines whether to retry, fail, or take no action based on theaction
field.
- If the step is still pending or not completed, the
-
Execute Action:
- Retry: Reschedules the step execution after the specified
retryInterval
, optionally using exponential backoff, and increments theretryCount
. - Fail: Marks the step as failed, possibly marking the process as failed depending on other settings
- None: Leaves the step as is, allowing the process to continue without interruption (useful to just trigger a run request and continue)
- Retry: Reschedules the step execution after the specified