Skip to content

Expense Agent: capture submission policy evaluation history #11627

Description

Scope

Capture a report-level policy-evaluation snapshot for each expense report submission or resubmission. Checks on drafts/recalled reports must not create activity history.

Related planning: AB#634361 (activity history) and AB#626515 (policy evaluation). This issue does not replace or close either slice.

Companion service implementation: https://microsoft.ghe.com/bic/BC-ExpenseAgent/issues/2754

Expected behavior

  • Reuse PolicyEvaluated with an explicit snapshot outcome, passed/failed line-policy counts, distinct flagged expense-line categories, and the latest underlying evaluation time.
  • Capture complete current evidence during submission, or after the existing line confirmation checks that the entire pending-approval report is ready.
  • Require submission history and enforce at most one snapshot since the latest Submitted/Resubmitted activity.
  • Reuse the existing activity-log management codeunit. No new API actions, capability, callback, submission token, context hashing, or header-invalidation changes.
  • Keep the activity API read-only and detailed policy-evaluation records intact.
  • Preserve history through posting and keep existing API actions compatible.
  • Respect the BC policy feature switch; never infer a clear result from missing evaluations.

Validation

Add AL unit/API coverage for both capture paths, repeated confirmation, resubmission, pending/non-pending states, incomplete/current evaluations, feature-off/no-policy behavior, category aggregation, and posting.
AL compilation, publication, runtime tests, and live cross-repository validation remain pending.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Team: IntegrationsGitHub request for Integrations area

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions