How to Create Transformations

19-22 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite Figure 19–21 Assign Values Dialog To set the properties of the target message: 1. Click Add in the Assign Values dialog. The Assign Value dialog is displayed, as shown in Figure 19–22 . Figure 19–22 Assign Value Dialog

2. In the From section, select any of the following options from the Type list:

■ Property : Select this option to assign a value of a property to the target message. The property list contains a list of predefined message properties. You can also enter any user-defined property name. ■ Expression : Select this option to assign a value of an expression to the target message. When you click the Invoke Expression Builder icon to the right of Creating Oracle Mediator Routing Rules 19-23 the Expression field, the Expression Builder dialog similar to the one shown in Figure 19–13 is displayed. For more information about the Expression Builder dialog, see Section 19.2.2.7, How to Specify an Expression for Filtering Messages. ■ Constant : Select this option to assign a constant value to the target message.

3. In the To section, select any of the following options:

■ Property : Select this option to copy the value to a message property. The Variable field of the Expression Builder dialog contains an out variable that contains the output message. You can use out.property to access properties of an output message. ■ Expression : Select this option to copy the value to an expression. When you click the Invoke Expression Builder icon to the right of the Expression field, the Expression Builder dialog is displayed. The Variable field of the Expression Builder dialog contains an out variable that contains the output message. You can use out.partname to access a complete output message or part of an output message. Figure 19–23 shows a sample Assign Value dialog in which a constant value is specified as an expression. Figure 19–23 Populated Assign Value Dialog

4. Click OK in the Assign Value dialog.

5. Click OK. The expression is added to Assign Values field of the Routing Rules

section. 19-24 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite Table 19–1 through Table 19–3 list the various possibilities of assignment on constants and properties, payloads, and headers of a message from source to target. Notes: ■ When you assign values to a particular Oracle Mediator property during event publishing, the assigned value does not get propagated to the subscribing event. You can work around this issue by using transformations to include the property as part of the event body. ■ You cannot assign values to the jca.db.userName and jca.db.password properties on Oracle WebLogic Server because their data sources do not support setting the user name or password dynamically to the getConnection method. Table 19–1 Possibilities on Constants and Properties Source Target Example Property Property copy expression=in.property.jca.file.FileName target=out.property.jca.file.FileName Constant Property copy value=ConstantNameAssigned.xml target=out.property.jca.file.FileName Table 19–2 Possibilities on Payload Source Target Example XPath Expression Property copy expression=concatExprPropMed,-,oraext :generate-guid target=out.property.jca.file.FileName xmlns:oraext=http:www.oracle.comXSLTra nsformjavaoracle.tip.pc.services.function s.ExtFunc XPath Expression below part level Property copy expression=in.bodyimp1:requestProductRe qMake target=out.property.jca.file.FileName xmlns:imp1=http:xmlns.oracle.compsft Property XPath Expression below part level copy value=in.property.jca.file.FileName target=out.requestinp1:requestProductRe qModel xmlns:inp1=http:xmlns.oracle.compsft Constant XPath Expression below part level copy value=ConstantModel target=out.requestinp1:requestProductRe qModel xmlns:inp1=http:xmlns.oracle.compsft XPath Expression XPath Expression copy expression=in.body target=out.request