Test Problem: ©PSS - Prosoft Solutions of
Test Problem: ©PSS - Prosoft Solutions of
Contents
Contents...................................................................................................................................... 2
Problem description..................................................................................................................... 3
Orders input file....................................................................................................................... 4
Supplier output file...................................................................................................................4
Sample files................................................................................................................................. 5
Input file orders23.xml ............................................................................................................5
Output file Apple23.xml........................................................................................................... 5
Output file Panasonic23.xml....................................................................................................6
Output file Sony23.xml............................................................................................................ 6
Problem description
SACOM is an electronic retailer that has multiple online and physical stores. SACOM needs a
middleware application that can integrate the existing different ordering systems with the
suppliers of electronic products.
SACOM customers place product orders from various locations and systems and these orders
need to be processed and sent to the corresponding suppliers.
The orders are sent as XML files on a central server, where your application needs to process
them and create the XML files that will be sent to the suppliers. Following is a system overview
diagram:
Each XML file that contains orders will be processed into multiple XML files, one file per each
supplier. The supplier output file will contain all the suppliers products from one orders file,
sorted descendant by the timestamp when the order was created and product price. Each
product that will be sent to the supplier must also contain the order ID, so that it will be easily
tracked to the original order.
The application will wait for the orders files in one folder and will export the supplier files in a
separate folder. Once a file that contains orders is received in the specific folder, the application
will process it, and then it will wait for another orders file to process.
Once a customer places an order, he expects it to be delivered as soon as possible, so you
must focus on the application XML files processing performance in order to keep the customers
happy.
<products>
<product>
<description>Sony 54.6" (Diag) Xbr Hx929 Internet Tv</description>
<gtin>00027242816657</gtin>
<price currency="USD">2999.99</price>
<orderid>2343</orderid>
</product>
<product>
<description>Sony NWZ-E464 8GB E Series Walkman Video MP3 Player Blue</description>
<gtin>00027242831438</gtin>
<price currency="USD">91.99</price>
<orderid>2343</orderid>
</product>
</products>
Sample files
After processing input file orders23.xml, the application must create three suppliers files:
Apple23.xml, Panasonic23.xml and Sony23.xml. Following is the sample file content for
reference.