Import Candidate Data into Oracle Taleo Enterprise Edition

This section provides an overview of importing candidate data from another application into Oracle Taleo Enterprise Edition.

The following steps are performed as part of a typical integration flow that imports information from another application into Oracle Taleo Enterprise Edition.

Step Description

1

Configure the other application to write data you want to import into Oracle Taleo Enterprise Edition to an FTP server accessible to Oracle Integration. You may need to use an integration flow (using the FTP adapter and a specific application adapter) to accomplish this.

2

Create a connection using the FTP adapter.

3

Complete the prerequisites for creating a connection using the Oracle Taleo Enterprise Edition Adapter.

4

Create a connection using the Oracle Taleo Enterprise Edition Adapter.

5

Complete the prerequisites for adding the Oracle Taleo Enterprise Edition Adapter connection to an integration.

6

Create an integration using the submit document pattern or the import attachments pattern to import candidate data or add attachments to imported candidate records.

7

Create an integration using the get document status pattern to get the status of candidate or attachment import.

Note that you can combine multiple patterns in a single integration, but it might make sense to keep the get document status pattern in its own integration so that you can reuse it for all situations in which you import information into Oracle Taleo Enterprise Edition.

About the Submit Document Pattern

The submit document pattern imports candidate data (without attachments) exported from another application from an FTP server into Oracle Taleo Enterprise Edition.

This pattern translates exported CSV or XML data from an FTP server, in batches of 200, and sends these records to Oracle Taleo Enterprise Edition. For each batch of 200, the parent flow writes the messageKey received in response to a stage directory.

When all records have been sent to Oracle Taleo Enterprise Edition, the messageKeys received for each batch of 200 records are written to a file on an FTP server. The get document status pattern reads this file and uses the messageKeys to process the candidate import results.

Note:

Instead of writing the messageKeys to a file on an FTP server, you can instead pass them directly to the child flow using the REST adapter. This works best for smaller loads, like when you want to import candidates daily.

For bulk loads (of 5000 records or more), it is strongly recommended to write the messageKeys to a file on the FTP server and have the child flow read them from this file. Using FTP and a schedule integration for the child flow can reduce the polling time during bulk loads and avoid unnecessary processing time and timeouts.



Implement the Submit Document Pattern

You can implement the submit document pattern as its own integration flow or as a part of a larger flow that contains the get document status pattern and other patterns your use case requires.

  1. Create a schedule integration.
  2. Use the FTP Adapter to list the files containing candidate data exported from another application.
  3. Add a For Each action to process each file containing candidate data.
  4. Inside of the For Each action, use the FTP Adapter to download a file containing exported candidate data.
  5. Inside of the For Each action, add a Stage File action to read candidate data from the file in chunks of 200 records.
    1. On the Configure Operations page, choose to read the file in segments. Use the Expression Builder to specify the file name. To find the correct element to use in the expression, expand the $FtpDownloadFile, DownloadFiletoICSResponse, DownloadResponse, ICSFiles, ICSFile, and the Properties elements, and then select the filename element. In the Specify the Directory to read from field, enter the same value you entered for Download Directory when you configured the FTP Adapter to download a file containing exported candidate data, and then select the Process Sequentially option.
    2. On the Schema Options page, select an appropriate value from the Which one of the following choices would be used to describe the structure of the file contents? list. On the Format Definition page, upload a schema or a sample file of the type you chose on the previous screen, and then enter additional details about the data, if you chose the CSV option.
  6. Inside of the area for the Stage File action, use the Oracle Taleo Enterprise Edition Adapter to import candidates read from a segment of the exported candidate data files:
    1. On the Operations page, select the Submit Document option.
    2. On the Request Configuration page, upload the wrapsoap XML file you generated with Taleo Connect Client for your use case.
    3. Configure the mapping for the Oracle Taleo Enterprise Edition Adapter. In the Target panel, expand the Document, Attributes, and Attribute elements. Assign the value of the Attribute element to the value of the version attribute from the wrapsoap XML file, like http://www.taleo.com/ws/tee800/2009/01. Assign the value of the name attribute of this element to version.

      attribute of http://www.taleo.com/ws/tee800/2009/01 is highlighted
    4. In the Target panel, expand the Content and ImportEntities elements, and then click the repeating element that appears, like the Candidate-merge element in the example below. Expand the Mapping Components panel and the XSL Elements folder, and then drag a for-each element to the Statement panel. Expand the Source panel and the ReadResponse element, and then drag the corresponding repeated element (like candidate) to the select attribute in the Statement panel.
  7. Inside of the area for the Stage File action, add another Stage File action to write the messageKey received from sending a segment of the candidate data to Oracle Taleo Enterprise Edition.
    1. On the Configure Operations page, choose to write to a file, and then give the file a name. Specify an output directory to write the file to, and then select the Append to Existing File option.
    2. On the Schema Options page, select an appropriate value from the Which one of the following choices would be used to describe the structure of the file contents? list. On the Format Definition page, upload a schema or a sample file of the type you chose on the previous screen, and then enter additional details about the data, if you chose the CSV option.
    3. Configure the mapping for the Stage File action. In the Source panel, expand the IntegrationMessage element, and then drag the MessageKey element to the appropriate element in the Target panel.
  8. Add a Stage File action outside of the For Each action area. Select the List Files operation. List the files from the output directory and indicate the same file name you chose in the previous Stage File action.
  9. Right before the Stop action, use the FTP Adapter to write the file containing the messageKeys from stage to an FTP server. From there, the child process can read the messageKeys and poll for status of the import job.
    On the Operations page of the FTP Adapter Endpoint Configuration Wizard, select the Write File operation. Specify a location to write the file on the FTP server, and then provide a pattern for the file name. Select the Append to Existing File option. On the Schema and File Contents - Definition pages of the wizard, use the same information you provided for the Stage File action where the messageKeys were written to a file.
  10. Configure the mapping for the FTP Adapter. In the Source panel, expand the ListFilesResponse, FileList, and ICSFile elements. Drag the FileReference element to the FileReference element in the Target panel.
  11. Save the integration.
