Introduction 1
Security 2
Security 7
HCM Extracts 20
For more general guidelines on the use of HCM Data Loader, see the Users Guide (MOS Doc ID:
1664133.1)
Files to be loaded with HCM Data Loader must first be uploaded to the Oracle WebCenter Content
server. This document covers three topics:
This document reviews methods of staging a file for HCM Data Loader on the WebCenter Content server. Once a
file is staged, it can be processed by invoking an externally available web service, details of which are also provided
in this document.
Security
In order to upload files to the WebCenter Content server, your user must have the following duty role:
http://www.oracle.com/technetwork/middleware/webcenter/content/downloads/wcc-11g-downloads-2734036.html
Open the Individual Components Download section on the Downloads tab, accept the license agreement, and
download the WebCenter Content Document Transfer Utility. Once the component zip file is downloaded, extract the
JAR file. The zip file also contains a useful readme file describing the example invocation command shown in
Figure 1. Example Invocation Command for the WebCenter Content Document Transfer UtilityFigure 1.
Figure 1. Example Invocation Command for the WebCenter Content Document Transfer Utility
Sample Output
Obtain the URL for Setup and Maintenance from the Service Details section in the cloud environments provisioning
e-mail that your service administrator received.
https://fs-xxxxxxxxxxx.oracleoutsourcing.com/setup/faces/TaskListManagerTop
https://fs-xxxxxxxxxxx.oracleoutsourcing.com/cs/idcplg
This method of defining the WebCenter Content URL applies to all examples given in this document.
Review the readme file downloaded with the WebCenter Content Document Transfer Utility for a list of all
parameters, including advanced networking options for resolving proxy issues.
Intradoc
HTTP
RIDC communicates with the web server for Oracle Content Server using the Apache HttpClient package. Unlike
Intradoc, this protocol requires authentication credentials for each request.
JAX-WS
The JAX-WS protocol is supported only in Oracle WebCenter Content 11g with Oracle Content Server running in
Oracle WebLogic Server. To provide JAX-WS support, several additional JAR files are required.
Oracle WebCenter Content Developer's Guide for Content Server (specifically the section Using RIDC to
Access Content Server)
Oracle Fusion Middleware Developer's Guide for Remote Intradoc Client (RIDC)
Once the RIDC Component Library download file has been unzipped, include the following JAR files in your project.
Figure 2 shows an example from Oracle JDeveloper.
dDocName The Content ID for the content item Value passed to HcmDataLoader
dDocTitle The content item title. The title of the file as it appears in Import/Export
UI
dDocAccount The account for the content item. Required only if accounts are hcm$/dataloader$/import$
enabled.
primaryFile The absolute path to the location of the file as seen from the
server.
Example Code
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.IOException;
import oracle.stellent.ridc.IdcClient;
import oracle.stellent.ridc.IdcClientException;
import oracle.stellent.ridc.IdcClientManager;
import oracle.stellent.ridc.IdcContext;
import oracle.stellent.ridc.model.DataBinder;
import oracle.stellent.ridc.model.TransferFile;
import oracle.stellent.ridc.protocol.ServiceResponse;
checkin(idcClient,
userContext,
"/scratch/jdoe/ridc/BusinessUnit1.zip",
// Replace with fully qualified path to source file
"Document", // content type
"BusinessUnit1", // doc title
userContext.getUser(), // author
"FAFusionImportExport", // security group
"hcm$/dataloader$/import$", // account
"BU5") // dDocName - this is the ContentId
;
/**
* Method description
* @param idcClient
* @param userContext
* @param sourceFileFQP fully qualified path to source content
* @param contentType content type
* @param dDocTitle doc title
* @param dDocAuthor author
* @param dSecurityGroup security group
* @param dDocAccount account
* @param dDocName dDocName
*
* @throws IdcClientException
*/
public static void checkin(IdcClient idcClient, IdcContext userContext,
String sourceFileFQP, String contentType,
String dDocTitle, String dDocAuthor,
String dSecurityGroup, String dDocAccount,
String dDocName) throws IdcClientException {
InputStream is = null;
try {
String fileName =
sourceFileFQP.substring(sourceFileFQP.lastIndexOf('/') + 1);
is = new FileInputStream(sourceFileFQP);
// note!!! when using HTTP protocol (not intradoc/jaxws) - you must explicitly
// set the Content Length when supplying an InputStream to the transfer file
// e.g. primaryFile.setContentLength(xxx);
// otherwise, a 0-byte file results on the server
} catch (IOException e) {
e.printStackTrace(System.out);
} finally {
if (is != null) {
try {
is.close();
} catch (IOException ignore) {
}
}
}
}
}
Figure 4. Example Java Code for Uploading Files to Oracle WebCenter Content
Security
In order to process files using HCM Data Loader, your user must have the following role:
Note: The ProcessId is the request ID for the concurrent process that initiates HCM Data Loader processing. If you
wish to review the progress of your data set via the user interface, then this value is available in the Data Sets table
on the Import and Load Data page, but is hidden by default.
Parameter Description
ContentId Content ID of the file on the WebCenter Content server (the same value as dDocName in the WebCenter Content Java
call)
Parameters Name and value pairs. The following parameter names are available. None of these parameters is mandatory. For values
that you do not supply, the defaults specified on the Configure HCM Data Loader page are used.
ImportMaximumErrors Percentage of file lines in error that can occur in a business object before the import process
stops.
ImportConcurrentThreads Number of concurrent threads when importing.
LoadMaximumErrors Percentage of business object instances in error that can occur for a business object before
the validation and load processes stop.
LoadConcurrentThreads Number of concurrent threads when validating or loading.
LoadGroupSize Number of business objects processed as a single unit of work by a concurrent thread.
FileEncryption Type of file encryption
DeleteSourceFile Y to purge the source file from the WebCenter Content server after processing it.
Name and value are paired with an equals (=) sign. Parameters must be comma delimited.
Examples:
ImportMaximumErrors=100,LoadMaximumErrors=100,LoadConcurrentThreads=4, DeleteSourceFile=Y
FileEncryption=PGPSIGNED
Parameter Description
Parameters Name and value pairs. The following parameter names are available
ProcessId The ID of the process initiated and returned by the importAndLoadData method.
ContentId Content ID of the file on the WebCenter Content server (the same value as dDocName in the
Either one or both of these parameters must be supplied, though the ProcessId is recommended.
Note: Oracle HCM Cloud web services are protected by Oracle Web Services Manager (OWSM) security policies.
Refer to the OWSM Security and Administrator's Guide for Web Services for further details.
The method for resolving the URL is slightly different from the method outlined for WebCenter Content (given
earlier). Use the domain name given for the Service Home URL, which is shown in the Service Details section of
your service provision e-mail. Using the same example given earlier, the above URL will be:
https://hcm-xxxxxxxxxxx.oracleoutsourcing.com/hcmCommonDataLoader/HCMDataLoader?wsdl
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wsa="http://www.w3.org/2005/08/addressing">
<env:Header>
<wsa:To>http://www.w3.org/2005/08/addressing/anonymous</wsa:To>
<wsa:Action>http://xmlns.oracle.com/apps/hcm/common/dataLoader/core/dataLoaderIntegrationService//HCMDataLoa
der/importAndLoadDataResponse</wsa:Action>
<wsa:MessageID>urn:uuid:ab36195f-775b-4688-a0e4-8a4e531e904c</wsa:MessageID>
<wsa:RelatesTo>urn:uuid:74c7b631-c20a-4d49-bf36-1f483f3dc43e</wsa:RelatesTo>
</env:Header>
<env:Body>
<ns0:importAndLoadDataResponse
xmlns:ns0="http://xmlns.oracle.com/apps/hcm/common/dataLoader/core/dataLoaderIntegrationService/types/">
oracle/wss11_saml_or_username_token_with_message_protection_service_policy
Therefore, when a client calls the service it must satisfy the message-protection policy to ensure that the payload is
transported encrypted or sent over the SSL transport layer.
If payload encryption is desirable or otherwise required, a client policy that can be used to meet this requirement is:
oracle/wss11_username_token_with_message_protection_client_policy
To use this policy, the message must be encrypted using a public key provided by the server. When the message
reaches the server it can be decrypted by the server's private key. A KeyStore is used to import the certificate and it
is referenced in the subsequent client code.
The public key can be obtained from the certificate provided in the service WSDL file. See Figure 7 (the certificate is
Base64 encoded).
To use the key contained in this certificate, you need to create a local KeyStore and import the certificate into it:
1. Create a new file with any name you like. You must change the extension to .cer to indicate that it is a
certificate file.
2. Using a text editor, open the file you just created and enter "-----BEGIN CERTIFICATE-----" on the first line.
4. Add "-----END CERTIFICATE-----" on a new line and save the file. Now you have a certificate containing the
public key from the server.
5. Open the command line and change the directory to $JAVA_HOME/bin. Use the following command to create
a KeyStore and import the public key from the certificate.
keytool -import -file <Provide the path of the certification.cer file> -alias orakey -keypass welcome -keystore
<Provide the path where the jks file needs to be created(including the file name)> -storepass welcome
6. You can find the KeyStore file in the KeyStore path you set.
Once the client KeyStore has been created, you can call the service using the proxy classes. The following
parameters are used by the proxy class to encrypt and decrypt the message.
Parameter Description
WSBindingProvider.USERNAME_PROPERTY User name of the application user who has relevant privileges for importing and
processing HDL data files.
ClientConstants.WSSEC_KEYSTORE_TYPE Type of the KeyStore you created. JKS (Java KeyStore) is widely used and is
the most common type.
ClientConstants.WSSEC_ENC_KEY_ALIAS Alias of the key you use to decrypt the SOAP message from the server.
ClientConstants.WSSEC_ENC_KEY_PASSWORD Password of the key you use to decrypt the SOAP message.
ClientConstants.WSSEC_RECIPIENT_KEY_ALIAS Alias of the key you use to encrypt the SOAP message to the server.
wsimport -s <Provide the folder where the generated files need to be placed> -d <Provide the folder where the
generated files need to be placed> <The HCM Data Loader Integration Service URL>
Example:
com
sdo
zip loaderIntegrationProxy.jar -r * -
com/oracle/xmlns/apps/hcm/common/dataloader/core/dataloaderintegrationservice
package com.oracle.xmlns.apps.hcm.common.dataloader.core.dataloaderintegrationservice;
import com.oracle.xmlns.apps.hcm.common.dataloader.core.dataloaderintegrationservice.HCMDataLoader;
import com.oracle.xmlns.apps.hcm.common.dataloader.core.dataloaderintegrationservice.HCMDataLoader_Service;
import com.oracle.xmlns.apps.hcm.common.dataloader.core.dataloaderintegrationservice.ServiceException;
import java.util.Map;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.WebServiceRef;
import weblogic.wsee.jws.jaxws.owsm.SecurityPolicyFeature;
try {
response = hcmLoaderService.importAndLoadData(contentId,parameters);
System.out.println("The response received from the server is ...");
System.out.println(response);
} catch (ServiceException e) {
System.out.println("Error occurred during the invocation of the service ...");
To generate the class file you need the following JAR file:
ws.api_1.1.0.0.jar
$MIDDLEWARE_HOME/modules
If you do not have the JAR file, it can be can be downloaded as part of JDeveloper. The JAR file is available at the
following location in the JDeveloper installation:
modules/ ws.api_1.1.0.0.jar
javac -classpath <Provide the path of the folder where the JAX-WS files are generated>;<Provide the location of
the ws.api_1.1.0.0.jar> HCMDataLoaderServiceSoapHttpPortClient.java
Run the class HCMDataLoaderServiceSoapHttpPortClient to invoke the HCM Data Loader Integration Service:
java -classpath <Provide the path of the folder where the JAX-WS files are generated>;<Provide the location of
the weblogic.jar>;<Provide the location of the jrf.jar>
com.oracle.xmlns.apps.hcm.common.dataloader.core.dataloaderintegrationservice.HCMDataLoaderServiceSoapHttpPortCli
ent <ContentId> <Parameters>
com/oracle/xmlns/apps/hcm/common/dataloader/core/dataloaderintegrationservice
package com.oracle.xmlns.apps.hcm.common.dataloader.core.dataloaderintegrationservice;
import com.oracle.xmlns.apps.hcm.common.dataloader.core.dataloaderintegrationservice.HCMDataLoader;
import com.oracle.xmlns.apps.hcm.common.dataloader.core.dataloaderintegrationservice.HCMDataLoader_Service;
import com.oracle.xmlns.apps.hcm.common.dataloader.core.dataloaderintegrationservice.ServiceException;
import java.util.Map;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.WebServiceRef;
import weblogic.wsee.jws.jaxws.owsm.SecurityPolicyFeature;
try {
response = hcmLoaderService.getDataSetStatus(parameters);
System.out.println("The latest Data Set Status ....\n\n\n\n\n");
System.out.println(response);
} catch (ServiceException e) {
System.out.println("Error occurred during the invocation of the service ...");
e.printStackTrace();
}
}
}
Provide the necessary values in the above java file and compile.
javac -classpath <Provide the path of the folder where the JAX-WS files are generated>;<Provide the location of
the ws.api_1.1.0.0.jar> HCMDataLoaderServiceGetDataSetStatus.java
Run the class HCMDataLoaderServiceGetDataSetStatus to invoke the HCM Data Loader Integration Service:
java -classpath <Provide the path of the folder where the JAX-WS files are generated>;<Provide the location of
the weblogic.jar>;<Provide the location of the jrf.jar>
com.oracle.xmlns.apps.hcm.common.dataloader.core.dataloaderintegrationservice.HCMDataLoaderServiceGetDataSetStatu
s <ProcessId=nnnn,ContentId=xxxx>
getDataSetStatus Example
Response:
At regular intervals, retrieve the current status of the data set until complete.
At regular intervals, retrieve the current status of the data set until complete.
com/oracle/xmlns/apps/hcm/common/dataloader/core/dataloaderintegrationservice
package com.oracle.xmlns.apps.hcm.common.dataloader.core.dataloaderintegrationservice;
import com.oracle.xmlns.apps.hcm.common.dataloader.core.dataloaderintegrationservice.HCMDataLoader;
import com.oracle.xmlns.apps.hcm.common.dataloader.core.dataloaderintegrationservice.HCMDataLoader_Service;
import com.oracle.xmlns.apps.hcm.common.dataloader.core.dataloaderintegrationservice.ServiceException;
import java.util.Map;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.WebServiceRef;
import weblogic.wsee.jws.jaxws.owsm.SecurityPolicyFeature;
import java.io.IOException;
import java.io.StringReader;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
public HCMDataLoaderServiceAutomation() {
super();
}
HCMDataLoader hcmLoaderService =
hcmDataLoader_Service.getHCMDataLoaderSoapHttpPort(securityFeatures);
BindingProvider wsbp = (BindingProvider)hcmLoaderService;
Map<String, Object> requestContext = wsbp.getRequestContext();
requestContext.put(BindingProvider.USERNAME_PROPERTY,"Provide the applications username");
requestContext.put(BindingProvider.PASSWORD_PROPERTY, "Provide the password");
requestContext.put("oracle.webservices.security.keystore.type", "JKS");
requestContext.put("oracle.webservices.security.keystore.location", "Provide the location of the default-
if (array.length == 2) {
ucmContentId = array[0];
parameters = array[1];
} else if (array.length == 1) {
ucmContentId = array[0];
parameters = "";
}
try {
System.out.println("\n\n\n\n\n\n");
System.out.println("Invoking importAndLoad() method for ucmContentId " + ucmContentId);
response = hcmLoaderService.importAndLoadData(ucmContentId, parameters);
processId = Long.valueOf(response);
System.out.println("\n\nImportAndLoad() method invocation for UcmContentId " + ucmContentId +
" is Successful, ProcessId generated is : " + processId);
invokeGetDataSetStatus(hcmLoaderService, processId);
System.out.println("\n\n Load Completed for Data Set with UCM Content Id " + ucmContentId);
} catch (Exception e) {
System.out.println(response);
NodeList childList;
for (int i = 0; i < flowList.getLength(); i++) {
childList = flowList.item(i).getChildNodes();
for (int j = 0; j < childList.getLength(); j++) {
Node childNode = childList.item(j);
if ("DATA_SET".equals(childNode.getNodeName())) {
NodeList dataSeteChildNodes = childNode.getChildNodes();
{
for (int k = 0; k < dataSeteChildNodes.getLength();
k++) {
{
Node childDSNode = dataSeteChildNodes.item(k);
if ("STATUS".equals(childDSNode.getNodeName())) {
} catch (InterruptedException e) {
System.out.println("\n\nException while thread waiting....Program Exit");
}
}
}
}
}
}
}
}
}
return false;
}
}
The above automation code checks the status of the data set based on the time_interval value provided. By default,
the value is 60 seconds. Make sure to edit the time_interval variable based on the file size.
Run the class HCMDataLoaderServiceAutomation to invoke the HCM Data Loader Integration Service:
java -classpath <Provide the path of the folder where the JAX-WS files are generated>;<Provide the location of
the weblogic.jar>;<Provide the location of the jrf.jar>
com.oracle.xmlns.apps.hcm.common.dataloader.core.dataloaderintegrationservice.HCMDataLoaderServiceAutomation
<ContentId=xxxx;DeleteSourceFile=N|ContentId=xxxx>
The list of WebCenter Content server IDs for each file to be processed should be delimited using pipe (|) characters.
You can optionally provide HCM Data Loader service parameters for each file by delimiting the parameter name and
value pairs with semi-colons(;). For example:
ContentId=UCMFA131235;DeleteSourceFile=N,LoadConcurrentThreads=4|ContentId=UCMFA131236;Loa
dConcurrentThreads=4
HCMDataLoaderServiceAutomation Example
Invocation of HCMDataLoaderServiceAutomation:
Figure 10: Example - Invoking the HCM Data Loader Automation Method
Response:
HCM Extracts
HCM Extracts is a powerful tool within Oracle HCM Cloud that is used for reporting and outbound integrations. It
generates raw XML as well as providing the capability to integrate with BI Publisher to generate formatted output in
a variety of supported formats.
When you use HCM Extracts as part of an integrated process, you may need to invoke it automatically as part of an
automated flow. In addition, once the extract is complete, it is likely that the output needs to be retrieved for
subsequent processing.
When an HCM extract is defined, it generates a flow object in the payroll flow data model with the same name as the
HCM extract itself. This flow is used to control the processing of the HCM extract, including setting any parameters
The ability to manage the invocation of a flow and the tasks within it is the key to being able to automate a process
through the Payroll Flow Engine, and hence the way in which an HCM extract can be automated.
HCM Data Loader delivers the HCM Data Loader Data Set Summary and Compensation Changes extracts.
Before either can be used, it is recommended that you make a copy of the predefined extract and edit the default
definition to suit your requirements. This may involve generating a BI Publisher layout. Further details about these
two extracts and how to copy them are available from the HCM Data Loader Extracts document (MOS Doc ID:
1664133.1).
When you save a copy of an HCM extract you also create a payroll flow of type EXTRACT with the same name as
the saved extract, for example, HDL Data Set Summary.
The method to invoke the HCM extract is FlowActionsService.submitFlow. This method has the following
parameters:
Flow Instance Name The identifier of the particular instance of the extract to be run
Legislative Data Group Name The name of the legislative data group
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:typ="http://xmlns.oracle.com/apps/hcm/processFlows/core/flowActionsService/types/"
xmlns:flow="http://xmlns.oracle.com/apps/hcm/processFlows/core/flowControllerService/">
<soapenv:Header/>
<soapenv:Body>
<typ:submitFlow>
<typ:flowName>HDL Data Set Summary</typ:flowName>
<typ:flowInstanceName>HDL_Summary_1</typ:flowInstanceName>
<typ:legislativeDataGroupName>how to make this null not needed for this
extract</typ:legislativeDataGroupName>
<typ:recurringFlag>false</typ:recurringFlag>
<typ:parameterValues>
<flow:ParameterName>Content ID</flow:ParameterName>
<flow:ParameterValue>UCMFA23931</flow:ParameterValue>
<flow:ParameterName>Show Messages</flow:ParameterName>
<flow:ParameterValue>Y</flow:ParameterValue>
<flow:ParameterName>Show StackTrace</flow:ParameterName>
<flow:ParameterValue>N</flow:ParameterValue>
</typ:parameterValues>
</typ:submitFlow>
</soapenv:Body>
</soapenv:Envelope>
Flow Instance Name The identifier of the particular instance of the extract to be run
Flow Task Instance Name The name of the specific task to monitor
COMPLETED Complete
ERROR0 Error
IN_PROGRESS In progress
PUBLISHED Published
SCHEDULED Scheduled
SKIPPED Skipped
Example:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:typ="http://xmlns.oracle.com/apps/hcm/processFlows/core/flowActionsService/types/">
<soapenv:Header/>
<soapenv:Body>
<typ:getFlowTaskInstanceStatus>
<typ:flowInstanceName> HDL_Summary_1</typ:flowInstanceName>
<typ:flowTaskInstanceName> HDL Data Set Summary </typ:flowTaskInstanceName>
<typ:legislativeDataGroupName>US Legislative Data Group</typ:legislativeDataGroupName>
</typ:getFlowTaskInstanceStatus>
</soapenv:Body>
</soapenv:Envelope>
The payrollProcessingActionService.fetchExtractOutput method can be used to download the raw XML. The
parameters for this method are as follows:
Flow Instance Name The identifier of the particular instance of the extract to be run
This service call returns a String result attribute that contains the full XML generated by the extract.
The payroll action parameter BI_OUTPUT_SIZE determines whether the generated BI report is written as an
attachment to the WebCenter Content server. The action parameter value is the maximum size in bytes of the file.
Files larger than this value cannot be stored on the WebCenter Content server. If the file is stored on the WebCenter
Content server, then it appears in the Payroll Checklist Results UI and can be viewed and downloaded from this
location. Otherwise, a link to the location of the file on the BI server is shown in the Payroll Checklist Results UI.
If the BI_OUTPUT_SIZE action parameter is not present, a default of 10MB is applied. In this case, files of 10MB or
less are stored on the WebCenter Content server and rendered in the Payroll Checklist Results UI. For files that are
larger than 10MB, links are provided to the relevant location on the BI server.
CONNECT W ITH US
blogs.oracle.com/oracle Copyright 2014, Oracle and/or its affiliates. All rights reserved. This document is provided for information purposes only, and the
contents hereof are subject to change without notice. This document is not warranted to be error-free, nor subject to any other
warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchantability or
facebook.com/oracle fitness for a particular purpose. We specifically disclaim any liability with respect to this document, and no contractual obligations are
formed either directly or indirectly by this document. This document may not be reproduced or transmitted in any form or by any
twitter.com/oracle means, electronic or mechanical, for any purpose, without our prior written permission.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
oracle.com
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and
are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are
trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group. 1016