Retrieving documents

In this section we show how to save and retrieve documents from AML.

Saving documents

Step 1

Note that when we create models, we are not registering it. So if we need to use it later, we won't be able to retrieve it.If you want that a model persists, you should use register methods.


In this case, you'll be able to retrieve your model specifying its ID. If you prefer to specify a custom name, use the following method instead:

manager.register("MyModel", model);

To create a template, an offer or an agreement from a file, use these methods instead:

manager.registerFromFile(file); // file: File format

Retrieving documents

Step 2

To retrieve a model, simply use one of these three methods, depending on your case: