Skip to content

Seed a default context value on cross-application arrival

Set an initial context value when the user arrives from a different application. Trigger: Consuming application calling the helper after context resolution*.

Field Value
Operation ID OP-27
Trigger Consuming application calling the helper after context resolution*
Inputs Request referrer and URL, candidate values
Outputs context.CurrentValue possibly set
Primary components IWebContextExtensions.SetDefaultCurrentValue(IWebContext, HttpRequestBase, params string[] values)
Entry point src/Web/WebContextService.cs

Steps

  1. Proceed only when request.UrlReferrer is non-null (BR-62).
  2. Compare the referrer's application name with the current URL's application name.
  3. When they differ and at least one candidate value is non-empty, set context.CurrentValue to the first non-empty candidate (BR-63).

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([Helper called after context resolution])
    Ref{UrlReferrer non-null?}
    NoChange([No change])
    Compare[Compare referrer vs current app]
    Diff{Apps differ and a value non-empty?}
    Set[Set CurrentValue to first non-empty candidate]
    EndOk([Done])
    Start --> Ref
    Ref -->|No| NoChange
    Ref -->|Yes| Compare
    Compare --> Diff
    Diff -->|Yes| Set
    Diff -->|No| EndOk
    Set --> EndOk
    NoChange --> EndOk

Failure and edge-case behavior

  • No unexpected failure paths beyond argument-guard exceptions and delegated dependency behavior were identified for this operation.

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • src/Web/WebContextService.cs