Automating Payroll Batch Loader
Automating Payroll Batch Loader
Automating Payroll Batch Loader
June 2014
Introduction ....................................................................................... 1
Solution Overview ............................................................................. 3
FlowActionsService Overview........................................................ 3
Creating a Payroll Batch .................................................................... 4
Invoking the Load Batch From File flow ......................................... 4
By-passing the manual Upload File step ........................................ 5
Transferring a Payroll Batch .............................................................. 6
Creating Custom Transfer Batch Flow ........................................... 6
Invoking Transfer Batch Flow ...................................................... 10
Conclusion ...................................................................................... 11
Sections to be added in later versions of the document ............... 11
Automating Payroll Batch Loader
Introduction
Payroll Batch Loader is a tool that allows a customer to upload a variety of data objects,
primarily those used in the payroll product. The mechanism involves creating a batch in the
Payroll Batch Loader staging tables followed by a subsequent step to transfer the batch to
Fusion. The Payroll Flow UI is used to invoke the different steps for creating the payroll batch
and transferring the batch.
Create Batch – this allows the user to generate a spreadsheet which they complete and then
re-import to create the payroll batch
Load Batch from File – a predefined data file is selected and is processed through a
“transformation” formula resulting in a payroll batch being created
Transfer Batch – moves the data from the payroll batch tables to Fusion by executing code
that is specific to the type of object being loaded.
All of the steps described above require manual intervention through the Payroll Flow UI, to
invoke the initial processes and in some cases to complete subsequent steps.
Customers who are trying to integrate their systems using automated orchestration have a
need to minimize the number of steps that are performed manually, and it is therefore
necessary to ensure that Payroll Batch Loader can be automated.
It is possible to invoke Payroll Flows using the FlowActionsService external web service and
this paper discusses how this can be applied to the automation of Payroll Batch Loader.
1
Automating Payroll Batch Loader
This document should be used in conjunction with the Loading Data using Payroll Batch
Loader - Technical Essay (Doc ID 1590004.1).
2
Automating Payroll Batch Loader
Solution Overview
The solution outlined in this document comprises 2 parts; Loading the batch to the stage tables and
Transferring the batch to Fusion. The solution makes use of some of the seeded Payroll Flow
components and in other parts it copies and configures the seeded component.
A pre-requisite to the process is to place a csv or data file into UCM that contains the data to be loaded
into Fusion.
A web service is then called to invoke the Load Batch From File payroll flow.
A 2nd call to the web service ensures that a step that would otherwise be manual is automated by
indicating that the step is complete .
The process reads the data file and creates the batch in a set of staging tables, setting its status to
Unprocessed.
Another web service call invokes the Transfer mechanism which moves the data from the staging
tables to Fusion by calling product specific APIs.
At each stage of the flow the status can be monitored using a service call, an example of which is given
below.
Finally, if the status of the transfer is not “Transferred” (i.e. successfully completed) then any errors
can be downloaded using a BI report that is invoked using a BI service.
FlowActionsService Overview
The FlowActionsService provides a set of methods that allow Payroll Flows to be invoked and
managed from outside of Fusion. It allows customers to automate the processing of any Payroll Flows
including Payroll Batch Loader, HCM Extract and Payroll Processes etc.
The key methods that are used in this payroll batch loader solution are as follows:
submitFlow Initial submission of the Payroll Flow – creates the Flow Instance with a given name
performAction
3
Automating Payroll Batch Loader
In addition each Payroll Flow may have additional flow specific parameters that will be passed to the
FlowActionsService as Name Value pairs.
SERVICE hcmProcFlowCoreController/FlowActionsService
METHOD submitFlow
4
Automating Payroll Batch Loader
recurringFlag false
Batch The name of the payroll batch when it is created – used in next steps
Transformation Formula The Formula Id of the formula used to transform the data ready for loading into the payroll batch
staging tables
Once initiated the Load Batch From File follows the predefined steps:
Upload File In the UI this allows manual upload of the csv or data file
Load Batch Automatic processing of the data file to create the batch
Verify Batch Manual verification that the batch was created correctly
The 1st step in this list is a manual step that is used in the UI flow, allowing the user to upload the data
vile through the UI. In the service invocation this step can be by-passed.
SERVICE hcmProcFlowCoreController/FlowActionsService
METHOD performAction
5
Automating Payroll Batch Loader
flowInstanceName Unique identifier of the flow as specified when invoking the flow
actionName Initialize
The subsequent step is processed automatically before again stopping at the Verify Batch stage. In
testing it wasn’t possible to get this task to complete so it can either be ignored or the Load Batch
From File flow can be copied and the Verify Batch task removed.
6
Automating Payroll Batch Loader
Figure 1. Click on Transfer Batch line and hit Edit Buttons to into Edit Step
7
Automating Payroll Batch Loader
Figure 1. For the Batch parameter enter the highlighted values, then Next, Next, Submit, Save
Display Mandatory
8
Automating Payroll Batch Loader
Sequence 0
In this SQL statement the bind variable :BatchName parameter needs correspond to the stored name of
the new parameter created above. This name can be derived using the following SQL:
select base_flow_parameter_name
from pay_flow_parameters_vl
where base_flow_parameter_name like '%BatchName'
and base_flow_id in
(select base_flow_id
from PAY_FLOWS_vl
where base_flow_name = 'JR Transfer Batch 1');
In the example shown in the screenshots this results in ‘300000000815248BatchName’ so the string
that needs to be included in the “Batch” parameter is
select to_char(batch_id) from pay_batch_headers
where batch_name = ':300000000815248BatchName'
9
Automating Payroll Batch Loader
Display No
Sequence 1
The “Transfer Batch Flow” process is invoked using the FlowActionsService using the following
parameters:
SERVICE hcmProcFlowCoreController/FlowActionsService
METHOD submitFlow
recurringFlag false
10
Automating Payroll Batch Loader
Conclusion
Payroll Batch Loader can be used to load various data objects in Fusion HCM. Using the
FlowActionsService the Load Batch from File and Transfer Batch flows can be invoked from outside
Fusion allowing the process to be automated.
11
Automating Payroll Batch Loader Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
June 2014
Author: John Rhodes 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
Oracle Corporation
law, including implied warranties and conditions of merchantability or fitness for a particular purpose. We specifically disclaim any
World Headquarters
liability with respect to this document, and no contractual obligations are formed either directly or indirectly by this document. This
500 Oracle Parkway
document may not be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without our
Redwood Shores, CA 94065
prior written permission.
U.S.A.
Worldwide Inquiries: Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Phone: +1.650.506.7000
Fax: +1.650.506.7200 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
oracle.com trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group. 0114