Recipes control the transformation steps between different models. The main tasks are to load, transform and store models. Recipes are like a list of operations, what to load, what to process and finally what to store.
The main element of a recipe is the Definition
. It has an Id and a name
and can import other definitions. The name is actually a human readable name, where the Id must
be a unique system identifier.
The Definition
consists of Task
s. Each task has again
a name and an Order
attribute, which is used to sort the tasks. The actual
order of the Task
elements cannot be used, since the definition might import
other tasks from other definitions that will be sorted into the list of tasks.
The main element of the Tasks element is Execute
. It defines what code
is actually executed at that position. The Execute element has the name
attribute which defines what is being executed.
The syntax is:
bundle-class://bundle-name/className#method
If the bundle name should also be used as package prefix, then the class name can be
prefixed with a ".".
For example:
bundle-class://org.eclipse.scada.configuration.utils/.LoadModel#load
Will load the class org.eclipse.scada.configuration.utils.LoadModel
and
execute the method load
.
The following recipe handlers come with Eclipse SCADA and can be used by the Execute element:
bundle-class://org.eclipse.scada.configuration.utils/.LoadModel#load
Load a model from a resource into the local context.
Input: String - "uri" - the relative or absolute URI of what to load.
Output: model - the loaded model.
bundle-class://org.eclipse.scada.configuration.world.lib/.deployment.NodeMappingHandler
Process all Nodes and extra targets and replace the hostnames with the ones defined in the mapping model.
Input: Model - worldModel - the final world model
Input: Model - nodeMappings - the node mappings model
Input: String - additionalTargets - additional ECore Class names and attributes that well be replaced.
The syntax is EMFClassName:feature1,feature2;EMFClassName2:feature1,feature2