Skip to content

Change policy context

Steps

  1. The user picks a policy or statement in the layout, which posts to the reload-context, policy-number or statement handler. External updaters do not see the control (BR-APP-004); the server does not enforce this.
  2. The inherited page model re-resolves the web context (INH-001) † and refreshes the policy header, reusing a session header only on a policy match (INH-006) †.
  3. External users see only associated policies, and the dropdown is ordered (INH-005, INH-007) †. Remote failures fall back to defaults (INH-003) †.
  4. OnPostReloadContext sets the context policy number and calls SaveContext(), which saves the context to the BolContext cookie (INH-008) †, before calling OnPost().
  5. OnPost() reaches OnPostPolicyNumber, which runs PopulateModel with the user checks (BR-APP-002, BR-APP-003).
  6. The screen is rendered for the new policy as in Load screen.

Process flow

The diagram shows the order of steps when the reload-context handler saves the BolContext cookie before it repopulates the model.

flowchart TD
    A["Select policy"] --> B["POST ReloadContext"]
    B --> C["Set context policy number"]
    C --> D["SaveContext: BolContext cookie †"]
    D --> E["OnPost then OnPostPolicyNumber"]
    E --> F["PopulateModel"]
    F --> G["Render screen"]

Note: Statements marked with † are derived from dependency library documentation via the Legends CLI. They describe inherited behavior from the indicated origin library and should be verified if the dependency version changes.

Sources

  • src/NDReimbursementWebApp/Pages/NDReimbursement.cshtml.cs
  • src/NDReimbursementWebApp/Pages/NDReimbursement.cshtml