Business Process and Data Transformation Language Reference
DTL <transform>
|
|
Transform an object of one type into an object of another type.
Synopsis
<transform sourceClass="MyApp.SAPtoJDE" targetClass="AlsoMine.JDE" />
The <transform> element is the outermost element for a DTL document. All the other DTL elements are contained within a <transform> element. Within the <transform>, the two objects have the names
source and
target, respectively. For example:
<transform targetClass='Demo.DTL.ExampleTarget'
sourceClass='Demo.DTL.ExampleSource'
create='new'
language='objectscript'>
<trace value='"Convert from lowercase to uppercase"'/>
<assign property='target.UpperCase'
value='$ZCONVERT(source.LowerCase,"U")'
action='set'/>
</transform>
Source and Target Objects
Alternatively, the
sourceClass and
targetClass may identify virtual documents such as HL7 messages. In this case the
sourceDocType and
targetDocType attributes are needed to tell Ensemble which message structure to expect in the virtual document.
Values for the create Option
The
create option for the target object may have one of the following values:
-
new Create a new object of the target type, before executing the elements within the data transformation. This is the default.
-
copy Create a copy of the source object to use as the target object, before executing the elements within the transform.
-
existing Use an existing object, provided by the caller of the data transformation, as the target object.