Next, use the get document status pattern to process the messageKeys written to an FTP server.

About the Get Document Status Pattern

The get document status pattern processes all messageKeys the parent flow received when sending records to Oracle Taleo Enterprise Edition. The child flow can be triggered on a schedule or from a REST call.

For each messageKey the child flow reads, it checks the state of the import and tries to receive a correlationKey. If the import is not in the required state (5—Completed), or if the correlationKey is not received, the child flow waits for several seconds before trying again. When the import is in the required state and when the correlationKey is received, the flow uses the correlationKey to poll Oracle Taleo Enterprise Edition for the results of the import. The flow writes the results to a stage directory.

When the flow has processed all messageKeys, it writes the status of all records to a file on an FTP server.


Description of import-success.png follows
Description of the illustration import-success.png


Implement the Get Document Status Pattern

You can implement the get document status pattern as its own integration flow or as a part of a larger flow that contains the submit document pattern and other patterns your use case requires.
If implemented as its own flow, the get document status pattern can be reused for all use cases requiring the Oracle Taleo Enterprise Edition Adapter.

The steps below describe how you can implement the get document status pattern as its own scheduled integration, reading the messageKeys the submit document pattern received from an FTP server instead of from a REST invocation.

  1. Create a scheduled integration flow.
  2. Use the FTP Adapter to download the file containing the messageKeys the submit document pattern received.

    No mapping is required for this FTP Adapter instance.

  3. Add a Stage File action to read the messageKeys from the downloaded file.
    1. On the Configure Operations page, choose to read the entire file. Use the Expression Builder to specify the file name. To find the correct element to use in the expression, expand the $FtpDownloadFile, DownloadFiletoICSResponse, DownloadResponse, ICSFiles, ICSFile, and the Properties elements, and then select the filename element. In the Specify the Directory to read from field, enter the same value you entered for Download Directory when you configured the FTP Adapter to download a file containing the messageKeys.
    2. On the Schema Options page, select an appropriate value from the Which one of the following choices would be used to describe the structure of the file contents? list. On the Format Definition page, upload a schema or a sample file of the type you chose on the previous screen, and then enter additional details about the data, if you chose the CSV option.
  4. Add a For Each action to process each messageKey.
  5. Inside of the For Each action, add a Log action to write message key values to the Activity Stream. Select the When trace is enabled option, and then use the Expression Builder to construct the message. Use the concat function, found in the String folder in the Components panel, to construct a log message from the messageKey.
  6. Inside of the For Each action, use the Assign action to define string variables for the import job status and the correlationKey returned when an import job completes. Name the variables Assign1_status and Assign1_CorrelationKey. Assign them both values of 0. They’ll be updated later.
  7. Inside of the For Each action, add a While action to poll Oracle Taleo Enterprise Edition for the status of the import job until it is completed. Use the Expression Editor to define a condition statement of $Assign1_status != 5.0.
  8. Inside of the While loop, use the Oracle Taleo Enterprise Edition Adapter to get the status of the submit document operation. On the Operations page, select the Get Document Status option.
  9. Configure the mapping for the Oracle Taleo Enterprise Edition Adapter. In the Source panel, drag the element that contains the messageKey to the messageKey element in the Target panel.
  10. Inside of the While loop, use the Assign action to update the values of the variables you defined earlier.
    1. Use the Expression Editor to assign the value of the Assign1_status variable to the status sent by the Oracle Taleo Enterprise Edition Adapter.
    2. Use the Expression Editor to assign the value of the Assign1_CorrelationKey variable to the status sent by the Oracle Taleo Enterprise Edition Adapter.
  11. Inside of the While loop, add a Log action to write the current value of the Assign1_status variable to the Activity Stream. Select the When trace is enabled option, and then use the Expression Builder to construct the message by dragging the $Assign1_status variable to the Expression field.
  12. Immediately outside of the While loop (but still inside of the For Each action), use the Oracle Taleo Enterprise Edition Adapter to get the results of the submit document operation. On the Operations page, select the Get Document Results option.
  13. Configure the mapping for the Oracle Taleo Enterprise Edition Adapter. In the Source panel, drag the $Assign1_CorrelationKey element to the messageKey element in the Target panel.
  14. Inside of the For Each action, add a Stage File action to write the result document to a file. Specify a file name and an output directory (like /tmp/taleo/import/out/respDoc/). Indicate that you do want to specify a structure for the contents of the file, and then select the XML Schema (XSD) document option. Upload an XSD file containing the following schema:
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
            xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/opaque/"
            targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/opaque/"
            elementFormDefault="qualified"
            attributeFormDefault="unqualified"
            nxsd:version="OPAQUE"
            nxsd:stream="chars"
            nxsd:encoding="UTF-8">
            <xsd:element name="OpaqueElementBase64" type="xsd:base64Binary" />
    </xsd:schema>
  15. Configure the mapping for the Stage File action. In the Target panel, click the OpaqueElementBase64 element. Expand the Mapping Components panel, the Functions folder, and then the Advanced folder. Drag the encodeReferencetoBase64 function to the OpaqueElementBase64 element in the Statement panel. Expand the Source panel, and then expand the Document and Attachment elements. Drag the attachmentReference element to the reference node in the Statement panel.
  16. Inside of the For Each action, add a Stage File action to list the file that was just written that contains the results. Select the List Files option, and then specify the same file name and location as you did in the previous Stage File action where you wrote the file.
  17. Inside of the For Each action, Use the FTP Adapter to write the results file to an FTP server. Chose to write the file, use the ASCII Transfer Mode, don’t select the Append to existing file option, and specify an output directory on the FTP server to which to write the file. Finally, specify a File Name Pattern that you can use to distinguish one response file from another. For example, ImportResult_Cand_MRG_%yyMMddHHmmss.xml.
  18. Configure the mapping for the FTP Adapter. In the Source panel, expand the ListFilesResponse, FileList, and ICSFile elements. Drag the FileReference element to the FileReference element in the Target panel.
  19. Save the integration.

