In the Element Mapping tab, select the entity (element, document, root) and click the right mouse button to invoke the Map Action Editor pop-up window. The prompts presented by the Map Action Editor will vary based on the Action type selected.
The Map Action Editor has the following common components:
Pre Process, In Process, Post Process Tabs
Available Actions
Selected Actions
Optional Conditional Expression
Result Variable
Action Operands - Element Window
An Action can be applied at any of the following stages of message creation or consumption:
Pre Process
A preprocess action is executed before the message is created or consumed.
The Create Global Variable action is an example of a preprocess action. The variable must be defined before you can use it.
In Process
An in-process action is executed during message creation or consumption.
The Math and String Functions are examples of in-process actions used to perform a computation or to manipulate a value.
Post Process
A postprocess action is executed after the message is created or consumed.
The Insert into Database Table action is an example of a postprocess action. The row cannot be inserted into the database until all the data for the row has been processed.
Select the appropriate Map Action Editor Window Tab for the map entity (element, document, root) selected.
The available action categories for the selected process stage and selected map entity are displayed. Expand each category to view all the available action types.
The following table summarizes all action types sorted by Action Level and Action Stage. A "Y" indicates the action type is available for the Action Level and Action Stage combination. An "N" indicates the action type is not available for the Action Level and Action Stage combination.
| Action Category & Description | Element In Process | Document Pre Process | Document In Process | Document Post Process | Root Pre Process | Root In & Post Process |
|---|---|---|---|---|---|---|
| Assignment: Assign variable value | Y | Y | Y | Y | N | Y |
| Assignment: Create global variable | N | N | N | N | Y | N |
| Database Function: Assign next sequence value | Y | Y | Y | Y | N | Y |
| Database Function: Append where clause | N | DB Source | N | N | N | N |
| Database Function: Insert into database table | N | N | N | Y | N | N |
| Derivations | Y | N | N | N | N | N |
| Function Call | Y | Y | Y | Y | N | Y |
| Math Functions | Y | Y | Y | Y | N | Y |
| OAG Standard Conversions | Y | N | N | N | N | N |
| Other: Exit Program | Y | Y | Y | Y | N | Y |
| Predefined Variable | Y | Y | Y | Y | N | Y |
| Procedure Call | Y | Y | Y | Y | N | Y |
| Return Error Message | Y | Y | Y | Y | N | Y |
| String Functions | Y | Y | Y | Y | N | Y |
| XSLT Transformation | N | N | N | N | N | Y(Post) |
To move an action type from Available Actions to Selected Actions, select the desired action type and click the shuttle button.
To deselect a selected action type, select the desired action type and click the shuttle button to move the selected action type from Selected Actions back to Available Actions.
A given entity (element, document, root) may have one or more Actions defined for it. The XML Gateway Execution Engine processes the Actions in the sequence defined, from the beginning of the list proceeding downward to the last action type on the list. Use the up and down arrows within the Selected Actions Window to change the sequence of the Actions defined for a given entity. Use the left shuttle button to deselect a Selected Action if necessary.
Each Action may be defined as a conditional action (except the Append Where Clause and Create Global Variable). The condition is expressed as two operands. An operand may be a variable (source, target, or global variable) whose value is determined at runtime, or a literal value.
For each condition operand, click on the (...) icon to the right of the operand field to invoke the Element window. The Element window allows you to select a variable or provide a literal value.
Refer to Action Operands - Element Window for details regarding the Element window.
The operators supported by Oracle XML Gateway are listed in the following table:
| Operator | Description |
|---|---|
| = | Equal |
| != | Not Equal |
| > | Greater Than |
| < | Less Than |
| >= | Greater Than or Equal To |
| <= | Less Than or Equal To |
| Is NULL | Null |
| Is NOT NULL | Not Null |
Enter the two operands and select the operator if a condition expression is required.
Compound conditions can be defined by comparing two operands and storing the result in a variable (source, target, or global). You then compare the value in the variable with the next condition operand.
Some Actions have result variables defined and some do not. Those that do not have a result variable defined will use one of the action operands as the result variable.
The result variable is the left-most field of the action operand. The only exception occurs in the Convert To actions where the result variable is the right-most field. Per user interface standards, the result variable field is greyed, but is enabled for data entry.
For element-level Actions, the selected source or target variable is displayed as the default result variable. You can change the variable name as necessary.
For document-level or root-level actions, the result variable is blank. Click on the (...) icon to invoke the Element window. Select the source, target, or global variable as the result variable. The value of the result variable is determined at runtime.
The result variable cannot be a literal value.
Refer to Action Operands - Element Window for details regarding the Element window.
An Action may or may not have operands associated with it.
For Actions that do have operands associated with them, the number of operands varies by action type. Click on the (...) icon to the right of the operand field to invoke the Element window.
The Element window allows you to select a variable or provide a literal value. The Element window is presented in four parts as follows:
Radio button for Literal, Variable, or Global Variable
Operands displayed in gray indicate literal values are not allowed
Field for literal value (available only when Literal radio button is selected)
Window display for source and target variables
The default radio button setting is Variable. You can change the default by selecting a Literal (if available for the action type selected), or Global Variable (if defined).
The Literal radio button is enabled only if a literal value is applicable for the action type selected and the Element Window was not invoked from a Result Variable. Enter the literal value and click OK.
When the Variable radio button is enabled, you are presented with the source and target variables. Select the source or target variable name and click OK. The value for the selected variable is determined at runtime.
The Global Variable radio button is enabled only if global variables are defined for the message map. Select the Global Variable from the list of values and click OK. The value for the selected global variable is determined at runtime.