Class ChildContextExample

java.lang.Object
software.amazon.lambda.durable.DurableHandler<GreetingRequest,String>
software.amazon.lambda.durable.examples.ChildContextExample
All Implemented Interfaces:
com.amazonaws.services.lambda.runtime.RequestStreamHandler

public class ChildContextExample extends DurableHandler<GreetingRequest,String>
Example demonstrating child context workflows with the Durable Execution SDK.

This handler runs three concurrent child contexts using runInChildContextAsync:

  1. Order validation — performs a step then suspends via wait() before completing
  2. Inventory check — performs a step then suspends via wait() before completing
  3. Shipping estimate — nests another child context inside it to demonstrate hierarchical contexts

All three child contexts run concurrently. Results are collected with DurableFuture.allOf(software.amazon.lambda.durable.DurableFuture<T>...) and combined into a summary string.