withParameter

Creates a new context with an additional parameter. Does not modify the original context.

Example:

val context = FlippingExecutionContext(ContextKeys.USER_ID to "123")
val withRegion = context.withParameter(ContextKeys.REGION, "EU")
// context is unchanged, withRegion has both userId and region

Return

A new FlippingExecutionContext with the added parameter

Parameters

key

The parameter key

value

The parameter value