Home > @aws/durable-execution-sdk-js-testing > WaitingOperationStatus
An enum for different available waiting operation statuses.
Signature:
export declare enum WaitingOperationStatus|
Member |
Value |
Description |
|---|---|---|
|
COMPLETED |
|
Fires when the operation is completed. This includes a status of CANCELLED, FAILED, STOPPED, SUCCEEDED, or TIMED_OUT. |
|
STARTED |
|
Fires when the operation starts. |
|
SUBMITTED |
|
Submitted is the same as COMPLETED, except for the case where the operation is waitForCallback. In that case, SUBMITTED will fire when the waitForCallback submitter is completed. |
const wait = runner.getOperation("my-wait");
const myWait = await wait.waitForData();
assert(myWait.getWaitDetails()?.waitSeconds === 10);const callback = runner.getOperation("my-callback");
const myCallback = await callback.waitForData(WaitingOperationStatus.SUBMITTED);
myCallback.sendCallbackSuccess("Hello World");