Business Process and Data Transformation Language Reference
DTL <transform>
[Back] [Next]
   
Server:docs1
Instance:LATEST
User:UnknownUser
 
-
Go to:
Search:    

Transform an object of one type into an object of another type.
Synopsis
<transform sourceClass="MyApp.SAPtoJDE"
           targetClass="AlsoMine.JDE"  />
Attributes
Attribute Description Value
sourceClass Required. The class name of the input object for the data transformation. The name of a valid object and property.
targetClass Required. The class name of the output object for the data transformation. The name of a valid object and property.
sourceDocType Optional. When the input object is a virtual document such as an HL7 message, this string identifies its DocType. A string.
targetDocType Optional. When the output object is a virtual document such as an HL7 message, this string identifies its DocType. A string.
language Optional. The name of the language used for expressions and code blocks within this data transformation. Any expressions found in the business process, as well as lines of code within <code> elements, must use the specified language. If the <transform> does not specify a language, the default is ObjectScript. MVBasic is not supported. The name of a language: basic or objectscript.
create Optional. The create option desired for the target object. If not specified, the default is new. This can take one of the following values: new, copy, or existing as detailed in the following description.
Elements
Element Purpose
<annotation> Optional. A text string that describes the <transform> element.
Most activities Optional. <transform> may contain zero or more of the following elements in any combination: <assign>, <code>, <foreach>, <if>, <sql>, <subtransform>, or <trace>.
Description
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
The sourceClass and targetClass may identify standard Ensemble message classes, each of which contains a set of properties. If so, the sourceDocType and targetDocType attributes are not needed.
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: