Sie sind auf Seite 1von 11

Automating Batch Loads using Flow Action Service

Contents

Automating Batch Loads using Flow Action Service.....................................................................................1

1 Flow Action Service..............................................................................................................................2

1.1 Automating Batch Loads..............................................................................................................2

2 Creation of a Custom Flow...................................................................................................................4

2.1 Requirement details.....................................................................................................................4

2.1.1 Linking Load Batch from File and Transfer Batch Flows........................................................4

3 Using Submit Flow Service operation for Flow Action Service.............................................................8

3.1 Submitting a Custom Flow...........................................................................................................8

3.1.1 submitFlow..........................................................................................................................8

4 Appendix..............................................................................................................................................9

4.1 Appendix 1...................................................................................................................................9


1 Flow Action Service

User can interact as shown above with both the service and the Checklist UI.

Flow Action Service is an external service that is available from REL7 onwards. It will allow the user to
automate their interaction with the Flow subsystem. User can submit a flow, monitor the status of the
various tasks of the flow, check the available actions and perform them.

1.1 Automating Batch Loads


Load batch From File is a flow that has been delivered in release 7, meant for uploading interface data
using a flat file. The flow consists of three tasks, the first task is a manual task where the user uploads a
flat file which is stored in UCM. Once the file is loaded to fusion user completes the manual task which
then starts the next automatic task. The second task takes the file loaded to UCM and creates a Batch.
This batch is then available for transfer. To transfer the batch user needs to submit the Transfer batch
flow using the earlier created batch name.

Typically the interfaces are fixed in nature, and thus can be automated using the Flow Action service
without the need for UI interaction, thus enabling the user , to automate the whole process.
Step 1: User uploads a flat file to UCM and gets a unique Content Id. See Appendix 1 for the options
available.

Step 2: User invokes the Flow Action Service to submit a flow instance. While submitting the flow
instance user provides details like Batch Name, Content Id (Ucm Id that was received from step 1 above)
and Transformation Formula(optional).

Step 3: Once the flow is submitted the first manual task where the user uploads the file to the UCM
server starts executing, but this time since the content id parameter is passed, it initializes the first task
and links the Batch with the Content Id. At this step the flat file is effectively linked to the batch.

Step 4: User can execute the available service methods to monitor the status of the task.

Step 5: After verifying that initialization is complete, using the available service methods, user can then
choose to complete the manual task.

Step6: Completing the manual task will automatically trigger the next automatic task that will populate
the file contents to the Batch interface table. At this step the Batch creation is completed.

Step 7: After this, the transfer batch process can be submitted that will transfer the batch contents from
the interface tables to fusion transaction tables.

Steps 1 to 7 once decided can then be automated through a client program, which can then be executed
periodically without any manual intervention. If required, Flow Task notifications can be setup that will
alert task owners on the status of the various tasks, as it progresses through this automation.

NOTE: In order to further simplify the steps 1 to 7, the manual task can be eliminated by creating a
custom Flow. This is discussed in details in the next section.
2 Creation of a Custom Flow
2.1 Requirement details
Linking the two flows Load Batch From File and Transfer Batch is a solution for simplifying the
steps to create and transfer a batch. While the seeded Load batch from file flow is seeded to walk
the user through all the steps from file upload to batch creation. For a automated use case we can
take a more simplified approach.

2.1.1 Linking Load Batch from File and Transfer Batch Flows
Here are the steps to create a custom flow

1. In the Manage Payroll Flow Patterns screen in Payroll Checklist, search for Load Batch from
File Flow Pattern. Once the flow is displayed in Search Results, go for Copy Flow Pattern and
give the Flow Name of the linked flow you want to create and other required fields. This step creates
a copy of the Load Batch from file flow for customization.

2. After completing the Copy search for the new flow with the name you gave in the above step for
the linked flow. In the above screen shot, name given was LBF_TB_Demo. Select and Edit the
Flow Pattern searched.

3. In the Edit screen of Flow Pattern, Remove the tasks Upload File and Verify Batch from Flow
Pattern. We dont want any user interactions , the upload file step is redundant as we are now going
to pass the UCM id which we expect to directly upload to ucm . As we want the Transfer Batch to be
kicked off once the Load batch is complete we dont require the verify step aswell.
4. Select and Add Task Transfer Batch as shown in screen shot below and Save. This adds the
transfer batch step to the flow.

