---
title: Business rules
summary: Rules enforced around the call to the remote service.
status: draft
owner: SAIF.Core documentation
last_reviewed: 2026-09-24
---

# Business rules

`DocumentServiceProxy` and its argument-mapping helpers apply three client-side rules when constructing the `distributeDocument` message: they never populate an email attachment's file name, they silently ignore fax details on one distribution path, and they select the application/tenant label from more than one source.

---

## BR-DOC-001 AttachmentFileName is never populated

| Field | Value |
| --- | --- |
| Statement | `MapMailMessage` maps `To`, `CC`, `BCC`, `Subject`, and `Body` from a `MailMessage` into the generated `EmailInfoClass`, but never sets `AttachmentFileName`, even though the contract declares that field |
| Trigger | Evaluated whenever a `distributeDocument` call includes email distribution |
| Enforcement | Wrapper — `MapMailMessage` |
| Origin | wrapper |
| Outcome | Every emailed distribution through this proxy carries no attachment file name in the `EmailInfoClass` sent to the remote service |
| Related operation | [`distributeDocument`](reference.md#distributedocument) |
| Reached from | [`distributeDocument`](reference.md#distributedocument) — every `distributeDocument` call routed through `MapMailMessage` |
| Source | `Services/SAIF.Services.Web.Proxies/DocumentServiceProxy.cs:174-187` |

---

## BR-DOC-002 FaxInfo is silently ignored in DistributeDocument

| Field | Value |
| --- | --- |
| Statement | `DocumentServiceProxy.DistributeDocument` always sends `inFaxInfo: null` to the remote service; the method's own `faxInfo` parameter is accepted but never mapped or forwarded |
| Trigger | Evaluated on every call to the `DistributeDocument` overload |
| Enforcement | Wrapper — `DistributeDocument`, with `CA1801` suppressed for the unused parameter |
| Origin | wrapper |
| Outcome | A caller supplying fax details through this overload has those details discarded before the call, with no fax distribution occurring; `DistributeDocumentDocCenter` maps fax details correctly via `MapFaxMessage` |
| Related operation | [`distributeDocument`](reference.md#distributedocument) |
| Reached from | [`distributeDocument`](reference.md#distributedocument) — the `DistributeDocument` call site that always sends `inFaxInfo: null` |
| Source | `Services/SAIF.Services.Web.Proxies/DocumentServiceProxy.cs:69-83` |

---

## BR-DOC-003 ApplicationName defaulting

| Field | Value |
| --- | --- |
| Statement | `DistributeDocument` and the preview/listing methods always send `inApplication = "xPression Design"`; `DistributeDocumentDocCenter` instead sends `docConfig.ApplicationName` unless that value is empty, in which case it also falls back to `"xPression Design"` |
| Trigger | Evaluated when constructing the request message for `previewDocument`, `distributeDocument`, `documentsForCategory`, or `categoriesForUser` |
| Enforcement | Wrapper — the `ApplicationName` constant and the conditional in `DistributeDocumentDocCenter` |
| Origin | wrapper |
| Outcome | Every call from this proxy identifies itself to the remote service as `"xPression Design"` unless the DocCenter distribution path supplies a non-empty application name of its own |
| Related operation | [`previewDocument`](reference.md#previewdocument), [`distributeDocument`](reference.md#distributedocument), [`documentsForCategory`](reference.md#documentsforcategory), [`categoriesForUser`](reference.md#categoriesforuser) |
| Reached from | [`previewDocument`](reference.md#previewdocument), [`distributeDocument`](reference.md#distributedocument), [`documentsForCategory`](reference.md#documentsforcategory), [`categoriesForUser`](reference.md#categoriesforuser) — every call site constructs its request through the `ApplicationName` constant or `DistributeDocumentDocCenter`'s conditional |
| Source | `Services/SAIF.Services.Web.Proxies/DocumentServiceProxy.cs:14,103` |

---

## Related documentation
- [Client index](index.md)
- [Overview](overview.md)
- [Architecture](architecture.md)
- [Contract](contract.md)
- [Operation map](operation-map.md)
- [Client reference](reference.md)
- [Consumption](consumption.md)
- [Dependencies](dependencies.md)
- [Tech debt](tech-debt.md)

## Sources
- `Services/SAIF.Services.Web.Proxies/DocumentServiceProxy.cs`
