GenerateDocument
The GenerateDocument business rule describes the document that needs creation upon execution of a transaction. Multiple output file formats are supported and can be created with a single rule. This is an attached rule that should not be listed in TransactionBusinessRulePacket.
Note: Crystal Reports integration this is no longer part this base functionality and as a result any integration will require help of a partner, or Oracle Consulting.
Element/Tag | Definition | Attribute | Element/Attribute Values |
---|---|---|---|
<GenerateDocument> |
The opening and closing elements of the business rule. |
||
<DocumentName> |
Required: Identifies the document template’s file name. |
A literal value. |
|
<GeneratorType> |
Required: Identifies the document engine used to generate the specific document. |
A literal value naming the document engine. |
|
<FileFormats> |
Required: The opening and closing elements defining a section listing the available output file formats. |
||
<FileFormat> |
Required, Repeatable: Identifies an output file format. |
Acrobat – a PDF format. Word. |
|
<Query> |
Optional: Provides the template with the variable data it is defined to accept in order to complete the document generation. |
A valid SQL statement that returns the data needed by the specific document template. |
XML Sample
<GenerateDocument>
<DocumentName>5E1A5ABE-4946-7BFB-237B-D80F5A2707E3-DeathBenefitLetter.rpt</DocumentName>
<GeneratorType>Crystal</GeneratorType>
<FileFormats>
<FileFormat>Acrobat</FileFormat>
<FileFormat>Word</FileFormat>
<FileFormat>Csv</FileFormat>
</FileFormats>
<Query>SELECT TOP 1 C.CompanyName, B.ClientName Annuitant, A.Name BeneficiaryName, A.AddressLine1, A.AddressLine2, A.City, A.State, A.ZipCode,[PolicyValue] CommutedValue , [TotalDeathBenefit] DeathBenefit FROM (SELECT COALESCE(AsClient.FirstName,'') + ' ' +COALESCE(AsClient.LastName,'') Name, AsAddress.AddressLine1 AddressLine1, AsAddress.AddressLine2 AddressLine2, AsAddress.City , AsCodeState.ShortDescription State, AsAddress.PostalID ZipCode, AsClient.DateOfDeath DateOfDeath, AsRole.RoleCode , AsAddressRole.AddressRoleCode AddressRoleCode, AsAddress.EffectiveDate FROM AsPolicy JOIN AsRole ON AsPolicy.PolicyGUID = AsRole.PolicyGUID JOIN AsClient ON AsClient.ClientGUID = AsRole.ClientGUID JOIN AsAddressRole ON AsClient.ClientGUID = AsAddressRole.ClientGUID JOIN AsAddress ON AsAddress.AddressGUID = AsAddressRole.AddressGUID JOIN AsCode AsCodeState ON (AsAddress.StateCode = AsCodeState.CodeValue AND AsCodeState.CodeName = 'AsCodeState') WHERE AsRole.RoleCode = '23' AND AsPolicy.PolicyGUID = '[Policy:PolicyGUID]' AND AsClient.DateOfDeath IS NULL UNION ALL SELECT COALESCE(AsClient.FirstName,'') + ' ' +COALESCE(AsClient.LastName,'') Name, AsAddress.AddressLine1 AddressLine1,AsAddress.AddressLine2 AddressLine2,AsAddress.City City, AsCodeState.ShortDescription State, AsAddress.PostalID ZipCode, AsClient.DateOfDeath DateOfDeath, AsRole.RoleCode RoleCode, AsAddressRole.AddressRoleCode AddressRoleCode, AsAddress.EffectiveDate EffectiveDate FROM AsPolicy JOIN AsRole ON AsPolicy.PolicyGUID = AsRole.PolicyGUID JOIN AsClient ON AsClient.ClientGUID = AsRole.ClientGUID JOIN AsAddressRole ON AsClient.ClientGUID = AsAddressRole.ClientGUID JOIN AsAddress ON AsAddress.AddressGUID = AsAddressRole.AddressGUID JOIN AsCode AsCodeState ON (AsAddress.StateCode = AsCodeState.CodeValue AND AsCodeState.CodeName = 'AsCodeState') WHERE AsRole.RoleCode = '24' AND AsPolicy.PolicyGUID = '[Policy:PolicyGUID]' AND AsClient.DateOfDeath IS NULL UNION ALL SELECT COALESCE(AsClient.FirstName,'') + ' ' +COALESCE(AsClient.LastName,'') Name, AsAddress.AddressLine1 AddressLine1, AsAddress.AddressLine2 AddressLine2, AsAddress.City City, AsCodeState.ShortDescription State, AsAddress.PostalID ZipCode, AsClient.DateOfDeath DateOfDeath, AsRole.RoleCode RoleCode, AsAddressRole.AddressRoleCode AddressRoleCode, AsAddress.EffectiveDate EffectiveDate FROM AsPolicy JOIN AsRole ON AsPolicy.PolicyGUID = AsRole.PolicyGUID JOIN AsClient ON AsClient.ClientGUID = AsRole.ClientGUID JOIN AsAddressRole ON AsClient.ClientGUID = AsAddressRole.ClientGUID JOIN AsAddress ON AsAddress.AddressGUID = AsAddressRole.AddressGUID JOIN AsCode AsCodeState ON (AsAddress.STATECODE = AsCodeState.CodeValue AND AsCodeState.CodeName = 'AsCodeState') WHERE AsRole.RoleCode = '67' AND AsPolicy.PolicyGUID = '[Policy:PolicyGUID]' AND AsClient.DateOfDeath IS NULL ) AS A, ( SELECT COALESCE(AsClient.FirstName,'') + ' ' +COALESCE(AsClient.LastName,'') ClientName FROM AsRole JOIN AsClient ON AsRole.ClientGUID = AsClient.ClientGUID AND AsRole.PolicyGUID = '[Policy:PolicyGUID]' AND AsRole.RoleCode = '27' ) AS B, (SELECT CompanyName FROM AsCompany JOIN AsPlan ON AsPlan.CompanyGUID = AsCompany.CompanyGUID JOIN AsPolicy ON AsPolicy.PlanGUID = AsPlan.PlanGUID WHERE AsPolicy.PolicyGUID = '[Policy:PolicyGUID]') C ORDER BY A.RoleCode Asc, A.EffectiveDate Desc</Query>
</GenerateDocument>
XML Schema
<GenerateDocument>
<DocumentName>[template's file name]</DocumentName>
<GeneratorType>[document engine name]</GeneratorType>
<FileFormats>
<FileFormat>Acrobat|Word</FileFormat>
<FileFormat>. . .</FileFormat>
. . .
</FileFormats>
<Query>[SQL statement]</Query>
</GenerateDocument>