Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support wait for state execution completion #345

Merged
merged 14 commits into from
Sep 18, 2023
4 changes: 2 additions & 2 deletions docker-compose/integ-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ services:
depends_on:
- cadence
environment:
- CADENCE_CLI_ADDRESS=cadence:7933
- CADENCE_CLI_ADDRESS=cadence:7833
duoertai marked this conversation as resolved.
Show resolved Hide resolved
image: ubercadence/cli:0.24.0
networks:
- testing-network
Expand All @@ -132,7 +132,7 @@ services:
cadence-web:
image: ubercadence/web:latest
environment:
- "CADENCE_TCHANNEL_PEERS=cadence:7933"
- "CADENCE_TCHANNEL_PEERS=cadence:7833"
ports:
- "8088:8088"
depends_on:
Expand Down
4 changes: 4 additions & 0 deletions gen/iwfidl/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ docs/WorkflowStateStartResponse.md
docs/WorkflowStatus.md
docs/WorkflowStopRequest.md
docs/WorkflowStopType.md
docs/WorkflowWaitForStateCompletionRequest.md
docs/WorkflowWaitForStateCompletionResponse.md
docs/WorkflowWorkerRpcRequest.md
docs/WorkflowWorkerRpcResponse.md
git_push.sh
Expand Down Expand Up @@ -152,6 +154,8 @@ model_workflow_state_start_response.go
model_workflow_status.go
model_workflow_stop_request.go
model_workflow_stop_type.go
model_workflow_wait_for_state_completion_request.go
model_workflow_wait_for_state_completion_response.go
model_workflow_worker_rpc_request.go
model_workflow_worker_rpc_response.go
response.go
Expand Down
3 changes: 3 additions & 0 deletions gen/iwfidl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ Class | Method | HTTP request | Description
*DefaultApi* | [**ApiV1WorkflowStateStartPost**](docs/DefaultApi.md#apiv1workflowstatestartpost) | **Post** /api/v1/workflowState/start | for invoking WorkflowState.start API
*DefaultApi* | [**ApiV1WorkflowStopPost**](docs/DefaultApi.md#apiv1workflowstoppost) | **Post** /api/v1/workflow/stop | stop a workflow
*DefaultApi* | [**ApiV1WorkflowTimerSkipPost**](docs/DefaultApi.md#apiv1workflowtimerskippost) | **Post** /api/v1/workflow/timer/skip | skip the timer of a workflow
*DefaultApi* | [**ApiV1WorkflowWaitForStateCompletionPost**](docs/DefaultApi.md#apiv1workflowwaitforstatecompletionpost) | **Post** /api/v1/workflow/waitForStateCompletion |
*DefaultApi* | [**ApiV1WorkflowWorkerRpcPost**](docs/DefaultApi.md#apiv1workflowworkerrpcpost) | **Post** /api/v1/workflowWorker/rpc | for invoking workflow RPC API in the worker
*DefaultApi* | [**InfoHealthcheckGet**](docs/DefaultApi.md#infohealthcheckget) | **Get** /info/healthcheck | return health info of the server

Expand Down Expand Up @@ -168,6 +169,8 @@ Class | Method | HTTP request | Description
- [WorkflowStatus](docs/WorkflowStatus.md)
- [WorkflowStopRequest](docs/WorkflowStopRequest.md)
- [WorkflowStopType](docs/WorkflowStopType.md)
- [WorkflowWaitForStateCompletionRequest](docs/WorkflowWaitForStateCompletionRequest.md)
- [WorkflowWaitForStateCompletionResponse](docs/WorkflowWaitForStateCompletionResponse.md)
- [WorkflowWorkerRpcRequest](docs/WorkflowWorkerRpcRequest.md)
- [WorkflowWorkerRpcResponse](docs/WorkflowWorkerRpcResponse.md)

Expand Down
51 changes: 51 additions & 0 deletions gen/iwfidl/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,32 @@ paths:
$ref: '#/components/schemas/HealthInfo'
description: successful operation
summary: return health info of the server
/api/v1/workflow/waitForStateCompletion:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowWaitForStateCompletionRequest'
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowWaitForStateCompletionResponse'
description: successful operation
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: Invalid input
"420":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: wait has exceeded timeout
/api/v1/workflowState/start:
post:
requestBody:
Expand Down Expand Up @@ -2102,6 +2128,31 @@ components:
$ref: '#/components/schemas/InterStateChannelPublishing'
type: array
type: object
WorkflowWaitForStateCompletionRequest:
example:
workflowId: workflowId
stateExecutionId: stateExecutionId
properties:
workflowId:
type: string
stateExecutionId:
type: string
required:
- stateExecutionId
- workflowId
type: object
WorkflowWaitForStateCompletionResponse:
example:
stateCompletionOutput:
completedStateOutput:
data: data
encoding: encoding
completedStateExecutionId: completedStateExecutionId
completedStateId: completedStateId
properties:
stateCompletionOutput:
$ref: '#/components/schemas/StateCompletionOutput'
type: object
StateDecision:
example:
nextStates:
Expand Down
Loading