Invoke HCM Data Loader using SOAP Service
Invoke HCM Data Loader using SOAP Service
- Invoke HCM Data Loader using SOAP Service
Total Visits: 34

In this article we will look into how to invoke the HCM Data Loader process using SOAP services and also check the status of the HDL process.

In one of the previous article we have looked into how to upload the file to UCM using SOAP service. We can use the same approach to upload the zip file to UCM and generate the Content ID.

WSDL for UCM upload:

https://abcd-test.oraclecloud.com:443/idcws/GenericSoapPort?WSDL
Uploading the HDL zip file to UCM

Once the input file is uploaded to UCM and content ID is generated, we are good to invoke the HDL Import and Load process using SOAP Service.

Invoking HCM Data Loader using SOAP Service:

WSDL for Invoking HCM Data Loader:

https://abcd-test.oraclecloud.com:443/hcmService/HCMDataLoader?WSDL

Method to be used for Invoking HDL process – HCMDataLoaderSoapHttp/importAndLoadData/Request 1

Sample Payload for Invoking HDL process:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://xmlns.oracle.com/apps/hcm/common/dataLoader/core/dataLoaderIntegrationService/types/">
   <soapenv:Header/>
   <soapenv:Body>
      <typ:importAndLoadData>
         <typ:ContentId>UCMFA01234567</typ:ContentId>
         <typ:Parameters>ImportMaximumErrors=100,LoadMaximumErrors=100,LoadConcurrentThreads=8,DeleteSourceFile=N</typ:Parameters>
      </typ:importAndLoadData>
   </soapenv:Body>
</soapenv:Envelope>

Once we submit this payload, we would get the Request ID of the process that got initiated.

Sample Repsonse:

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing">
   <env:Header>
      <wsa:Action>http://xmlns.oracle.com/apps/hcm/common/dataLoader/core/dataLoaderIntegrationService//HCMDataLoader/importAndLoadDataResponse</wsa:Action>
      <wsa:MessageID>urn:uuid:1197f1cd-3b70-4b6e-afc3-ae05388725eb</wsa:MessageID>
   </env:Header>
   <env:Body>
      <ns0:importAndLoadDataResponse xmlns:ns0="http://xmlns.oracle.com/apps/hcm/common/dataLoader/core/dataLoaderIntegrationService/types/">
         <result xmlns="http://xmlns.oracle.com/apps/hcm/common/dataLoader/core/dataLoaderIntegrationService/types/">1705582</result>
      </ns0:importAndLoadDataResponse>
   </env:Body>
</env:Envelope>

Get Status of HDL process using SOAP Service:

WSDL for Invoking HCM Data Loader:

https://abcd-test.oraclecloud.com:443/hcmService/HCMDataLoader?WSDL

Method to be used to get the HDL process status – HCMDataLoaderSoapHttp/GetDataSetStatus/Request 1

Sample Payload to get HCM Data Loader process status:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <ns1:getDataSetStatus xmlns:ns1="http://xmlns.oracle.com/apps/hcm/common/dataLoader/core/dataLoaderIntegrationService/types/">
             <ns1:Parameters>ContentId=UCMFA01234567</ns1:Parameters>
        </ns1:getDataSetStatus>
	</soap:Body>
</soap:Envelope>

Once we submit this payload, we would get the current status of the process.

Sample Response:

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing">
   <env:Header>
      <wsa:Action>http://xmlns.oracle.com/apps/hcm/common/dataLoader/core/dataLoaderIntegrationService//HCMDataLoader/getDataSetStatusResponse</wsa:Action>
      <wsa:MessageID>urn:uuid:1197f1cd-3b70-4b6e-afc3-ae05388725eb</wsa:MessageID>
   </env:Header>
   <env:Body>
      <ns0:getDataSetStatusResponse xmlns:ns0="http://xmlns.oracle.com/apps/hcm/common/dataLoader/core/dataLoaderIntegrationService/types/">
         <result xmlns="http://xmlns.oracle.com/apps/hcm/common/dataLoader/core/dataLoaderIntegrationService/types/"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<DATA_SET_STATUS>
  <RESULT_COUNT>1</RESULT_COUNT>
  <DATA_SET>
    <DATA_SET_NAME>Job Load</DATA_SET_NAME>
    <CONTENT_ID>UCMFA01234567</CONTENT_ID>
    <CREATION_DATE>2020/05/26 13:33:48</CREATION_DATE>
    <STATUS>COMPLETED</STATUS>
    <PROCESS>
      <PROCESS_ID>1705582</PROCESS_ID>
      <SUBMISSION_DATE>2020/05/26 13:33:36</SUBMISSION_DATE>
    </PROCESS>
    <IMPORT>
      <STATUS>SUCCESS</STATUS>
      <PERCENTAGE_COMPLETE>100</PERCENTAGE_COMPLETE>
      <DATA_LINE_COUNTS>
        <TOTAL>2</TOTAL>
        <SUCCESS>2</SUCCESS>
        <FAILED>0</FAILED>
        <UNPROCESSED>0</UNPROCESSED>
      </DATA_LINE_COUNTS>
    </IMPORT>
    <LOAD>
      <STATUS>ERROR</STATUS>
      <PERCENTAGE_COMPLETE>100</PERCENTAGE_COMPLETE>
      <OBJECT_COUNT>
        <TOTAL>2</TOTAL>
        <SUCCESS>1</SUCCESS>
        <FAILED>1</FAILED>
        <UNPROCESSED>0</UNPROCESSED>
      </OBJECT_COUNT>
    </LOAD>
  </DATA_SET>
</DATA_SET_STATUS>]]></result>
      </ns0:getDataSetStatusResponse>
   </env:Body>
</env:Envelope>

Tip: If you want to automate these steps of uploading file to UCM, Invoking HDL process and getting status of it, then you will have to use a middleware like OIC, Dell Bhoomi and create an automated flow.