Introduction

This tutorial creates an Oracle Integration Cloud (OIC) integration to upload data to the Oracle HCM Cloud using HCM Data Loader (HDL). The source file is read from an FTP server, decrypted, unzipped, transformed into the HDL business object file shape, before being zipped, encrypted, and uploaded to the Oracle WebCenter. Finally, HCM Data Loader is initiated to import and load the data in the file.

The flow of actions to define the integration

The steps provided in this tutorial can be used for any inbound integration using HDL. Complete the steps using the supplied files to create a New Hire integration.

Objectives

In this tutorial, you'll learn how to:

  • Decrypt and unzip source files hosted on an FTP server.
  • Transform source data into an HDL business object file shape.
  • Compress, encrypt and upload the transformed file to the Oracle WebCenter.
  • Initiate HCM Data Loader.

Prerequisites

To complete the steps in this tutorial, you'll need access to the following:

  • Oracle Integration Cloud (OIC) to create this integration.
  • An FTP server for hosting source files.
  • PGP encryption key-pair for encrypting your source file.
  • Security Console to create user accounts.

You also need to complete these integration setup tasks:

  • Generate the fusion-key PGP certificate and download the public key.
  • Tip:

    HDL decrypts files using the private fusion-key. Task 5 in the Configure Access to HCM Data Loader (HDL) and Understand HDL Security Options tutorial explains how to generate the PGP certificate and download the public key used by your integration to encrypt your file.
  • Complete the steps in the Setup Tasks for HCM Data Loader (HDL) Integrations in Oracle Integration Cloud (OIC) tutorial which explains the common setup steps required for all OIC integrations using HCM Data Loader.
  • Note:

    The connections created in the setup tutorial are referenced by this tutorial.
  • Generate the OIC mapping file for the HDL file shape you want to generate.
  • Tip:

    The Generate the Oracle Integration Cloud (OIC) mapping files for HCM Data Loader (HDL) tutorial provides the steps to complete this.
    • You'll need to generate a custom mapping file for the HDL business object file shape you are creating with your integration (See Task 3: Generate Custom Mapping Files).
    • If you're completing the tutorial steps with the supplied resource files you can use this Worker.dat file to generate the custom mapping file.
    • If you need to include SET instructions in your generated file, you'll also need to edit the mapping file to enable the configuration of a SET instruction (Follow the Adding SET instructions to your file shape steps within Task 4).

Task 1: Create the Integration

In this step you'll create a schedule integration.

  1. Log into OIC and navigate to Design > Integrations.
  2. Click Create and select Schedule.
  3. The list of available integration types.

  4. Specify a Name and optionally a description.
  5. Specify a name and description for the integration

  6. Click Create. You'll be navigated to the integration canvas.


Task 2: Download and Decrypt the Source File

In this step you’ll invoke your FTP connection to read the source file and optionally decrypt it.

  1. Click the + icon after Schedule to open the Suggestions box. Under the Invokes tab select your FTP connection.
  2. Tip:

    The FTP connection definition includes the PGP private key used to decrypt your files.
    Select the FTP connection for your source file server

  3. Specify a name of DownloadFile and optionally a description. Click Create.
  4. Specify a name and description for the FTP invoke action

  5. Select the Download File operation and select the Transfer Mode.
  6. Specify the Input directory as the path on the FTP server where the source file will be found, along with the name of the source file.
  7. Specify a directory name where the file will be downloaded to, such as /newHires.

  8. If your file is encrypted, check the Perform PGP Decryption on an encrypted file downloaded from external FTP server checkbox.
  9. Tip:

    The action created by the following task unzips the decrypted file. If your file isn't encrypted, you can unzip the file whilst downloading it instead by checking Perform unzip on compressed file downloaded from external FTP server.

    Note:

    Checking both the unzip and decrypt options will unzip your file first and then decrypt the content. The steps in this tutorial assume you first need to decrypt and then unzip your source file.
  10. Click Continue and Finish.
  11. Tip:

    A Map action will be automatically generated before the DownloadFile action. You don't need to configure this.


Task 3: Unzip the Source File

