Skip to main content

Asset Management Business Rules

Reference Content

RuleTrigger / layerResult and maturity
Tenant context is required and ordinary queries are tenant-filteredCommands/query filtersMissing tenant blocks commands; cross-tenant rows are excluded. Implemented.
Code, name, and type must be validRegistration/domain value objectsInvalid input blocks creation. Implemented.
Normalized asset code is tenant-uniqueRegistration/application repository checkDuplicate returns conflict. Implemented at application layer; no matching tenant+code unique database constraint.
Serial number need not be uniqueRegistrationNo conflict check or unique constraint. Unenforced expectation if uniqueness is desired.
Request needs a positive requesting userRequest/domainMissing resolvable user blocks request. Implemented.
Assignment requires eligible status and a holder referenceAssignment/domainInvalid status or empty assignee blocks issue. Implemented.
One active assignment per aggregateAssignment/status modelIssued cannot be issued again. Implemented, without a separate assignment table.
Workflow-managed request is decided through workflowDirect assign/reject/application guardDirect operation conflicts until callback. Transitional/configuration-dependent.
Return requires IssuedReturn/domainOther status blocks; holder and dates clear on success. Implemented.
Returned is not automatically AvailableReturn/domainExplicit mark-available or direct reassignment follows. Implemented.
Rejection requires Requested and a reasonReject/application+domainInvalid request blocks. Implemented.
Damage/loss cannot follow Retired or RejectedIncident/domainInvalid transition blocks. Implemented.
Retirement cannot repeatRetire/domainSecond attempt blocks. Implemented.
Only Available, Requested, or Rejected can be deletedDelete/domainOther statuses conflict. Implemented.
Employee must exist/own requestAssignment/requestNo Employee Service validation or resource ownership check. Not implemented.
UI type/condition choices and role visibilityPortalUI-only, not canonical API enforcement. Transitional.

See Also

Keywords

  • Asset validation
  • Lifecycle enforcement

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-17
  • Review cycle: Quarterly

Source References

  • microservices/src/asset-service/Domain/Asset/Asset.cs
  • microservices/src/asset-service/Application/Commands/AssetCommands.cs
  • microservices/src/asset-service/Infrastructure/AssetDbContext.cs