Thursday, October 17, 2019

#733 Fusion ERP Batch Extracts with OIC part II

Just some more background info -

I used the following connections to Fusion ERP in the previous post.









Both of these are used in the Callback Integration -
The first, for onJobCompletion, i.e. the integration trigger.
The second, to pick up the report from UCM.

The first connection is based on the following wsdl -

















The second connection is based on the following Fusion ERP wsdl -

https://yourOIC/fscmService/ErpIntegrationService?wsdl

The ErpIntegrationService provides external operations for ERP integration scenarios to execute end-to-end inbound and outbound data flows. It also tracks the status of inbound and outbound data processes.

























Documentation of the above here




Wednesday, October 16, 2019

#732 Fusion ERP Batch Extracts with OIC

Simple example and background explanation here.
Caveat to begin with - I am not a Fusion ERP expert, but I do like understanding how things work.

So what is a batch extract?
Essentially a scheduled process (ESS- Enterprise Scheduler) that runs a report in ERP e.g.
Extract payment data since last execution to update downstream or upstream applications to reflect payments.

So two components here - the scheduled process and the report to be run, according to that schedule.

Where can I monitor the execution of these scheduled processes in Fusion ERP?










Here is a job I ran earlier, triggered by an OIC integration
(we will look at the integration in detail later) -















Payables Transactions Extract or sliocht idirbhearta iníoctha, as we are wont to say in Ireland.

However, there are many more of them -




















A scheduled process might have parameters that you can set to control which records are included or how they're affected. For example, a process updates only the records that are effective within the date range that you define.

So where are these ESS processes or jobs defined?










Search for Manage Enterprise Scheduler Job Definitions -



















As you can see from the above, I then searched for Payables Transactions Extract -

The job is of type - BI Publisher. That means there is a BI Report defined already.





























Here are the BI Report details -























So net, net is you begin with a BI Report, either one of those delivered with ERP or a custom report of your own. You then call this from an ESS job.

I have a simple example which covers the whole lifecycle -

The interaction is as follows -

1. OIC Trigger integration: Trigger the job to execute the report.
The job payload will also specify a callback url - which enables a 2nd integration to be called once the job has run successfully and the result is in UCM.

2. Fusion ERP: The report executes

3. Fusion ERP: Result is written to UCM

4. Fusion ERP: Callback Integration is triggered

5. OIC: Result is picked up from UCM and sent to destination.

OIC Integration triggering BI Report run








initiateExtract: Here we will leverage the Fusion ERP exportBulkData operation. This submits an ESS job to start the BIP report processor and eventually uploads the report output to UCM. The supported output formats are XML and CSV. Callback and notification are also supported.

The Request Payload - 













The parameter list refers to the PaymentsTransactionsExtract: Parameters screenshot above.

Here is a sample input for the parameter list -

92,/oracle/apps/ess/financials/commonModules/shared/common/outbound;PayablesTransactionsExtract,BIPREPORT,FULL_EXTRACT,#NULL,300000046987012,#NULL,#NULL,#NULL,#NULL,#NULL,12-18,N,N,300000046975971,#NULL,#NULL,#NULL,FULL_EXTRACT,#NULL,#NULL,#NULL,PayablesTransactionsExtract,#NULL

jobOptions will be set to ExtractFileType=ALL

notificationCode is set to 30














callbackURL is set to 
nn/ic/ws/integration/v1/flows/soap/DEMO_ERP_BULK_EXTRAC_CBK/1.0/'

this points to my callback integration, more about that later.


The Response will be the requestId of the submitted ESS job.

I execute the integration and view progress in ERP - Scheduled Processes -










I check the response received from the initiateExtract call -

























Note the requestId returned - 1615660.

OIC Callback Integration - picking up result from UCM


This integration picks up the extract result from UCM.
Remember, we have passed the url to this integration as a parameter in the invoke of exportBulkData 






Let's look at the individual steps -

bulkExtractCallback:
The trigger is based on a SOAP connection, which itself is based on the following wsdl -





























As you can see, the request contains the following -

 "requestId", "state", "resultMessage"

























Note: requestId = 1615660.

downloadFile: leverages a SOAP connection, based on the Fusion ERP wsdl


















The operation selected is getDocumentsForFilePrefix.

Details can be found here -


























prefix is set to “ESS_” + //requestId
makes sense!

account is set to fin$/payables$/export$

comments is set to "processedby=" , //requestId  

The Response is as follows - (this is from a different run )












The file is written to my ftp server -





Sunday, September 22, 2019

#730 OIC - Google Tasks adapter

Here is a simple example of leveraging the adapter -
















Naturally, I begin by creating the connection.














There are some pre-requisites for leveraging the google task api from OIC.
You need to create the OAuth credentials.
This you do via console.developers.google.com

















I click Enable -











Now I click Create Credentials -

and generate the OAuth Client ID - (Client ID/ Client Secret)













I will also need to specify the scope - e.g. read only or read/write.























I add my client id and secret and then click Provide Consent -





















I click Allow -











I now switch back to the OIC Connection definition and click Test and then Save.

Now to using it in an integration -













I have a REST interface with the following Request/Response -

{"taskList":"myTaskList", "taskName":"task", "description": "desc",
"dateDue": "2019-10-12T23:28:56.782Z"}

{"taskListId":"ABC", "taskId": "123"}

Essentially, I will be creating a new tasklist and adding a task to it.
The response contains the ID of tasklist and task.

I drop the google Task connection into the integration -




















and select Insert Task List - this will add a new Tasklist to my existing list -

















I then drop the google task adapter again and select Insert Task -
I will add the tasklist ID to the the Insert Task Request, to create the link between the two.


Maybe this is a good time to look at the task api docs here

















So back to the integration -

























Here is the mapping for createTaskList -













I set kind = "tasks#taskList"

title is set to the request field - taskList

Here is the mapping for createTask -























I set kind = "tasks#task"

Note how I set the tasklistId under TemplateParameters.
This appears under TemplateParameters because the url is as follows -




This is set to the ID returned by the createTaskList request.





















I activate and test with the following payload -

{"taskList":"myTaskList", "taskName":"Important Task", "description": "sehr wichtig!", "dateDue": "2019-10-12T23:28:56.782Z"}

I check in Google Tasks -