Generate Letter from Document Record for a Specific Document Type

You're creating a document type that employees can use to create a document record for generating a letter to submit for their visa processing. You create the document type and additionally specify a BI publisher report path to generate the letter.

Create a document descriptive flexfield context that includes the fields required in the letter. You then associate this context with the document type you created.

You can generate a letter when you create a document record using any of these methods:
  • Document Records flow
  • HCM Data Loader (HDL)
  • HCM Spreadsheet Data Loader (HSDL)
  • REST API
  • Plugin sections in responsive Employment and Salary flows

Before You Start

  1. Use the seeded DocumentReport.xdm data model to create your own BI template for the letter that needs to be generated. Only one template can be used per document type. The draft and approved letters are based on this template.

  2. Create an RTF template and associate this template to the data model. Note down the report path and specify the path when you create the document type.

  3. Ensure users have access to the report, if necessary add or modify permissions.

Creating the Document Descriptive Flexfield for Visa Application Document Type

  1. In the Setup and Maintenance work area, go to the Document Records Descriptive Flexfields task.

  2. On the Document Records Descriptive Flexfields page, select PER_DOCUMENTS_OF_RECORD_DFF and click Edit.

  3. Click Manage Contexts.

  4. In the Create Context section, enter values as shown in the table. For others use the default values:

    Field

    Value

    Display Name

    Letter for Visa Application

    Description

    Letter for visa application

    Context Code

    Auto-populated but can be modified

    API Name

    Auto-populated but can be modified

    Enabled

    Checked

  5. Click Save.

  6. In the Context Sensitive Segment section, create the required segments and fields that you want to include in the visa application letter.

  7. Click on Save and Close till you return to the Document Records Descriptive Flexfields page.

  8. Click OK and then Done.

Deploying the Flexfield

  1. On the Document Descriptive Flexfield page, click Deploy Flexfield.
  2. In the Confirmation dialog box, click OK, and click Done.

    You must sign out and sign in to see the changes you deployed at run time. The context is available when workers select the visa application document type.

Configuring the Visa Application Document Type

  1. In the Setup and Maintenance work area, go to the Document Types task.
  2. On the Document Types page, click Create.
  3. In the Create Document Type page, enter values as shown in the table. For others use the default values:

    This two-column table with twelve data rows lists the fields and the corresponding values that you need to enter.

    Field Value
    Type Visa Application
    Description The passport details entered should be valid for a period of 6 months from the date of travel.
    Country All Countries
    Category Employment
    Subcategory Blank
    Status Active
    Expiration Notification Period Blank
    Approval Required Yes
    Allow Multiple Occurrences Yes
    Minimum Attachments 0
    Publish Required No
    Report Path /Custom/Human Capital Management/Document Records/VisaApplication.xdo
    Note: When you seed the data model and report, the following roles must be added to the report, data model, and the folders containing the data model and report along with roles and users:
    • Web Services Application Identity for HCM
    • Batch Loader Enterprise Scheduler Job Application Identity for HCM
  4. In the Attributes section, specify if each attribute is relevant or required.
  5. Click Submit.
    Note: When workers enter the document record details and click View Document, this is what happens, it will get the associated BIP template, merge the data entered by the worker and display the draft letter. After review, they can submit it for approval. After the request is approved, the final letter is generated. This final version in PDF format is stored in the worker's document records for this document type. After the letter is approved and generated, View Document won't be available in the Document Records page.
    Note:
    • Workers need to enter all mandatory values and the minimum number of attachments required, before clicking View Document. Otherwise, a validation error displays.
    • If the report path isn't specified, View Document won't be visible to workers.
    • Only PDF format is supported.
    • Even if approval isn't enabled for the document type, clicking View Document still displays the letter with a watermark. The letter is available without the watermark after the document record is added to the worker's record.
    • Even if the worker doesn't click View Document but submits the document record, it goes through approval (if approvals are enabled) and the final letter is generated.
    • After the letter is approved and generated, View Document won't be available in the Document Records page for this document record.

Generate Letter Based on Document Record Source

You can enable letter generation for the document record sources by configuring appropriate values in the Letter Generation Configuration Based on Document Record Source EFF context. To do this, follow these steps:
  1. Navigate to the Setup and Maintenance work area.
  2. Search for and click the Manage Enterprise HCM Information task.
  3. For the Letter Generation Configuration Based on Document Record Source EFF context, select the document record source.
    Note: Values in the Document Record Source column will be populated from the ORA_PER_DOR_SOURCE lookup. Only supported values are displayed in the list.
  4. In the Generate Letter column, select the Yes or No value.
  5. Click Done.
Note: If the report path is configured for the document type, then the letter is generated by default. Additionally, the letter is stored as an attachment in the person's document record. In case of the Document Record plugin section, the letter generation and storage happens when the parent transaction is approved and committed.
For more information on generating letters from document records, see the document Document Records - Generate Letter from Document Record for Specific Doc Type (https://community.oracle.com/customerconnect/discussion/630980) on Customer Connect.

For more information on OTBI reports, see the Oracle Human Capital Management Cloud Creating and Administering Analytics and Reports for HCM guide on the Oracle Help Center (https://docs.oracle.com/en/cloud/saas/index.html).