Large File Handling
Large File Handling
PUBLIC
If ffIterator is null, exit from the loop. It means all the available records
in the flat file are processed.
PUBLIC
Large File Handling XML
Generally in real time scenarion for large xml it has been seen that
some nodes are there that are being repeated several tomes making
the xml file large enough . The large file handling for xml in
webMethods targets this point and in built services are present to hanle
these kind of scenarios.
Let's first see the inbuilt services present to do large file handling in
the case of xml.
pub.xml:xmlStringToXMLNode – This service converts the input
from String to XML node , this is a general service used in webMethods
where we want to convert xml string data to xml node . This service is
good in built service having great performance it plays a vital role in
large file handling.
PUBLIC
pub.xml:getNextXMLNode : This service is used in order to get the
next node .
Now lets see the structure of the main flow service where Large file
Handling for xml has been done .
PUBLIC
Large File Handling:
First create flatfile schema and record definition and fields. Record definition name must match
the value of the record identifier in a flat file. Record definition is 0 and fields start from 1.
For mapping purpose, create an IS document type from this flat file schema by keeping ‘Max
Repeat’ 1. Now set ‘Max Repeat’ to Unlimited for parsing.
Create the service keep the service pub.file.getfile file name is path and load as bytes.
Take repeat step make it repeat on success, take convert to values step from pub.flatfile
Bytes to ffdata in pipein, copy ffschema and paste in ffschema which is under pipeline make it
iterate true to read the records one by one. Take the document reference from schema DT and
map it from ffValues for further usage in the pipeine.
Here I am just storing the records in database with an insert adapter service. Map the values.
Take branch step
When the ffiterator variable is null, you should use an EXIT step to exit from the REPEAT step and
discontinuing processing. Exit from loop. Copy ffiterator and paste in switch
PUBLIC