title: M2T Xpand with existing ecore model
body: <p>I have an ecore model MyModel.ecore for which i want to generate code using Xpand. I dont have   edit code or  a runtime environment for the xpand project, i just want to create a xpand project, load MyModel.ecore, create a model.xmi using "create dynamic instance" and run.
  The problem is that my workflow file doesnt seems to recognize the elements from my metamodel.
  Here is the code from my workflow:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
    &lt;workflow&gt;
  &lt;property name="model" value="com.example/src/Application.xmi" /&gt;
  &lt;property name="src-gen" value="src-gen" /&gt;
  
  &lt;!-- set up EMF for standalone execution --&gt;
  &lt;bean class="org.eclipse.emf.mwe.utils.StandaloneSetup" &gt;
      &lt;platformUri value=".."/&gt;
  &lt;/bean&gt;
  
  &lt;!-- instantiate metamodel --&gt;
  &lt;bean id="mm_emf" class="org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel"/&gt;
  
  &lt;!-- load model and store it in slot 'model' --&gt;
  &lt;component class="org.eclipse.emf.mwe.utils.Reader"&gt;
      &lt;uri value="platform:/resource/${model}" /&gt;
      &lt;modelSlot value="model" /&gt;
  &lt;/component&gt;
  
  &lt;!-- check model --&gt;
  &lt;component class="org.eclipse.xtend.check.CheckComponent"&gt;
      &lt;metaModel idRef="mm_emf"/&gt;
      &lt;checkFile value="metamodel::Checks" /&gt;
      &lt;emfAllChildrenSlot value="model" /&gt;
  &lt;/component&gt;
  
  &lt;!--  generate code --&gt;
  &lt;component class="org.eclipse.xpand2.Generator"&gt;
      &lt;metaModel idRef="mm_emf"/&gt;
      &lt;expand
          value="template::Template::Root FOR Application" /&gt;
      &lt;outlet path="${src-gen}" &gt;
          &lt;postprocessor class="org.eclipse.xpand2.output.JavaBeautifier" /&gt;
      &lt;/outlet&gt;
  &lt;/component&gt;
  </code></pre>
  
  <p></p>
  
  <p>My template file:</p>
  
  <pre><code>«IMPORT MyModel»
  
    «DEFINE Root FOR Application»
   «FILE "AndroidManifest.xml"»
  
   «ENDFILE»
  
       «EXPAND ProcesaScreens FOREACH Screens»
  
  
       «ENDDEFINE»
  
  
     «DEFINE ProcesaScreens FOR Screen»
      «FILE this.name +".java"»
      «IF (this.metaType.compareTo(StartScreen.metaType) == 0)»
          «EXPAND ProcesaStartScreen FOR (StartScreen)this»
      «ENDIF»
  
  «ENDFILE»
      «ENDDEFINE»
  
  
     «DEFINE ProcesaStartScreen FOR StartScreen»
        «FILE "FilePrueba.java"»
        «ENDFILE»
  
      «ENDDEFINE»
  </code></pre>
  
  <p>And im getting this error:</p>
  
  <blockquote>
    <p>695  INFO  CompositeComponent - Reader: Loading model from platform:/resource/guiamovil.xpand/src/Application.xmi
    890  INFO  CompositeComponent - CheckComponent: slot model check file(s): metamodel::Checks 
    1329 INFO  CompositeComponent - Generator: generating 'template::Template::Root FOR Application' => src-gen
    1340 ERROR AbstractExpressionsUsingWorkflowComponent - Error in Component  of type org.eclipse.xpand2.Generator: 
        EvaluationException : Couldn't find type or property 'Application'
        [59,11] on line 1 'Application'
    1340 ERROR WorkflowEngine     - Workflow interrupted. Reason: Couldn't find type or property 'Application'
    1340 ERROR WorkflowEngine     - [ERROR]: Couldn't find type or property 'Application'(Element: Application; Reported by: Generator: generating 'template::Template::Root FOR Application' => src-gen)
    1341 ERROR WorkflowEngine     - [ERROR]: Couldn't find type or property 'Application'(Element: EXPAND template::Template::Root FOR Application; Reported by: Generator: generating 'template::Template::Root FOR Application' => src-gen)</p>
  </blockquote>
  
  <p>I imagine its something in the workflow.</p>
  
  <p>Thanks</p>