About the Import Attachments Pattern

The import attachments pattern reads attachments from an FTP server and adds them to corresponding candidate records that have already been imported into Oracle Taleo Enterprise Edition.

This pattern reads a zip file from an FTP server. This zip file must contain the attachments to import and a CSV file that contains numbers identifying the record that each file should be attached to, what to name the file when it is imported into Oracle Taleo Enterprise Edition, a relative path (to the CSV file in the zip) to the file to import for the candidate record, and any comments you would like to add.


Description of attachments-csv.png follows
Description of the illustration attachments-csv.png

When you generate the import specification in Taleo Connect Client used to generate the wrapsoap XML file used with the Oracle Taleo Enterprise Edition Adapter for this pattern, you must specify an attachment field and select the Value is the location of a file to attach option for that field.


Description of tcc-attachment-field.png follows
Description of the illustration tcc-attachment-field.png

Later, in the Oracle Taleo Enterprise Edition Adapter Endpoint Configuration Wizard, select the same field on the Attachment Fields page.

When all records have been sent to Oracle Taleo Enterprise Edition, the messageKeys received for each attachment are written to a file on an FTP server. The get document status pattern reads this file and uses the messageKeys to process the results.

Implement the Import Attachments Pattern

You can implement the import attachments pattern as its own integration flow or as a part of a larger flow that contains the submit document pattern and other patterns your use case requires.