In this task you'll unzip the file downloaded from the FTP server. If your file isn’t compressed, or you unzipped it during download, you can skip this step.

  1. On the right navigation pane, click Action. Select Stage File and drag it to the + icon after the Invoke DownloadFile action.
  2. Specify the name UnzipFile and optionally specify a description. Click Continue.
  3. Choose the Unzip File stage file operation.
  4. Click the Developer View icons to the right of the Zip File Name and Directory fields.
  5. Expand the $DownloadFile source hierarchy fully. Drag the filename source attribute to the Zip File Name field and the directory source attribute to the Zip File Directory field.
    mapping the source and target fields.

  6. Specify the directory your extracted file should be placed. For example, '/newhires' (with the quotes).
  7. Click Continue and Finish.


Task 4: Read the Source File

In this task you’ll read the entire file content ready to transform it into the HDL business object file shape.

  1. Create a Stage File action as the last action in your current integration definition. Specify a name of ReadFile and optionally a description. Click Continue.
  2. Choose the Read Entire File stage file operation.
  3. Click the Developer View icons to the right of the File Name and Directory fields.
  4. Expand the source hierarchy fully.
  5. Tip:

    If you created an UnzipFile action the source name will be $UnzipFile, if not, instead expand the $DownloadFile source.
  6. Drag the filename source attribute to the File Name field and the directory source attribute to the Directory field.
  7. mapping the source and target fields.

  8. Click Continue.
  9. Select the type of file that will describe your source file structure.

    If using the supplied resource files, select Sample delimited document (e.g. CSV). Click Continue.


  10. Drag and drop the file that includes an example of your source file structure.
  11. Tip:

    The NewHireSample.csv file if using the supplied resource files to follow these steps.

  • Specify a value for the Record Name, such a NewHire.
  • Specify a value for the Recordset Name, such a AllNewHires.

  • Review the information generated from the uploaded file definition. Make any necessary changes and click Continue and Finish.

  • Task 5: Write to File

    In this task you’ll create the HCM Data Loader file which needs to be named for the HDL business object you're updating.

    Assign Constant Values

    Creating variables for attribute values that are used multiple times within the file definition simplifies the mapping process. Instead of manually typing these repeatedly, the variable can be mapped and if needed changed once to update all mapped fields. Here you'll create constants for attributes such as ActionCode and SourceSystemOwner.

    1. Create an Assign action after the ReadFile action and name it AssignFileConstants.
    2. Create string-based variables for constant values you regularly refer to. For the New Hires integration define these:
    3. Name Description Value
      SourceSystemOwner The name of your Source System Owner. Your source system owner name. For example, 'VISION'
      EffectiveEndDate The effective end-date for new date-effective records. '4712/12/31'
      ActionCode The action code. 'HIRE'
      LegislationCode The legislation code. 'US'

    Write the HDL Business Object File

    1. Create a Stage File action after the AssignFileConstants action specifying a name of WriteFile and optionally a description. Click Continue.
    2. Choose the Write File stage file operation.
    3. Specify the name of the file to write the transformed data to. You should supply the name of the HDL business object file, such as 'Worker.dat'.
    4. Specify a temporary output directory for your file such as 'WorkerOutput'. Click Continue.

    5. Specify XML scheme (XSD) document to describe the structure of the file content. Click Continue.
    6. specify the type of file that defines the file structure.

    7. Drag and drop the file that includes an example of your source file structure.
    8. Tip:

      This is the nxsd mapping file you generated as part of the prerequisites to this tutorial.

    9. Set the Schema Element to the element defined at the top of your nxsd file. The name of this element normally ends 'FileData'. Click Continue.

    10. Click Finish.

      A WriteFile Map action will be automatically generated. You'll configure this in the next step.


    Task 6: Complete the WriteFile Mapping

    In this task you'll complete the mapping to transform the source data to the business object file shape. Worker.dat, in this example.

    The Worker business object hierarchy is particularly complex. The file you're generating with the New Hire example creates records for these components in the hierarchy:

    You need to define mappings for both the labels and values for each component.

    Note:

    The values supplied to the 'Label' elements are used to generate the METADATA lines, so the values supplied must be valid attribute names for the business object file you're creating.

    Tip:

    Once you've started creating mappings for the fields in a target element you need to define values for every field in that element, or OIC will fail to transform the data.

    Tip:

    There are many configurations to complete when mapping HDL files such as Worker. Regularly validate and your mappings and save your integration.

    Worker

    1. Edit the WriteFile Map action to open the mapper.
    2. The left-hand panel Sources, shows all the available values and fields that can used in this mapping. The Target panel on the right illustrates the Write hierarchy. This is a representation of the structure of the HDL business object file, in this example, Worker.dat. Its shape is determined by the nxsd mapping file you generated using HDL and uploaded to the WriteFile action.

    3. Click the Developer and XSLT buttons to display the technical names of the elements.
    4. In the Target panel, expand the WorkerFileData and WorkerLabel elements.
    5. Tip:

      You need to define the HDL business object attribute names applicable to each component using the 'Label' elements.
    6. Assign these expressions to these WorkerLabel target elements:
    7. Target WorkerLabel Attribute Expression
      SourceSystemOwnerLabel 'SourceSystemOwner'
      SourceSystemIdLabel 'SourceSystemId'
      PersonNumberLabel 'PersonNumber'
      EffectiveStartDateLabel 'EffectiveStartDate'
      EffectiveEndDateLabel 'EffectiveEndDate'
      StartDateLabel 'StartDate'
      ActionCodeLabel 'ActionCode'
      DateOfBirthLabel 'DateOfBirth'

      Tip:

      To create an expression for an element:
      • Right click on the target field and select Create target node.
      • In the Expression panel switch to Developer View.
      • Specify the Expression value, including the quotes.
      • Click the tick icon to save the expression.
    8. Expand the $ReadFile hierarchy.
    9. Map the NewHire repeating source element to the Worker repeating target element.

    10. Tip:

      When you complete the mapping a for-each loop will be generated with the repeating Worker element inside. This is only represented like this if you've clicked the XSLT button.

      The Worker target hierarchy is now linked with NewHire source hierarchy; and Worker is a child of the for-each loop. This means that for each NewHire record in the source file a target Worker record will be created.

    11. Create these mapping between your defined variables, the NewHire source and Worker target elements:
    12. Source NewHire Attribute Target WorkerLabel Attribute Expression
      (x) $SourceSystemOwner SourceSystemOwner
      employeeExternalNumber SourceSystemId
      employeeExternalNumber PersonNumber
      hireDate EffectiveStartDate
      (x) $EffectiveEndDate EffectiveEndDate
      hireDate StartDate
      (x) $ActionCode ActionCode
      dob DateOfBirth

    Tip:

    When there are multiple components to map, such as in the case of new hires, consider completing the remaining mapping after you've completed the integration definition to the point of writing the file to the Oracle WebCenter. You can then activate and test your file mapping iteratively, reviewing the generated file uploaded to the Oracle WebCenter before initiating HCM Data Loader to process the file.

    Person Legislative Data

    1. Expand the PersonLegislativeDataLabel target element.
    2. Assign these expressions to these PersonLegislativeDataLabel attributes:
    3. Target PersonLegislativeDataLabel Attribute Expression
      SourceSystemOwnerLabel 'SourceSystemOwner'
      SourceSystemIdLabel 'SourceSystemId'
      PersonId_SourceSystemId_Label 'PersonId(SourceSystemId)'
      EffectiveStartDateLabel 'EffectiveStartDate'
      EffectiveEndDateLabel 'EffectiveEndDate'
      LegislationCodeLabel 'LegislationCode'
      SexLabel 'Sex'

    4. Map the NewHire repeating source element in the $ReadFile hierarchy to the PersonLegislativeData repeating target element to generate a for-each loop.
    5. Create these mapping between your defined variables, the NewHire source and PersonLegislativeData target elements:
    6. Source NewHire Attribute Target PersonLegislativeData Attribute Expression
      (x) $SourceSystemOwner SourceSystemOwner
      employeeExternalNumber SourceSystemId concat('LD', {employeeExternalNumber} )
      employeeExternalNumber PersonId_SourceSystemId_
      hireDate EffectiveStartDate
      (x) $EffectiveEndDate EffectiveEndDate
      (x) $LegislationCode LegislationCode
      gender Sex

      Tip:

      The employeeExternalNumber source element is used as the SourceSystemId value to uniquely identify the Worker. The same field is used to generate the SourceSystemId on the other components. However, it's good practice to make the SourceSystemId unique across the components, it makes debugging easier. Once you've dragged the employeeExternalNumber source element to the SourceSystemId target element, alter the expression to prefix concat('LD', . Place a ) at the end of the expression. It should look something like this:


    Person Name

    1. Expand the PersonNameLabel target element.
    2. Assign these expressions to these PersonNameLabel attributes:
    3. Target PersonNameLabel Attribute Expression
      SourceSystemOwnerLabel 'SourceSystemOwner'
      SourceSystemIdLabel 'SourceSystemId'
      PersonId_SourceSystemId_Label 'PersonId(SourceSystemId)'
      EffectiveStartDateLabel 'EffectiveStartDate'
      EffectiveEndDateLabel 'EffectiveEndDate'
      LegislationCodeLabel 'LegislationCode'
      NameTypeLabel 'NameType'
      FirstNameLabel 'FirstName'
      MiddleNamesLabel 'MiddleNames'
      LastNameLabel 'LastName'
      TitleLabel 'Title'

    4. Map the NewHire repeating source element to the PersonName repeating target element to generate a for-each loop.
    5. Create these mapping between the NewHire source and PersonName target elements:
    6. Source NewHire Attribute Target WorkerLabel Attribute Expression
      (x) $SourceSystemOwner SourceSystemOwner
      employeeExternalNumber SourceSystemId concat('PN', {employeeExternalNumber} )
      employeeExternalNumber PersonId_SourceSystemId_
      hireDate EffectiveStartDate
      (x) $EffectiveEndDate EffectiveEndDate
      (x) $LegislationCode LegislationCode
      NameType 'GLOBAL'
      firstName FirstName
      MiddleNames ''
      lastName LastName
      title Title

      Tip:

      All target fields in an element must have a mapping. If there is no value to assign, such as MiddleNames in this example, create an expression with two quotes. i.e., ''.

    Person Email

    1. Expand the PersonEmailLabel target element.
    2. Assign these expressions to these PersonEmailLabel attributes:
    3. Target PersonEmailLabel Attribute Expression
      SourceSystemOwnerLabel 'SourceSystemOwner'
      SourceSystemIdLabel 'SourceSystemId'
      PersonId_SourceSystemId_Label 'PersonId(SourceSystemId)'
      DateFromLabel 'DateFrom'
      EmailTypeLabel 'EmailType'
      EmailAddressLabel 'EmailAddress'

    4. Map the NewHire repeating source element to the PersonEmail repeating target element to generate a for-each loop.
    5. Create these mapping between the NewHire source and PersonEmail target elements:
    6. Source NewHire Attribute Target PersonEmail Attribute Expression
      (x) $SourceSystemOwner SourceSystemOwner
      employeeExternalNumber SourceSystemId concat('EM', {employeeExternalNumber} )
      employeeExternalNumber PersonId_SourceSystemId_
      hireDate DateFrom
      EmailType 'W1'
      email EmailAddress

    Work Relationship

    1. Expand the WorkRelationshipLabel target element.
    2. Assign these expressions to these WorkRelationshipLabel attributes:
    3. Target WorkRelationshipLabel Attribute Expression
      SourceSystemOwnerLabel 'SourceSystemOwner'
      SourceSystemIdLabel 'SourceSystemId'
      PersonId_SourceSystemId_Label 'PersonId(SourceSystemId)'
      DateStartLabel 'DateStart'
      WorkerTypeLabel 'WorkerType'
      LegalEmployerNameLabel 'LegalEmployerName'
      ActionCodeLabel 'ActionCode'
      PrimaryFlagLabel 'PrimaryFlag'

    4. Map the NewHire repeating source element to the WorkRelationship repeating target element to generate a for-each loop.
    5. Create these mapping between the NewHire source and WorkRelationship target elements:
    6. Source NewHire Attribute Target WorkRelationship Attribute Expression
      (x) $SourceSystemOwner SourceSystemOwner
      employeeExternalNumber SourceSystemId concat('WR', {employeeExternalNumber} )
      employeeExternalNumber PersonId_SourceSystemId_
      hireDate DateStart
      WorkerType 'E'
      legalEmployerName LegalEmployerName
      (x) $ActionCode ActionCode
      PrimaryFlag 'Y'

    Employment Terms

    1. Expand the WorkTermsLabel target element.
    2. Assign these expressions to these WorkTermsLabel attributes:
    3. Target WorkTermsLabel Attribute Expression
      SourceSystemOwnerLabel 'SourceSystemOwner'
      SourceSystemIdLabel 'SourceSystemId'
      PeriodOfServiceId_SourceSystemId_Label 'PeriodOfServiceId(SourceSystemId)'
      EffectiveStartDateLabel 'EffectiveStartDate'
      EffectiveEndDateLabel 'EffectiveEndDate'
      EffectiveSequenceLabel 'EffectiveSequence'
      EffectiveLatestChangeLabel 'EffectiveLatestChange'
      ActionCodeLabel 'ActionCode'
      AssignmentNameLabel 'AssignmentName'
      AssignmentNumberLabel 'AssignmentNumber'
      PrimaryWorkTermsFlagLabel 'PrimaryWorkTermsFlag'

    4. Map the NewHire repeating source element to the WorkTerms repeating target element to generate a for-each loop.
    5. Create these mapping between the NewHire source and WorkTerms target elements:
    6. Source NewHire Attribute Target WorkTerms Attribute Expression
      (x) $SourceSystemOwner SourceSystemOwner
      employeeExternalNumber SourceSystemId concat('ET', {employeeExternalNumber} )
      employeeExternalNumber PeriodOfServiceId_SourceSystemId_ concat('WR',{employeeExternalNumber})
      hireDate EffectiveStartDate
      (x) $EffectiveEndDate EffectiveEndDate
      EffectiveSequence '1'
      EffectiveLatestChange 'Y'
      (x) $ActionCode ActionCode
      employeeExternalNumber AssignmentName concat('ET', {employeeExternalNumber} )
      employeeExternalNumber AssignmentNumber concat('ET', {employeeExternalNumber} )
      PrimaryWorkTermsFlag 'Y'

    Assignment

    1. Expand the AssignmentLabel target element.
    2. Assign these expressions to these AssignmentLabel attributes:
    3. Target AssignmentLabel Attribute Expression
      SourceSystemOwnerLabel 'SourceSystemOwner'
      SourceSystemIdLabel 'SourceSystemId'
      WorkTermsAssignmentId_SourceSystemId_Label 'WorkTermsAssignmentId(SourceSystemId)'
      EffectiveStartDateLabel 'EffectiveStartDate'
      EffectiveEndDateLabel 'EffectiveEndDate'
      EffectiveSequenceLabel 'EffectiveSequence'
      EffectiveLatestChangeLabel 'EffectiveLatestChange'
      ActionCodeLabel 'ActionCode'
      AssignmentNameLabel 'AssignmentName'
      AssignmentNumberLabel 'AssignmentNumber'
      PrimaryAssignmentFlagLabel 'PrimaryAssignmentFlag'
      BusinessUnitShortCodeLabel 'BusinessUnitShortCode'
      AssignmentStatusTypeCodeLabel 'AssignmentStatusTypeCode'
      PersonTypeCodeLabel 'PersonTypeCode'
      ProjectedStartDateLabel 'ProjectedStartDate'

    4. Map the NewHire repeating source element to the Assignment repeating target element to generate a for-each loop.
    5. Create these mapping between the NewHire source and Assignment target elements:
    6. Source NewHire Attribute Target Assignment Attribute Expression
      (x) $SourceSystemOwner SourceSystemOwner
      employeeExternalNumber SourceSystemId concat('E', {employeeExternalNumber} )
      employeeExternalNumber PersonId_SourceSystemId_ concat('ET', {employeeExternalNumber} )
      hireDate EffectiveStartDate
      (x) $EffectiveEndDate EffectiveEndDate
      EffectiveSequence '1'
      EffectiveLatestChange 'Y'
      (x) $ActionCode ActionCode
      employeeExternalNumber AssignmentName concat('E', {employeeExternalNumber} )
      employeeExternalNumber AssignmentNumber concat('E', {employeeExternalNumber} )
      PrimaryAssignmentFlag 'Y'
      businessUnit BusinessUnitShortCode
      AssignmentStatusTypeCode 'ACTIVE_PROCESS'
      PersonTypeCode 'Employee'
      hireDate ProjectedStartDate

    SET Instruction

    If you need to include a SET instruction in your file, follow these steps.

    1. Expand the SetInstructions target element.
    2. Create an expression to include the complete SET instruction for the Instruction attribute.



    Task 7: Zip the Generated File

    In this task you'll compress the file you've generated.

    1. Add a Stage File action directly below your WriteFile action and name it ZipFile.
    2. Choose the Zip File stage file operation.
    3. Specify a file name for the zip file, such as NewHires.zip.
    4. Click the Developer View icon for the directory field and select directory from the $WriteFile source hierarchy

    5. Specify 'outputdirectory' for the output directory.
    6. Click Continue and Finish.


    Task 8: Encrypt File

    It's good practice to encrypt all files being loaded to the Oracle WebCenter.

    In this task you'll create a switch that allows you to control when to encrypt the file. You may want to leave the file unencrypted during development, to test the integration definition and file transformation.

    Define Variables for HCM Data Loader Parameters

    1. From the right navigation panel click Actions and select Assign. Drag this to the + icon after the Schedule so it's the first action in your integration.
    2. Rename the action AssignHDLParameters.
    3. Create a variable named FileEncryption and assign a value of 'NONE'.
    4. Create a 2nd variable named DeleteSourceFile and assign a value of 'N'.

    5. Tip:

      Repeat for any other HDL parameters that you may want to change between development and production.

      Note:

      We're creating these variables now as the FileEncryption variable is referenced by the switch created in the next step.

    Create a Switch to Control File Encryption

    1. From the right navigation panel click Actions and select Switch under the Logic heading. Drag this to the + icon after the ZipFile action. The Configure route page will be displayed.
    2. Specify EncryptHDLFile as the route name.
    3. Click the Developer View button on the Value field to display the input sources.
    4. Drag the $FileEncryption variable to the Value field. Set the Operator to = and specify a value of 'PGPUNSIGNED'.

    Encrypt the File

    1. Click the + icon in the Switch box and select the Stage File action.
    2. Specify a name of EncryptFile and optionally a description. Click Continue.
    3. Choose the Encrypt File stage file operation.
    4. Click the Developer View icons to the right of the File Reference and File Name fields.
    5. Expand the $ZipFile source hierarchy fully.
    6. Drag the FileReference source element to the File Reference field.
    7. Drag the filename source element to the File Name field.
    8. Specify a directory name for the OutputDirectory, such as '/WorkerOutput'.
    9. Select the fusion-key PGP certificate to encrypt the file.

    10. Click Continue and Finish.

    Tip:

    You'll create the invoke action to upload the file to the Oracle WebCenter next. This will require two mappings to be created, one for each route in this switch.

    Task 9: Upload File to the Oracle WebCenter

    In this task you'll invoke the Oracle HCM Cloud connection to upload the file to the Oracle WebCenter.

    Create the Upload File Action

    1. Click the + icon after the Switch and search for 'web'. Select the Oracle WebCenter HDL Import connection.

    2. Specify a name of UploadFile and optionally a description. Click Continue.
    3. Select Send Files to HCM Cloud and click Continue.

    4. Select the FAFusionImportExport security group and the hcm$/dataloader$/import$ doc account.
    5. Click Continue and Finish.

      Tip:

      An UploadFile Map will be automatically generated before the Invoke action and after the Switch.

    Define the Upload File Map for Encrypted Files

    In this task you'll create the UploadFile map for the encrypted file route.

    1. If not already expanded, expand the Switch.
    2. Click on the Map UploadFile action and select Cut.

    3. Click the + icon directly after the EncryptFile action and click Paste.

    4. Edit the UploadFile Map.
    5. Click the Developer and XSLT buttons and fully expand the $EncryptFile source element hierarchy.
    6. Create these mappings between the ICSFile element of the $EncryptFile source and FileUpload target elements:
    7. Source $EncryptFile Element Target FileUpload Element Expression
      FileReference fileReference
      filename docTitle
      docType 'Document'


    8. Validate your map and return to the integration canvas.

    Define the Upload File Map for Unencrypted Files

    In this task you'll create the UploadFile map for the unencrypted file route.

    1. Create the Otherwise route by clicking the menu for the Switch and selecting Add > Otherwise.

    2. Click the + icon in the Otherwise route and select Map.

    3. Select UploadFile when asked which endpoint to map data to and click Create.

    4. Click the Developer and XSLT buttons and fully expand the $ZipFile source element hierarchy.
    5. Create these mappings between the ICSFile element of the $ZipFile source and FileUpload target elements:
    6. Source $ZipFile Element Target FileUpload Element Expression
      FileReference fileReference
      filename docTitle
      docType 'Document'

    7. Validate your map and return to the integration canvas.


    Task 10: Initiate HCM Data Loader

    In this step you'll invoke your HCM Data Loader REST connection to initiate Import and Load for the file uploaded to the Oracle WebCenter by your UploadFile action.

    1. Create an Invoke action directly after the UploadFile action.
    2. Select the Invoke action for your HDL REST connection.

    3. Specify a name and optionally a description.

    4. Specify the endpoint as /action/createFileDataSet and set the action to POST.

    5. Select these checkboxes:
      • Configure a request payload for this endpoint
      • Configure this endpoint to receive the response

    6. Click Continue.
    7. Complete these fields on the Configure Request page:
    8. Prompt Value
      Select the request payload format JSON Sample
      Drag and Drop Use the JSON createFileDataSet payload.txt file.
      What is the media-type of Request Body? Other Media Type
      Media type application/vnd.oracle.adf.action+json


    9. Click Continue
    10. Complete these fields on the Configure Response page:
    11. Prompt Value
      Select the response payload format JSON Sample
      Drag and Drop Use the JSON createFileDataSet response.txt.
      What is the media-type of Request Body? JSON

    12. Click Continue. Click Finish.
    13. The ImportAndLoad Map action will be automatically generated.


    Configure the ImportAndLoad Map

    In this step you'll configure the ImportAndLoad map to reference the file uploaded to the Oracle WebCenter and override HCM Data Loader parameters, where required.

    1. Edit the ImportAndLoad Map.
    2. Click the Developer and XSLT buttons.
    3. Expand the request-wrapper target element.
    4. Tip:

      These fields populate the createFileDataSets parameters.
    5. Fully expand the $UploadFile source element hierarchy.
    6. Map these fields:
    7. Source FileUploadResponse Attribute Target request-wrapper Attribute Expression
      dDocName contentId
      $FileEncryption fileEncryption
      $DeleteSourceFile deleteSourceFileFlag

      Tip:

      The default HDL behavior is to delete the source file from the Oracle WebCenter as soon as HDL has transferred the data into its staging tables. Consider setting deleteSourceFileFlag to 'N' until you've reviewed and validated the file.
    8. Validate your mapping and save your integration.


    Task 11: Tracking

    The last step in configuring any integration is setting the business identifier. This generates a unique value for monitoring and reporting.

    1. Click Business Identifiers on the right of the menu bar.
    2. Drag and drop the startTime source to the first business identifier field.

    3. Save your integration.


    Task 12: Activating and Running the Integration

    1. Encrypt and upload your source file to your FTP server in the folder specified in your DownloadFile action. For example, /inbound/nh if you created the New Hires integration.

      Tip:

      You can use the NewHires.csv for this purpose.
    2. Exit the integration if you're still in the integration canvas.
    3. Find your integration on the Design > Integrations page.
    4. Tip:

      It should have a status of Configured. If it's still Draft, then your integration has errors, and you need to edit your integration, review, and resolve those.
    5. Select your integration and a row-level menu appears. Click Activate.

    6. Specify the tracing level and click Activate.
    7. Refresh the integration information until the status is Active.
    8. Click the actions icon on the row menu and select Run.

    9. Click Run
    10. The activity stream will be displayed.

    11. Refresh occasionally until processing completes.

    Validating the File on the Oracle WebCenter

    During the execution of the integration, it's possible to validate the file shape by retrieving it from the Oracle WebCenter.

    1. Log into the Oracle Cloud.
    2. Navigate to Tools > File Import and Export.
    3. Set the Account to hcm/dataloader/import and click Search.
    4. Tip:

      The default HDL behavior is to delete the source file from the Oracle WebCenter as soon as HDL has transferred the data into its staging tables. This behavior is overridden by the deleteSourceFile variable you defined.

    Encrypting the HDL File

    Once your testing is complete remember to enable file encryption and to allow HDL to delete the source file from the Oracle WebCenter once read.

    1. Edit the AssignHDLParameters action.
    2. Update the FileEncryption value to 'PGPUNSIGNED'.
    3. Update the DeleteSourceFile value to 'Y'.


    Tutorials:

    More Learning Resources

    Explore other labs on docs.oracle.com/learn or access more free learning content on the Oracle Learning YouTube channel. Additionally, visit education.oracle.com/learning-explorer to become an Oracle Learning Explorer.

    For product documentation, visit Oracle Help Center.