ASSOCIATION_TYPE_CODE.SOURCE_PROCEDURE_NAME¶
Overview¶
| Field | Value |
|---|---|
| Schema | n/a (name supplied by data) |
| Type | Runtime-resolved procedure name |
| Status | ⚠️ unresolvable-dynamic-name — no static procedure name exists to retrieve |
| Query executed | none possible — no static name to query |
| Calling libraries | SAIF.Business.View.Policy |
| Calling classes | clsAssociationTypeCode (SAIF.Business.View.Policy/Associations/clsAssociationTypeCode.vb) |
[!IMPORTANT] This entry is not a missing procedure, not a broken reference, and not dead code. It is a deliberate runtime-dynamic dispatch pattern: the name of the stored procedure to execute is a data value held in a reference-data table (
ASSOCIATION_TYPE_CODE.SOURCE_PROCEDURE_NAME), not a literal in source. Static retrieval is therefore impossible by construction — there is no fixed name to hand to the Legends CLI.clsAssociationTypeCodehas live callers throughGetPolicyHeaderAssociationsandGetGroupedPolicyHeaderAssociationsand must not be described as orphaned or dead code.
Purpose¶
GetNonTypedAssociations executes whatever stored procedure name is supplied at runtime by the
ASSOCIATION_TYPE_CODE.SOURCE_PROCEDURE_NAME reference-data column, to retrieve policy association
rows for a policy. The concrete set of dispatched procedure names is data-defined per environment and is
not enumerable from static source.
Resolution Chain¶
All steps below are verified in SAIF.Business.View.Policy/Associations/clsAssociationTypeCode.vb:
- Reference data is read.
clsAssociationTypeCode.Criteria.Retrieve_SQL(lines 496-505) selectsASSOCIATION_TYPE_CODE.SOURCE_PROCEDURE_NAME as SourceProcedureNamefrom theASSOCIATION_TYPE_CODEreference-data table. - The value is materialised onto the object.
Fill()(lines 441-450) assignsm_SourceProcedureName = Row.GetString("SourceProcedureName")(line 444). - It is published on the contract.
Public ReadOnly Property SourceProcedureName ... Implements IPolicyAssociationType.SourceStoredProcedureName(lines 131-136). - Single-type path.
GetPolicyHeaderAssociations(lines 232-233) passesSourceProcedureNamestraight intoGetNonTypedAssociations. - Grouped path.
GetGroupedPolicyHeaderAssociations(lines 320-322) derives the name viainAssociationCategoryGrouping.Select(Function(acg) acg.SourceStoredProcedureName).Distinct.Single, enforcing that every association type in a category shares exactly one procedure name (see rule PR-BVP-064 in Business Rules below). - Execution.
GetNonTypedAssociations(lines 344-360) setsDataRequest.CommandType = CommandType.StoredProcedureandDataRequest.SQLStatement = inSourceProcedureName(line 354), then bindsAddParm("inPolicyNumber", inPolicyNumber)(line 357) andAddCursorParm("recordset")(line 358).
Procedures / Methods¶
Dispatched procedure (name resolved at runtime)¶
| Field | Value |
|---|---|
| Signature | Uniform contract for every dispatched procedure: (inPolicyNumber IN NUMBER, recordset OUT REF CURSOR) — enforced structurally by step 6 above, which binds exactly those two parameters for every dispatched name |
| Called by | clsAssociationTypeCode.GetNonTypedAssociations (clsAssociationTypeCode.vb:344-360) via GetPolicyHeaderAssociations / GetGroupedPolicyHeaderAssociations |
Parameters¶
| Parameter | Direction | Type | Default | Description |
|---|---|---|---|---|
inPolicyNumber |
IN | numeric | — | Uniform contract for every dispatched procedure (clsAssociationTypeCode.vb:357) |
recordset |
OUT | REF CURSOR | — | Uniform contract (clsAssociationTypeCode.vb:358) |
Target tables: unknown — vary per dispatched procedure. The concrete set of procedure names is the
distinct set of SOURCE_PROCEDURE_NAME values present in ASSOCIATION_TYPE_CODE in each environment;
enumerating it requires querying production/environment reference data, which is outside the scope of
static source retrieval. No target table list is recorded here because it is data-defined, not static.
Business Rules¶
Rules extracted from this dispatch pattern's logic:
| Rule ID | Rule | Condition | Action |
|---|---|---|---|
| PR-BVP-064 | All association types grouped into one category must resolve to a single source procedure | GetGroupedPolicyHeaderAssociations |
...Select(Function(acg) acg.SourceStoredProcedureName).Distinct.Single — more than one distinct name throws (clsAssociationTypeCode.vb:320-322) |
This rule is documented in business-rules.md.
Operations¶
Operations and processes implemented via this dispatch pattern:
| Operation | Description | Trigger |
|---|---|---|
| Retrieve policy associations (dynamic) | Executes the reference-data-supplied procedure to return association rows for a policy | clsAssociationTypeCode.GetNonTypedAssociations (clsAssociationTypeCode.vb:344-360) via GetPolicyHeaderAssociations / GetGroupedPolicyHeaderAssociations |
This operation is also listed in operations-processes.md with source reference back to this document.
Recommended Follow-Up (optional, not a defect)¶
If a definitive target list is wanted, run SELECT DISTINCT SOURCE_PROCEDURE_NAME FROM
ASSOCIATION_TYPE_CODE against the target environment and retrieve each resulting name individually.
Source Code¶
Invocation contract (VB.NET, calling side)
Related Documentation¶
Sources¶
SAIF.Business.View.Policy/Associations/clsAssociationTypeCode.vb— lines 131-136, 232-233, 320-322, 344-360 (esp. 354, 357-358), 441-450 (esp. 444), 496-505