[music, wind, chimes]
Do you need to load and orchestrate data from an ftp location
to your ERP cloud service?
Oracle Integration Cloud Service or ICS,
now includes the new orchestration pattern,
which allows the execution of business processes
and long-running runtime activities.
In this integration, data from a secure FTP is sent to ICS for orchestration,
and then it's uploaded to ERP cloud.
The data's pulled from the sFTP location
by using a trigger file mechanism.
ICS schedules the orchestration flow
for pulling a trigger file.
It also has the capability to unzip and decrypt files.
The file is staged in ICS.
The zip file may contain multiple files,
and each file may have multiple records.
Because of this,
a for-each loop is needed to process each file and record,
and to enrich or transform the data
before it's written to a new file for ERP cloud.
Once the new ERP file is ready
it's uploaded by the ERP cloud adapter in ICS.
The adapter invokes the ERP
import service and specifies a callback.
The data loading and processing
start on the ERP endpoint.
Additionally,
ICS allows the definition of callbacks.
A callback receives logs and errors,
encrypts them, and send them through the FTP adapter.
Let's build this integration in ICS.
The connections to the ERP and FTP endpoints
are already configured.
On the integrations page,
a new pattern for orchestration is available
when creating integrations.
All configured endpoints
are available on the in 'Invokes' panel.
Here, the FTP endpoint is configured
with a filename pattern to read a trigger file
from the ftp location.
A schema is defined from a CSV file,
which has the format of the trigger file.
A new 'Actions' panel
is available to add activities to integrations.
The 'Assign' activity is defined
to declare the set of variables.
The expression builder,
allows setting values for each variable
by using functions
for example,
to extract the zip file name from a relative path.
To download and stage the file temporarily in ICS,
an FTP endpoint is configured from the 'Invoke' panel
by using the 'Download to ICS' operation.
The input and download directors are specified
along with the unzip option.
Map actions are automatically generated
every time new endpoints or stage
file actions are added to the integration.
In this case,
the mapping sets the extracted zip file name.
The zip file may contain multiple files.
'For-each' actions enable iterating
over a repeating element.
To read each file from the input directory in ICS,
a stage file action is configured
to specify details,
like filename and directory,
by using the expression builder.
[silence]
The schema format
is also specified by loading a CSV file
that contains the data structure.
When a file a stage in ICS
another 'For-each' action is required
to iterate through each file record.
It's time to transform and enrich the data,
by adding a stage file action
to write each record into a new file.
The expression builder is used once again
to set the filename and output directory.
All the enriched data is appended to the existing file.
In this case, the schema format for the new ERP file
uses the same data structure as the source file.
The data mapping and transformation
are performed in the map action.
Functions, operators,
and XSL elements are useful to enrich
and transform the new file for ERP.
Once the new file is ready,
a stage file action is configured
to write a manifest file with the business data details.
[silence]
The map activity
allows the definition of the manifest content.
Once the new file for ERP is built,
a stage file action allows re-ziping the file
before sending it to the ERP cloud endpoint.
Just as before,
the expression builder is used to concatenate the zip file.
[silence]
Finally,
the ERP endpoint is added to import the data
into the Financials Cloud Application.
The operation to perform
in the target Oracle ERP Application
is import payable invoices.
Once the data loading and processing are complete,
an email notification needs to be triggered.
The callback is also defined
to retrieve more details about any failed records.
The file references for the ERP endpoint
are defined in the map action,
so the ERP system
processes the re-zipped file accordingly.
[silence]
After activating this integration,
the activity stream can be monitored
from the Runtime Health page,
where the activity stream and diagnostic logs
are available for download.
Thank you for watching!
To learn more,
visit us online at cloud.oracle.com/integration