Skip to main content

<transform>

Transform one object into another using a data transformation.

Syntax

<transform class="MyApp.SAPtoJDE" target="context.xform" source="request" />

Attributes and Elements

class attribute

Required. The name of the data transformation class that will perform the data transformation. This value can be provided as a literal string, or by using the ObjectSCript @ indirection operator to refer to the value of a context variable. See details below. Specify the name of a data transformation class.

target attribute

Required. The target (output object) for this data transformation. This is one of the objects in the execution context, or a property of one of these objects. Specify the name of a valid property and object in the execution context.

source attribute

Required. The source (input object) for this data transformation. This is one of the objects visible in the current execution context or a property of one of these objects. Specify the name of a valid property and object in the execution context.

name, disabled, xpos, ypos, xend, yend attributes

Description

The <transform> element lets you invoke a data transformation class from within a business process.

A data transformation class (a subclass of Ens.DataTransformOpens in a new tab) defines a method that takes an instance of an input object and transforms it into an instance of an output object. The transform element invokes this method to automatically transform an object of one type into another using the data transformation class specified by the class attribute.

The source attribute specifies the input object for the transformation. This is an object (or one of its object-valued properties) visible within the business process execution context and should be of the input type expected by the specified data transformation class.

The target attribute specifies the destination of the output object. This is also an object (or one of its object-valued properties) visible within the business process execution context and should be of the output type expected by the specified data transformation class.

Variables in the Execution Context

The <transform> element can refer to the following variables and their properties. Do not use variables not listed here.

Variable Purpose
context The context object is a general-purpose data container for the business process. context has no automatic definition. To define properties of this object, use the <context> element. That done, you may refer to these properties anywhere inside the <process> element using dot syntax, as in: context.Balance
request The request object contains any properties of the original request message object that caused this business process to be instantiated. You may refer to request properties anywhere inside the <process> element using dot syntax, as in: request.UserID
response The response object contains any properties that are required to build the final response message object to be returned by the business process. You may refer to response properties anywhere inside the <process> element using dot syntax, as in: response.IsApproved. Use the <assign> element to assign values to these properties.
Note:

There is more information about the business process execution context in documentation of the <assign> element.

Value of the class Attribute

While the <transform> element lets you invoke a data transformation class from within a business process, the data transformation class itself must already be defined using the Data Transformation Language (DTL), a subset of BPL. For more information about DTL, see Data Transformation Language Reference.

Indirection in the class Attribute

The value of the class attribute is a string that identifies the package and class name of a DTL data transformation. The string can be a literal value:

<transform class="MyApp.SAPtoJDE" target="context.xform" source="request" />

Or the @ indirection operator can be used to access the value of a context variable that contains the appropriate string:

<call class="@context.nextTransform" target="context.xform" source="request"/> 
FeedbackOpens in a new tab