The steps below describe how you can implement the get import attachments pattern as its own schedule integration, reading the zip file containing the files to attach and the required CSV file from an FTP server.

  1. Create a schedule integration.
  2. Use the FTP Adapter to download the zip file containing the files to attach and the required CSV file.

    No mapping is required for this FTP Adapter instance.

  3. Add a For Each action to process each attachment.
  4. Inside of the For Each action, add a Switch action to process each attachment. Edit the Undefined branch:
    1. Click Expression Mode.
    2. In the Components panel, expand the Functions and String folders, and then drag ends-with to the Expression field.
    3. In the Source panel, expand the DownloadResponse, ICSFiles, ICSFile, and Properties elements. Drag the filename element to the Expression field.
    4. Replace string2 in the expression with '.csv'.
  5. In the IF Switch branch, add a Stage File action to read the attachment file:
    1. Select the Read Entire File option.
    2. Use the Expression Editor to specify the file name to read.
    3. Use the Expression Editor to specify the directory to read the file from.
    4. Indicate that you do want to specify the structure for the file, and then select CSV. Upload the CSV file included in the attachment import zip.
  6. In the IF Switch branch, use the Oracle Taleo Enterprise Edition Adapter to import the attachments:
    1. On the Operations page, select the Submit Document option.
    2. On the Request Configuration page, upload the wrapsoap XML file you generated with Taleo Connect Client for your use case. In the Include Attachments list, select Yes.
    3. Select the Attachment Fields you specified when you created the import configuration using Taleo Connect Client.
    4. Configure the mapping for the Oracle Taleo Enterprise Edition Adapter. In the Target panel, expand the Document, Attributes, and Attribute elements. Assign the value of the Attribute element to the value of the version attribute from the wrapsoap XML file, like http://www.taleo.com/ws/tee800/2009/01. Assign the value of the name attribute of this element to version.
    5. In the Source panel, expand the $currentFile, ICSFile, and the Properties elements. In the Target panel, expand the Document and the Attributes elements. From the Source panel, drag the directory element to the AttachmentsStagingDirectory in the Target panel.
    6. In the Target panel, expand the Content and ImportEntities elements, and then click the repeating element that appears, like the Candidate-attach-recruiter-file-to-profile element in the example below. Expand the Mapping Components panel and the XSL Elements folder, and then drag a for-each element to the Statement panel. Expand the Source panel and the ReadResponse element, and then drag the corresponding repeated element (like candidate) to the select attribute in the Statement panel.
    7. In the Source panel, map the children of the candidate element to their counterparts under the repeating element you just mapped in the Target panel. If it is present, give the searchType attribute of the Number element a value of search.
  7. In the IF Switch branch, add another Stage File action to write the messageKey received from sending an attachment to Oracle Taleo Enterprise Edition.
    1. On the Configure Operations page, choose to write to a file, and then give the file a name. Specify an output directory to write the file to, and then select the Append to Existing File option.
    2. On the Schema Options page, select an appropriate value from the Which one of the following choices would be used to describe the structure of the file contents? list. On the Format Definition page, upload a schema or a sample file of the type you chose on the previous screen, and then enter additional details about the data, if you chose the CSV option.
    3. Configure the mapping for the Stage File action. In the Source panel, expand the IntegrationMessage element, and then drag the MessageKey element to the appropriate element in the Target panel.
  8. Add a Stage File action outside of the For Each action area. Select the List Files operation. List the files from the output directory and indicate the same file name you chose in the previous Stage File action.
  9. Right before the Stop action, use the FTP Adapter to write the file containing the messageKeys from stage to an FTP server. From there, the child process can read the messageKeys and poll for status of the import job.
    On the Operations page of the FTP Adapter Endpoint Configuration Wizard, select the Write File operation. Specify a location to write the file on the FTP server, and then provide a pattern for the file name. Select the Append to Existing File option. On the Schema and File Contents - Definition pages of the wizard, use the same information you provided for the Stage File action where the messageKeys were written to a file.
  10. Configure the mapping for the FTP Adapter. In the Source panel, expand the ListFilesResponse, FileList, and ICSFile elements. Drag the FileReference element to the FileReference element in the Target panel.
  11. Save the integration.
Next, use the get document status pattern to process the messageKeys written to an FTP server.