Decorator Application
The Decorator application type provides the ability to use the same process interface or application (e.g. a Message
Transformation, Email or Script application) with different parameter presets.
For example it allows to create services only taking a Business Object and a Date as input parameters in the
Model & Go! perspective.
To create a Decorator application you have to add the following settings:
- Select an application or a process interface from a target model
- Set predefined values for some or all primitive input parameters of the original application or process
interface
The Decorator application takes the set of input parameters of the original application or process interface reduced
by the predefined values as input parameters.
Configuring the Decorator Application
The Configuration tab allows to select an application or process interface from a target model.

Figure: Decorator Application Configuration
Setting Default Values for Input Mappings
The Default Values tab displays a list of primitive input parameters of the application or
process interface, which was selected in the Configuration tab.
It allows to enter predefined values for the primitive input parameters. The parameters having predefined values
will be excluded from the resulting application input parameters.

Figure: Decorator Application Default Values
Examples
The following examples demonstrate different use cases of the Decorator application.
Decorator Application Example
The following example shows how to decorate a Message Transformation application. These are the main steps to follow:
- Create a model having a Message Transformation application
- The application has two input parameters (firstName and lastName)
and an output parameter (response). All are of type primitive.
Figure: Application parameters
- The target message of the application adds the following mapping to the response parameter:
"Hello "+firstName+" "+lastName;

Figure: Message Transformation Application Configuration
- In another model create a Decorator application decorating the Message Transformation application.
- Open the Configuration tab in the Decorator application property panel. Select the previous
model and the target Message Transformation application.
- Switch to the Default Values tab and define a default value for the firstName
input parameter (i.e.
John).
Figure: Decorator Application - default value
- Since firstName already has a default value, we only pass the lastName
parameter via a data LastName as shown in the screenshot below.
Figure: Process with Decorator Application
- At runtime, enter a value for data LastName (i.e.
Major)
Figure: Decorator Application - runtime data entry
- The decorator application will be invoked using the default value for firstName
(
John) and the entered lastName (Major). The output is as below:

Figure: Decorator Application - runtime output
E-mail Application Example
The following example shows how to decorate an E-mail application. These are the main steps to follow:
- Create a model with an E-mail Send/Receive application
- The E-mail application has the following default input parameters:
Figure: Default input parameters
- In another model create a Decorator application decorating the E-mail application.
- Open the Configuration tab in the Decorator application property panel. Select
the model containing the E-mail application and the E-mail application accordingly.
- Switch to the Default Values tab and define default values for the input parameters
from, cc and subject.
Figure: Enter predefined values
- Since sender and subject are defined as default values, we only have to pass the recipient
parameter, e.g. via a data Recipient as shown in the screenshot below.
Figure: Process with Decorator Application
- At runtime we only have to enter a recipient for the E-mail application. The e-mail will then be sent to this
recipient from the predefined sender with the predefined subject. A copy will be sent to the predefined
carbon copy recipient.
Process Interface Decorator Example
The following example shows how to decorate a process interface. These are the main steps to follow:
- Create a Provider model having an interface with three primitive parameters.
Figure: Process Interface
- Create a model with a process implementing the above process interface.
Figure: Process Interface Implementation
- The process has a Message Transformation application with the following mapping to the
response parameter:
"Hello "+firstName+" "+lastName;

Figure: Application Configuration
- Data FirstName and LastName are mapped to the input parameters and output
parameter response maps to data Response.

Figure: Implementing Process
- Create another model, with a Decorator application templating the process interface.
- In the Decorator application, select the previous model and the target process interface.
Figure: Process Interface decorator
- In the Default Values tab, enter a predefined value for the firstName input
parameter (i.e.
Peter)
Figure: Interface Decorator Application Mapping
- Since parameter firstName has a predefined value, we only need to pass parameter
lastName, e.g. via a data LastName, as displayed in the screenshot below.

Figure: Model with Decorator Application
- At runtime, the decorator process interface will be invoked using the
predefined value for parameter firstName (
Peter) and the value entered for data
LastName (i.e. Smith).

Figure: Runtime output for Decorator Application example