A Typical MapForce Server Use Case
Envision a manufacturing company that controls costs by exploiting a just-in-time assembly process with a very low supply of parts inventory on hand. New customer orders are logged in a sales database and at the end of every day the components needed to assemble that day’s sales are tabulated.
The IT department runs a SQL query to identify the required parts and transforms the list into a purchase order in JSON format to be transmitted to the supply chain.
Sound familiar? Our recent blog series on JSON tools and JSON data mapping were based on this real-life scenario. In this post we describe a MapForce Server use case that automates the repetitive task of generating each day’s purchase order.
MapForce Server includes the built-in data transformation engine developed for MapForce with significant enhancements to operate in server environments. MapForce Server performs data transformations for any combination of XML, database, EDI, XBRL, flat file, Excel, JSON, and/or Web service using preprocessed and optimized data mappings stored in execution files based on data mappings defined in MapForce. MapForce Server takes data transformation to the next level with server capabilities that include parallel processing and multi-threading, bulk SQL merge, cross-platform support, and more.
The first step to automation is to make one small enhancement to the JSON data mapping described in our earlier post. We would like the filename for each generated purchase order to include the execution date. Since the date is already mapped to an element of the output data, we can simply drag an additional connection from the date function to build a dynamic filename for the JSON output file:
Now we can save the data mapping as a MapForce Server execution file, which is a single self-contained resource file that holds a preprocessed and optimized version of the data mapping plus all accessory information. For the purchase order mapping, the MapForce Server execution file includes the JSON Schema, database connection string, and the SQL query.
MapForce Server can be executed from a command line in a standalone configuration, under the management of FlowForce Server, or programmatically via an API. In the screenshot below illustrating our MapForce Server use case, MapForce Server is run from a command line in a batch file for testing and QA purposes.
To expand this MapForce Server use case, other data mappings can be added to the same batch file or run individually. For instance, in our scenario the company might need to generate individual customer invoices based on orders in the sales database.
Once the system has been fully tested and passed QA, the execution of the MapForce Server data mappings is automated and managed via FlowForce Server. FlowForce Server executes MapForce Server data mappings through scheduled or trigger-based jobs, which can also be exposed as Web services. For our examples, a FlowForce Server job would automatically process the required data mappings at the close of business every day.
FlowForce Server also includes a built-in library of functions that enable you to take additional automated actions before or after mapping execution, such as sending email, copying files and directories, uploading files to FTP, running shell commands, and others.
All this power and flexibility make MapForce Server a superior alternative for deploying data mappings into production versus other more costly data integration products or even generating and compiling data mapping source code. Download a free trial to see for yourself!