Execution

The assistance execution shows to the modeler the wizard with the information about the available assistances.
For instance, based on the next metamodel and the next conformant model:


In the exceution of the next assistance script:

import library.attributeServices.AddAttribute;
evolution myEvolutionProgram{
  fromMM:"./models/mm3.ecore"
  toMM:"mm3_evolved1.ecore" "http://uniandes.edu.co/exampleMM3_evolved1"
  toM:"m3_coevolved1.xmi"
 
  instruction{
    addAttribute attD3{
      className=D
      type=EInt
    }
	[EAttributeImpl theAttribute, EClassImpl theClass, EDataTypeImpl theType, ArrayList modelClassInstances]
    comments{
      "Test for adding int attribute"
    }
    assistance{
      comments{
        "Attribute initialization with int value"
      }
      AddAttribute.initializeIntValue(theAttribute,modelClassInstances);
    }
    assistance{
      comments{
        "Addition of the other int attributes"
      }
      AddAttribute.additionIntValue(theAttribute,theClass,theType,modelClassInstances);
    }
    assistance{
      comments{
        "Multiplication of the other int attributes"
      }
      AddAttribute.multiplicationIntValue(theAttribute,theClass,theType,modelClassInstances);
    }
  }
}

Next figure presents the wizard related with the execution

With this wizard, the modeler can select one assistance to apply on several selected instances. Once the assistance has been processed, the selected instance are removed from the wizard. Once all instances have been removed from the wizard, the modeler can finish the process.

Errors

An EnAr-ASIMOV Execution could generate the following controlled errors:

  • If the modeler attempts to perform an assistant and he/she has not selected any instances, the wizard shows a message and the process is not performed.
  • If the modeler attempts to finish the wizard, but there are already instances to assist, the wizard shows a message and the process is not performed.
assistanceexecution.txt · Última modificación: 2012/04/18 11:51 por ha.florez39
Departamento de Ingeniería de Sistemas y Computación - Facultad de Ingeniería - Universidad de los Andes
CC Attribution-Noncommercial-Share Alike 3.0 Unported
Valid CSS Driven by DokuWiki Recent changes RSS feed Valid XHTML 1.0