Before launching the generation process, the list of plugin entities must be set. For this first step, Adichatz uses, by default, 3 different ways to launch the generation process:
- Generate Pojos using Hibernate tools.
- Determine a folder containing Pojo java files.
- Specify list of plugin entities from previous built Adichatz plugins. (For instance, you can create a first plugin for manage server side using Pojos generated by Hibernate Tools. A second plugin for the client side will be generated after having determined the list of plugin entities from the Server side plugin.
From there, a default Scenario Tree is built and stored inside '**scenario.xml**' file.\\
Adichatz proposes default scenarios for generating your application.
{{tutorial:scenario.png?500 |Scenario}}
Each scenario contains the way to generate an XML file from input.
By convention, generated XML files use the '.axml"' extension.\\
For example, the scenario org.adichatz.scenario.impl.EntityScenario class can take a **Film POJO** as input to build a file called 'FilmMMGENERATED.axml'.\\
In the same vein, org.adichatz.scenario.impl.DetailScenario class, takes the **FilmMM** java class as input to build the 'FilmDIGENERATED.axml' file.
\\ \\
Later, '**XML**' file will be used as input by the set of generators to build **JAVA** classes.
\\
You can create your own scenario classes or select a specific scenario class by entity and type:
* Open the './resources/xml/Scenario.xml' file with Scenario Editor.
* Select Generation page.
* Open branch called 'PluginEntity: adi://myproject/model.actor/ActorMM'.
* Select item: GenerationUnit: ActorTI - TABLE.
* In the Outline part, focus on scenarioClassName field and select available table scenarios (CTL-Space).\\
{{tutorial:select_table_scenario.png?550 |Select scenario for generation}}
\\
The name of a file generated by scenarios ends by '**GENERATED.axml**'. If you want to customize an XML file ([[http://www.adichatz.org/document/FilmDI.xml|see example]]) and you do not want
that the result will be affected by a future generation process, you just have to remove the '**GENERATED**' from file name: For example, if you rename file from 'FilmDIGENERATED.axml' to 'FilmDI.axml', a new 'FilmDIGENERATED.axml' will be created when relaunching scenario process but generator will take the 'FilmDI.axml' file as input to generate java classes.