waitForEvent
method to pause execution and listen for the event. A timeout of 10 minutes (600 seconds) is applied to avoid indefinite waiting.
order-${orderId}
. When the external service notifies the workflow with this ID, the workflow resumes. If no event is received in time, the timeout ensures the workflow doesn’t hang.
eventData
) is logged. This step could include updates to the database, inventory adjustments, or other backend operations specific to order processing.
notify
method from the Client
. Alternatively, you can use context.notify
method.