5. Go to Task Sequence Tab and verify that the Task Sequence is Start Flow-->Load Batch--
>Transfer Batch-->End Flow as shown in below screen shot. If not, please rectify it. This should be
automatically created for you , and is the sequence in which you want to run the process.

6. Go to Parameters Tab and verify all Flow Parameters are available as shown in below screen shot.
7. Go back to the tasks tab and edit the Transfer Batch task. In the edit task details screen,its batch
parameter will be shown which needs to be linked with the Batch Flow Task parameter coming from
Load Batch task. Please refer below screen shot. What we are doing here is utilizing the batch id that
is generated by the Load Batch from file task and passing it to the transfer batch task to consume.

8. To link the Batch parameter coming from Load Batch task, select the Batch task parameter in
Basis value LOV. Click Next button.
9. Verify and fill the Owner and Checklist details. Click Next.

10. Fill in Duration and Notification details as required. Click on Submit.


11. Now edit the Load Batch task and update the Flow Task Parameter Batch usage to Output
Parameter as shown in screenshot. Next and Submit. You will be redirected to Edit Flow Details
Screen. Click Save.

A flow is created that has both the Load Batch from File and Transfer Batch tasks.
select max(formula_id) from ff_formulas_vl ff, ff_formula_types ft where ff.formula_type_id =
ft.formula_type_id and ft.formula_type_name = 'Batch Loader' and ff.formula_name =
'OOS_US_TIME_EE_BATCH_LOAD'

3 Using Submit Flow Service operation for Flow Action Service


3.1 Submitting a Custom Flow

3.1.1 submitFlow
This method can be used to submit a flow instance. The same method can be used to schedule a flow by
passing some additional parameters.

3.1.1.1 Sample Request SOAP structure


1. We are trying to submit a flow for the custom flow created in Section 2 , Note the flowName and ContentId parameters
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header />
<soap:Body>
<ns1:submitFlow xmlns:ns1="http://xmlns.oracle.com/apps/hcm/processFlows/core/flowActionsService/types/">
<ns1:flowName> LBF_TB_Demo </ns1:flowName>
<ns1:parameterValues xmlns:ns2="http://xmlns.oracle.com/apps/hcm/processFlows/core/flowControllerService/">
<ns2:ParameterName>Batch</ns2:ParameterName>
<ns2:ParameterValue>MyBatch25Mar15</ns2:ParameterValue>
</ns1:parameterValues>
<ns1:parameterValues xmlns:ns2="http://xmlns.oracle.com/apps/hcm/processFlows/core/flowControllerService/">
<ns2:ParameterName>Content Id</ns2:ParameterName>
<ns2:ParameterValue>UCMFA139873</ns2:ParameterValue>
</ns1:parameterValues>
<ns1:flowInstanceName> MyFlow25Mar15</ns1:flowInstanceName>
<ns1:legislativeDataGroupName>ZHRX_USVS_ST LDG One</ns1:legislativeDataGroupName>
<ns1:recurringFlag>false</ns1:recurringFlag>
</ns1:submitFlow>
</soap:Body>
</soap:Envelope>

RESPONSE
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing">
<env:Header />
<env:Body xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Body-
xbSf8Dzgkp8jq1Itwh9XwQ22">
<ns0:submitFlowResponse xmlns:ns0="http://xmlns.oracle.com/apps/hcm/processFlows/core/flowActionsService/types/">
<result xmlns="http://xmlns.oracle.com/apps/hcm/processFlows/core/flowActionsService/types/">true</result>
</ns0:submitFlowResponse>
</env:Body>
</env:Envelope>
Once this is submitted, it will submit the Load Batch from file task , which will take the UCMId
passed to it while submitting the flow and create a batch out of it. Once a batch is created, the
transfer batch process will be automatically started.

4 Appendix
4.1 Appendix 1
Oracle Fusion provides Oracle Universal Content Management (UCM) 11g product to store and
manage unstructured data (documents, images, etc.). For present use case, user can upload the
flat file to UCM using the UI
They can also upload the document using the following :-

java -cp ./oracle.ucm.fa_client_11.1.1.jar oracle.ucm.client.UploadTool --url=https://xxxx-xxx-xxxxx-external-fs.us.oracle.com/cs/idcplg --username=<<username>> --password=<<password>>


--dSecurityGroup="FAFusionImportExport" --dDocAccount="hcm/dataloader/import" --primaryFile=<<file name with location>> --dDocTitle="TestLoadToUCM"

Please ensure that the user has the Role Human Capital Management Integration Specialist
assigned.

Das könnte Ihnen auch gefallen