@@ -198,7 +198,7 @@ getEvent<T extends NonNullable<any>>(workflowUUID: string, key: string, timeoutS
198
198
` ` `
199
199
200
200
Retrieves an event published by _workflowUUID_ for a given key using the [events API](../tutorials/workflow-communication-tutorial#events-api).
201
- A call to ` getEvent ` waits for the workflow to publish the key, returning ` null ` if the wait times out:
201
+ Awaiting on the promise returned by ` getEvent () ` waits for the workflow to publish the key, returning ` null ` if the wait times out.
202
202
203
203
---
204
204
@@ -213,6 +213,8 @@ Workflows use `WorkflowContext` to invoke other functions and interact with othe
213
213
- [send(destinationUUID, message, \[ topic\] )](#workflowctxtsenddestinationuuid-message-topic)
214
214
- [recv(\[ topic, timeoutSeconds\] )](#workflowctxtrecvtopic-timeoutseconds)
215
215
- [setEvent(key, value)](#workflowctxtseteventkey-value)
216
+ - [getEvent()](#workflowctxtgeteventworkflowuuid-key-timeoutseconds)
217
+ - [retrieveWorkflow(workflowUUID)](#workflowctxtretrieveworkflowworkflowuuid)
216
218
217
219
### workflowCtxt.invoke(targetClass)
218
220
@@ -279,6 +281,25 @@ HTTP handlers can read events by calling [`getEvent`](#handlerctxtgeteventworkfl
279
281
Events are immutable and attempting to emit an event twice from a given workflow instance will result in an error.
280
282
For more information, see our [events API tutorial](../tutorials/workflow-communication-tutorial#events-api).
281
283
284
+ ### workflowCtxt.getEvent(workflowUUID, key, \[ timeoutSeconds\] )
285
+
286
+ ` ` ` typescript
287
+ getEvent <T extends NonNullable <any >>(workflowUUID : string , key : string , timeoutSeconds ? : number ): Promise <T | null >
288
+ ` ` `
289
+
290
+ Retrieves an event published by _workflowUUID_ for a given key using the [events API](../tutorials/workflow-communication-tutorial#events-api).
291
+ Awaiting on the promise returned by ` getEvent ()` waits for the workflow to publish the key, returning ` null ` if the wait times out.
292
+
293
+ ### workflowCtxt.retrieveWorkflow(workflowUUID)
294
+
295
+ ` ` ` typescript
296
+ retrieveWorkflow <R >(workflowUUID : string ): WorkflowHandle <R >
297
+ ` ` `
298
+
299
+ Returns a [workflow handle](./workflow-handles.md) to the workflow with [identity](../tutorials/workflow-tutorial#workflow-identity) _workflowUUID_.
300
+ ` R ` is the return type of the target workflow.
301
+
302
+
282
303
---
283
304
284
305
## ` TransactionContext <T >`
0 commit comments