Model-to-Model transformation
As a warm-up exercise, modify this M2M transformation on Epsilon’s playground so that it generates 2 deliverables per task
- One interim report in the middle of the task
- One final report at the end of the task
Exercise
Write a M2M transformation with ETL that produces a MiniVoiceXML model from a call centre model. MiniVoiceXML is a toy version of the W3C VoiceXML specification.
MiniVoiceXML metamodel
- A
Documenthas 0+Dialogs, which can beFormsorMenus: execution starts from firstDialog - A
Formhas 0+FormItems:Formgets inputs from the caller and assigns them to variablesField: prompt the caller, read line of input, and assign input to var with givennameTransfer: transfer the caller to another number (destusestel:NUMBER)Block: 0+ executable elementsGoTo: switch to another DialogPrompt: output text to user
- A
Menuhas aPromptand 1+Choice: runs thePromptthen shows options and waits for choicedtmf: number (1-9) to be typed by callernext: Dialog to traverse to if chosen

The transformation
- Clone this Github
- Alternatively, download a copy of its contents
- Import the metamodel project (
minivoicexml) into Eclipse - In a nested Eclipse, import the interpreter (
minivoicexml.interpreter) project - In the nested Eclipse, create a new project named
callcentre2minivoicexml - In the new project, create an ETL script with these rules:
Model→Documentwith theDialogsproduced from theSteps- The first
Dialogshould be the one from the firstStepthat would be run
- The first
Statement→FormwithBlockcontaining aPromptCallRedirection→FormwithTransfer(watch out fordestformat)InputQuestion→FormwithFieldcontaining aPromptDecision→MenuwithPromptTransition→- If the source is a
Decision: addChoiceto theMenufrom the source node- Remember to set the
dtmf,text, andnextfeatures correctly!
- Remember to set the
- Any other: add
GoToto theBlockat the end of theFormfrom source node- If such a
Blockdoes not exist, add it as well - Remember to set the
nextreference to the equivalent of theTransitiontarget
- If such a
- If the source is a
- Run your ETL script on your sample model:
- Configure the launch so the new model is saved to
generated-voicexml.modelinside yourcallcentre2minivoicexmlproject
- Configure the launch so the new model is saved to
- Run the resulting MiniVoiceXML models on the interpreter:
- In
minivoicexml.interpreter, right-click onLauncher.launch, selectRun As –> Launcher - The interpreter will run from the
Consoleview: check that the model behaves as expected by entering your answers
- In
Solution
- A reference solution is available on Epsilon’s playground.