Skip to content

Commit

Permalink
add recovery policy and process state config (#10)
Browse files Browse the repository at this point in the history
* add recovery policy and process state config

* fix

* address comment

* failed state exec id and api could be null in context

* avoid using null

* description

* not using oneof

* fix

* address comment

* fix

* fix

* fix

* fix
  • Loading branch information
duoertai authored Oct 24, 2023
1 parent dc8027d commit 7a2fc2c
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions api-schema/xdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,17 @@ components:
attempt:
description: for async state API only(during backoff retry)
type: integer
recoverFromStateExecutionId:
description: for async state API only, state id + sequence number
type: string
recoverFromApi:
description: if last execution failed, WAIT_UNTIL or EXECUTE, otherwise NONE
$ref: '#/components/schemas/StateApiType'
StateApiType:
type: string
enum:
- WAIT_UNTIL_API
- EXECUTE_API
WorkerErrorResponse:
type: object
required:
Expand Down Expand Up @@ -499,6 +510,22 @@ components:
$ref: '#/components/schemas/RetryPolicy'
executeApiRetryPolicy:
$ref: '#/components/schemas/RetryPolicy'
stateFailureRecoveryInfo:
type: object
required:
- policy
properties:
policy:
$ref: '#/components/schemas/StateFailureRecoveryPolicy'
stateFailureProceedStateId: # only valid when name is PROCEED_TO_CONFIGURED_STATE
type: string
stateFailureProceedStateConfig: # only valid when name is PROCEED_TO_CONFIGURED_STATE
$ref: '#/components/schemas/AsyncStateConfig'
StateFailureRecoveryPolicy:
type: string
enum:
- FAIL_PROCESS_ON_STATE_FAILURE
- PROCEED_TO_CONFIGURED_STATE
RetryPolicy:
type: object
properties:
Expand Down

0 comments on commit 7a2fc2c

Please sign in to comment.