Description
In this tutorial, we will extend the basic console application that we created in a previous tutorial.
Safe2Save needs to inform their clients about their future expected savings. Therefore they want an application that will automatically generate a large number of individual documents. We have a list of users, for which we want to create documents. We will extend our existing console application, enabling it to loop over an array of users. And, the document we will generate shall consist of some individual values, including the future expected savings. Therefore we will have to link our console application to the calculations-file we've created in previous tutorials as well.
This tutorial starts with the user-list that we will read into Futurama. We import the name and cash balance out of the user-list, depending on a user-id. We then create a loop for generating the documents. The action is executed multiple times, and each time, we use another user-id, thus the data of the next user.
Next step is that we want a document with real information in it. Therefore we use another Template-file, which we already created and consists of a decent text with multiple mergefields in it. We will have to merge this information into the document, by adding these objects to our mergedata.
One of the mergefields is the result of our savings formula. Therefore we link our application document to the calculations document. In that way, we can refer to the formula in the calculations document. When we have processed all values in the mergedata, we execute the application again, and get the list of individual merged documents as a result.
Then two last steps are made. We first give our merged values a better format, so that they are properly placed in the document. And finally, we create a requesparameter for the Interest. In that way, the Interest can be chosen as a parameter when executing the console application. We show you how to do this by editing the command line arguments.
In this tutorial we show you a very basic way to execute the console applications, by using a command line. However, Futurama can offer you a sophisticated management tool to execute, manage and monitor these applications for you. Please consult the Futurama Vision-pages for information about this.