Create Mappings
Oracle E-Business Suite Business Event is defined by the WF_EVENT_T
data structure. After adding the required connections to the integration, you need to create the following mappings to pass the required parameter values to the subsequent REST services:
-
Define mappings for
Get_Order
-
Define mappings for
Create_Invoice
Create Mappings for Get_Order
In this example, a sales order Header Id is available as one of the business event parameters. In WF_EVENT_T
, event parameters are available as Name-Value
pair in repeating Parameter element. To obtain the value of the Header Id parameter and pass it to the subsequent Get_Order service call, you need to create mappings for Get_Order
.
-
In the Order_Status_Update integration flow, click edit for the
Map to Get_Order
icon.The mapper is displayed.
-
In the mapper, the business event related elements are displayed in the Source section, whereas the
Get_Order
related parameters are listed in the Target area. To obtain the value of the sales order Header Id (P_HEADER_ID) included as part of the event parameters and pass it to the subsequent Get_Order REST service, you need to define the XSL expression for the P_HEADER_ID parameter. -
Define the XSL expression for the P_HEADER_ID parameter by performing the following tasks:
-
In the Target section, expand the GET_ORDER_Input node, and then the InputParameters node. Click the P_HEADER_ID element to open the Build Mappings page.
-
In the Mapping area of the Build Mappings page, notice that the P_HEADER_ID element is displayed as the Target element.
-
In Source section of the Build Mappings page, expand the BusinessEvent_Input node, then the InputParameters node, then the BusinessEvent node, then the ParameterList node, and then the Parameter node.
-
Drag and drop the Value element from the Source section to the Mapping section as the value for the P_HEADER_ID element.
-
Similarly, drag and drop the XSL element "
if
" and the Name element from the Source section to the Mapping section to define the XSL expression<xsl:if test="nssrcmpr:Name='HEADER_ID'">
. -
Drag and drop the XSL element "
for-each
" from the Source section to the Mapping section to define the XSL expression<xsl:for-each select="/nssrcmpr:BusinessEvent_Input/nssrcmpr:InputParameters/nssrcmpr:BusinessEvent/nssrcmpr:ParameterList/nssrcmpr:Parameter">
.
Description of the illustration map_for_p_header_id.gif -
Save your work.
Expand the nodes to ensure that the P_HEADER_ID parameter is included as part of the structure.
-
-
Perform the following tasks to assign constant values to the target elements:
-
In the Target section, expand the GET_ORDER_Input node, and then the RESTHeader node.
Click the Responsibility element to open the Build Mappings page.
-
Enter "ORDER_MGMT_SUPER_USER" in the text box as the value for the Responsibility element.
Similarly, use the same approach to assign appropriate values to the target elements listed in the following table:
Path Element Value GET_ORDER_Input/RESTHeader RespApplication ONT GET_ORDER_Input/RESTHeader SecurityGroup STANDARD GET_ORDER_Input/RESTHeader NLSLanguage AMERICAN GET_ORDER_Input/RESTHeader Org_Id 204 GET_ORDER_Input/InputParameters P_API_VERSION_NUMBER 1.0 GET_ORDER_Input/InputParameters P_INIT_MSG_LIST F GET_ORDER_Input/InputParameters P_ORG_ID 204 After you complete the mappings for
Get_Order
, the mapped source values should appear in the Mapping column of the Target section.
Description of the illustration getorder_mapper.gif -
-
Click Save to save your work.
Create Mappings for Create_Invoice
Perform the following steps to create the mappings:
-
In the Order_Status_Update integration flow, click edit for the
Map to Create_Invoice
icon.The mapper appears.
-
Assign constant values to the target elements.
-
In the Target section, expand the execute node, then the CREATE_SINGLE_INVOICE_Input node, and then the RESTHeader node.
Click the Responsibility element to open the Build Mappings page.
-
Enter "RECEIVABLES_VISION_OPERATIONS" in the text box as the value for the Responsibility element.
Similarly, use the same approach to assign appropriate values to the target elements listed in the following table:
Path Element Value CREATE_SINGLE_INVOICE_Input/RESTHeader RespApplication AR CREATE_SINGLE_INVOICE_Input/RESTHeader SecurityGroup STANDARD CREATE_SINGLE_INVOICE_Input/RESTHeader NLSLanguage AMERICAN CREATE_SINGLE_INVOICE_Input/RESTHeader Org_Id 204 CREATE_SINGLE_INVOICE_Input/InputParameters P_API_VERSION 1.0 CREATE_SINGLE_INVOICE_Input/InputParameters P_INIT_MSG_LIST T CREATE_SINGLE_INVOICE_Input/InputParameters P_COMMIT T CREATE_SINGLE_INVOICE_Input/InputParameters/P_BATCH_SOURCE_REC BATCH_SOURCE_ID 1188 CREATE_SINGLE_INVOICE_Input/InputParameters/P_TRX_HEADER_TBL/P_TRX_HEADER_TBL_ITEM TRX_HEADER_ID 101 CREATE_SINGLE_INVOICE_Input/InputParameters/P_TRX_HEADER_TBL/P_TRX_HEADER_TBL_ITEM CUST_TRX_TYPE_ID 1684 CREATE_SINGLE_INVOICE_Input/InputParameters/P_TRX_HEADER_TBL/P_TRX_HEADER_TBL_ITEM BILL_TO_CUSTOMER_ID 1290 CREATE_SINGLE_INVOICE_Input/InputParameters/P_TRX_HEADER_TBL/P_TRX_HEADER_TBL_ITEM SHIP_TO_CUSTOMER_ID 1290 CREATE_SINGLE_INVOICE_Input/InputParameters/P_TRX_HEADER_TBL/P_TRX_HEADER_TBL_ITEM COMMENTS Invoice created via ICS integration for booked Sales Order in Order Management After you complete this step, the mapped source values should appear in the Mapping column of the Target section.
Description of the illustration mapper_constant.gif -
-
Add the following mapping for the header:
-
In the Source section, enter "HEADER_ID" in the Search field to locate this parameter.
Select the HEADER_ID element from the X_HEADER_REC node.
-
In the Target section, expand the execute node, then the CREATE_SINGLE_INVOICE_Input node, then the InputParameters node, then the P_TRX_HEADER_TBL node, and then the P_TRX_HEADER_TBL_ITEM node.
Select the TRX_NUMBER element.
Drag the HEADER_ID element from the Source section to the TRX_NUMBER element in the Target section to map the data.
After the mapping, the source element HEADER_ID should appear in the Mapping column next to the TRX_NUMBER element in the Target section.
Description of the illustration mapping-header_id.gif -
-
Use the same approach, as described in the previous step, to add the following sets of mappings for the line items:
Source Path Source Element Target Path Target Element BusinessEvent_Input/InputParameters/BusinessEvent/X_LINE_TBL/X_LINE_TBL_ITEM LINE_NUMBER execute/CREATE_SINGLE_INVOICE_Input/InputParameters/P_TRX_LINES_TBL/P_TRX_LINES_TBL_ITEM LINE_NUMBER BusinessEvent_Input/InputParameters/BusinessEvent/X_LINE_TBL/X_LINE_TBL_ITEM ORDERED_ITEM execute/CREATE_SINGLE_INVOICE_Input/InputParameters/P_TRX_LINES_TBL/P_TRX_LINES_TBL_ITEM DESCRIPTION BusinessEvent_Input/InputParameters/BusinessEvent/X_LINE_TBL/X_LINE_TBL_ITEM ORDERED_QUANTITY execute/CREATE_SINGLE_INVOICE_Input/InputParameters/P_TRX_LINES_TBL/P_TRX_LINES_TBL_ITEM QUANTITY_ORDERED BusinessEvent_Input/InputParameters/BusinessEvent/X_LINE_TBL/X_LINE_TBL_ITEM ORDERED_QUANTITY execute/CREATE_SINGLE_INVOICE_Input/InputParameters/P_TRX_LINES_TBL/P_TRX_LINES_TBL_ITEM QUANTITY_INVOICED BusinessEvent_Input/InputParameters/BusinessEvent/X_LINE_TBL/X_LINE_TBL_ITEM UNIT_SELLING_PRICE execute/CREATE_SINGLE_INVOICE_Input/InputParameters/P_TRX_LINES_TBL/P_TRX_LINES_TBL_ITEM UNIT_SELLING_PRICE Once you complete this step, the mapped source values should appear next to the corresponding target elements with the green check mark icons:
Description of the illustration mapper_line.gif -
Assign the following values:
-
In the Target section, expand the execute node, then the CREATE_SINGLE_INVOICE_Input node, then the InputParameters node, and then the P_TRX_DIST_TBL node.
Click the P_TRX_DIST_TBL_ITEM element to open the Build Mappings page.
In the Mapping section, enter the following information:
<nsmpr1:P_TRX_DIST_ID/>
. -
In the Target section, expand the execute node, then the CREATE_SINGLE_INVOICE_Input node, then the InputParameters node, and then the P_TRX_SALESCREDITS_TBL node.
Click the P_TRX_SALESCREDITS_TBL_ITEM element to open the Build Mappings page.
In the Mapping area, enter the following information:
<nsmpr1:P_TRX_SALESCREDITS_ID/>
.
The newly assigned mapping values should appear next to the corresponding elements in the Target section.
Description of the illustration mapper_target.gifSave your work.
-
-
Click Exit Mapper.
-
Save the integration.