|
Oracle® Application Server ProcessConnect User’s Guide
10g (9.0.4) Part No. B12121-02 |
|
|
|
|
This chapter provides a simple tutorial on how to use the Oracle Application Server ProcessConnect user interface tool to design and deploy an integration within an enterprise.
This chapter contains these topics:
Phase B1: Manually Design Some Modeling Metadata in an Integration
Updating the Interaction, Native Event, and Application Event
|
See Also: Chapter 3, "Oracle Application Server ProcessConnect Concepts" for details on terms used in this chapter |
This section provides an overview of this tutorial.
The tutorial describes the initial phase of a hiring process. Human resources must find candidates for a new position that is available within the company. The initial phase of this tutorial describes placing an ad in a newspaper. If there is a problem with placing an ad in the newspaper, a human resources person must be notified. Otherwise, human resources assumes the ad is successfully placed.
The scenario uses the following applications:
A Human Resources application sends the ad placement request to a Global Newspaper application over a file system.
The Global Newspaper application receives the request and places a confirmation on the file system.
If there is a problem with the ad placement request, the Global Newspaper application notifies a Human Resources Person application.
The Human Resources application places a file on the file system containing one or more ads. The file contains additional information indicating whether this is a new ad or a change request for an existing ad. In the case of multiple ads, all ads must be placed in the same newspaper.
The Global Newspaper application expects the Human Resources application to place an ad as a file on the file system. The newspaper always places a confirmation file back on the file system. The confirmation indicates whether the placement was successful or if there was a problem. Although this tutorial uses the file system, an alternative method can be used, such as using Web services or secure HTTP with a custom XML file.
If a problem occurs, human resources expects the problem to be placed as a file on the file system. Although this tutorial uses the file system, other methods can be used, such as using SMTP and sending an e-mail.
This tutorial is divided into two phases:
You perform the following tasks in this phase:
Create the Human Resources and Global Newspaper applications, add an adapter to each application, and create delivery channels for the adapter of each application
Validate and approve the applications
Design the HR_Ad.xsd file to be delivered to the global newspaper. In this task, you create one interaction to read the ad placement request from the human resources file system and a second interaction to write the file to the global newspaper file system.
Create the native and application events and specify a translator for each application.
Use the Create End-to-End Basic Integration wizard to create a pass-through process between the two interactions.
Import the business (common view) datatypes for the business event.
Create the business event body element and include the imported business datatypes.
Design the inbound and outbound transformations between the application events and the business event.
Update the SetParty step in the business process to include the Global Newspaper application as the destination party in this integration.
Create the application agreements for both applications, and add a delivery channel and native role to each agreement.
Validate and approve the agreements.
Deploy and test the integration.
You perform the following tasks in this phase:
Enhance the business process to notify a Human Resources Person application in case of problems by manually performing some business process modeling.
Create two new native events: one for the problem notification message to the Human Resources Person application and one for the confirmation message from the Global Newspaper application.
Use the Add Event wizard to integrate the new native event from the global newspaper with the business event.
Use the Add Spoke wizard to integrate the native event from the human resources person with the business process.
Create the Human Resources Person application.
Validate and approve the application.
Create the human resources person application agreement, and add a delivery channel and native role.
Validate and approve the agreement.
Deploy and test the integration.
|
See Also: Chapter 13, " Managing Transformations" to model additional transformations that use the same example files as this tutorial |
The following .xsd files are provided in the $ORACLE_HOME/ip/import directory for the different applications used in this tutorial:
HR_Ad.xsd
HR_AdProblem.xsd
Global_Newspaper_Ad.xsd
Global_NP_AdConfirmation.xsd
Ad_CommonView.xsd
The following .xml files are also provided in the $ORACLE_HOME/ip/demo/tutorial directory:
HR_Ad.xml
Global_NPConfirmation.xml
Perform the following tasks:
Ensure that the XML Schema definition .xsd files are in the import directory before starting this tutorial. The import directory is configured as a server property and can be modified through Oracle Enterprise Manager 10g. The directory setting defaults to $ORACLE_HOME/ip/import (where $ORACLE_HOME is the middle-tier Oracle Application Server instance).
These files are also located at the back of this chapter.
Create a directory named tutorial anywhere you want (for example, $ORACLE_HOME/ip/tutorial)
Create the following subdirectories under tutorial.
human_resources/inbound
global_newspaper/inbound
global_newspaper/outbound
hr_person/outbound
Place these two .xml instance files in the tutorial directory:
HR_Ad.xml
Global_NP_AdConfirmation.xml
|
See Also: "Oracle Application Server ProcessConnect Middle-Tier Instance Configuration Parameters" for instructions on modifying server properties with Oracle Enterprise Manager 10g |
There are several methods for designing the tutorial:
You can start designing the business process completely or partly and integrate the events with the parties.
You can start designing some of the interactions with the parties and work toward the business process.
You can start designing datatypes and work toward the process modeling.
You can start designing the end-to-end process and then design the data details.
This tutorial does not follow one single method; it is a mix that provides many examples used by the different methods.
This phase of the tutorial describes how to design and deploy an integration (known as a configuration) between the Human Resources and Global Newspaper applications.
This section contains these topics:
This section contains the following tasks:
Creating the Delivery Channel for the Human Resources Application Adapter
Creating the Delivery Channel for the Global Newspaper Application Adapter
|
See Also: The following sections for additional details about tasks covered in this section: |
Create an application named Human Resources to send the inbound ad.
Select the Profiles tab.
Select the Applications tab.
Click Create.
Enter Human Resources in the Name field.
Select the Generic application type from the Application Type list. The application type enables you to group applications of a similar type together.
Click Apply.
The Human Resources application is created and the Application Details : Human Resources page appears.
Add an adapter to the Human Resources application by selecting from a list of previously-configured adapters provided by Oracle Application Server ProcessConnect. This adapter provides the connectivity that enables the Human Resources application with its unique data formats and interface to communicate with Oracle Application Server ProcessConnect.
Click Add in the Adapter Types section of the Application Details : Human Resources page.
Select File/FTP Adapter from the Type list.
Click Apply.
The Adapter Type Details page of the adapter appears.
Create a delivery channel for the adapter to use. The delivery channel describes the communication capabilities (such as message exchange and security details) of the specific adapter of the Human Resources application. Each adapter has its own unique delivery channel questions.
Click Create in the Delivery Channels section of the Adapter Type Details page of the adapter.
Enter the following details:
| Field | Enter/Select |
|---|---|
| Name | HR DC
|
| File or FTP mode | File |
| Polling interval in milliseconds (inbound) | 10000
|
| Base directory | start_at_root/ip/tutorial/human_resources
where Note: Do not use the |
|
Note: Do not enter information in any other fields; the other fields on this page only apply when using FTP mode with the File/FTP adapter. |
Click Apply.
Validate the application to ensure the correctness of the profile data you entered.
Click Return to List.
Click Return to List.
Click Validate on the Application Details : Human Resources page.
If validation is successful, the Validate button name changes to Send for Approval. If validation is unsuccessful, error messages appear. Make corrections based on the error messages.
You can select an approver to approve the profile data of your application (for example, to ensure that the delivery channel details you specified are correct).
Click Send for Approval.
Select approvers (for example, the user admin) from the Available Approvers list.
Click Move to move the approver(s) to the Selected Approvers list.
Click Send for Approval.
Your selection appears in the Approvers section of the Application Details: Human Resources page. The Send For Approval button is replaced with an Approve button and the Validated status that displays in the State field of the Details section is replaced with Pending Approval.
At this point, you can export the application details to an XML file for submittal to a person for approval. For this tutorial, this task is not performed. Instead, the profile data in this application is assumed to be approved by all persons.
You must approve the application.
Click Approve.
Click Approve again when prompted to confirm.
Create a second application named Global Newspaper to receive the ad request and place a confirmation file back on the file system.
Select the Profiles tab.
Select the Applications tab.
Click Create.
Enter Global Newspaper in the Name field.
Select the Generic application type from the Application Type list.
Click Apply.
The Global Newspaper application is created and the Application Details: Global Newspaper page appears.
Add an adapter to the Global Newspaper application by selecting from a list of previously-configured adapters provided by Oracle Application Server ProcessConnect. This adapter provides the connectivity that enables the Global Newspaper application with its unique data formats and interface to communicate with Oracle Application Server ProcessConnect.
Click Add in the Adapter Types section of the Application Details: Global Newspaper page.
Select File/FTP Adapter from the Type list.
Click Apply.
The Adapter Type Details page for the adapter appears.
Create a delivery channel for the adapter to use. The delivery channel describes the communication capabilities (such as message exchange and security details) of the specific adapter of the Global Newspaper application. Each adapter has its own unique delivery channel questions.
Click Create in the Delivery Channels section of the Adapter Type Details page of the adapter.
Enter the following details:
| Field | Enter/Select |
|---|---|
| Name | Global NP DC
|
| File or FTP mode | File |
| Polling interval in milliseconds (inbound) | 10000
|
| Base directory | start_at_root/ip/tutorial/global_newspaper
where Note: Do not use the |
Click Apply.
Validate the application to ensure the correctness of the profile data you entered.
Click Return to List.
Click Return to List.
Click Validate on the Application Details : Global Newspaper page.
If validation is successful, the Validate button name changes to Send for Approval. If validation is unsuccessful, error messages appear. Make corrections based on the error messages.
You can select an approver to approve the profile data of your application (for example, to ensure that the delivery channel details you specified are correct).
Click Send for Approval.
Select approvers (for example, the user admin) from the Available Approvers list.
Click Move to move the approver(s) to the Selected Approvers list.
Click Send for Approval.
Your selection appears in the Approvers section of the Application Details: Global Newspaper page. The Send For Approval button is replaced with an Approve button and the Validated status that displays in the State field of the Details section is replaced with Pending Approval.
At this point, you can export the application profile data to a file for submittal to a person for approval. For this tutorial, this task is not performed. Instead, the profile data in this application is assumed to be approved by all persons.
You must approve the application.
Click Approve.
Click Approve again when prompted to confirm.
Click the Applications tab to see the newly created Human Resources and Global Newspaper applications displayed in the Name column of the Applications page. Click these applications to see the details about the adapters and delivery channels that you associated with these applications.
This section contains the following tasks:
Creating the Inbound Interaction for the Human Resources Application Adapter
Creating the Native Event, Translation, and Application Event for the Human Resources Application
Creating the Outbound Interaction for the Global Newspaper Application Adapter
Creating the Native Event, Translation, and Application Event for the Global Newspaper Application
Creating the Rules for the Outbound Event Transformation Map
Selecting the Destination Party in the SetParty Step
|
See Also: The following sections for additional details about tasks covered in this section:
|
For the File/FTP adapter you added in "Adding an Adapter to the Human Resources Application" to read the file from an inbound directory, an inbound interaction must be defined. An interaction provides the adapter with the details to deliver and retrieve events to and from Oracle Application Server ProcessConnect. Interactions represent unique actions that can be performed with a specific adapter.
This task creates the interaction to read files with the extension xml from the human_resources directory (the subdirectory of tutorial that you specified in the delivery channel questions at Step 2). The questions that display onscreen are unique to the File/FTP adapter. The native format must be provided to describe the contents of the body element of the native event (that is, what comes in as an Oracle record from the adapter). Based on the native format, a number of extractors (and later also translators) are available. The extractor is used for event map and correlation.
Select the Modeling tab.
Select the Interactions tab.
Click Add.
Expand Adapter Providers > Oracle.
Select the File/FTP Adapter.
Expand Adapter Exchange Protocols > Inbound > File.
Select Read File(FileRecord).
Enter the following details:
| Field | Enter/Select |
|---|---|
| Directory (relative path) for incoming files | inbound
Note: You created this directory in Step 3 of "Preparations before Starting". Note also the relationship to the delivery channel directory you created in Step 2; |
| Maximum number of files to read for each poll | 1
|
| File extension for the incoming files - for example, txt * | xml
|
|
Note: Recheck your answers in Step 8 to ensure their correctness. Updating an interaction at a later time is difficult. |
Click Apply.
Ensure that the Create Native Event Type box is selected.
Click Apply on the Add Interaction : Review page.
Ensure that XSD is selected in both the Native Format list and the Extractor list.
Click Apply.
|
See Also: "Updating the Interaction, Native Event, and Application Event" to update an interaction used with a business process |
The inbound ad request of the Human Resources application initially appears in its own unique native format that Oracle Application Server ProcessConnect cannot interpret. This native format can consist of several different parts, including headers, attachments, and payloads. The payload can identify details such as the person submitting the ad request, their phone number, the date, and so on.
The native format received by Oracle Application Server ProcessConnect is represented as an Oracle record on the Oracle Application Server ProcessConnect boundary. A native event is created from the Oracle record. A native event is the Oracle Application Server ProcessConnect internal implementation of the business data contained in an Oracle record. The different parts of the native format (such as the payload) are placed into different parts called body elements in a native event. In addition, the transmission structure of the native format is removed (such as encoding, packaging, signing, or encryption).
When you create a native event, you also specify a translator to translate the contents of the inbound native event into an inbound application event, which represents an interpretable syntactic format understood by Oracle Application Server ProcessConnect.
Enter HR New Ad in the Name field of the Create Native Event Type page.
Click Next.
Select XSD from the Translator list.
Enter HR Ad in the Name field of the Native Datatype section.
Click Browse next to the Content field.
Select HR_Ad.xsd.
Your selection appears in the Content field.
Click Next.
Select XSD from the Translator list. The translators available for selection are limited to those that can handle the native format you selected in Step 12.
Select Yes from the Preserve Namespaces for Native Instances list.
Select None from the Doctype for Native Instances list. The page refreshes.
Click Next.
Review your selections and click Finish on the Review page.
The native event and application event are created.
Click HR New Ad in the Name column of the Native Event Types page.
The steps you performed in this section took the inbound ad request in its native format, created a native event named HR New Ad, and placed the payload part of the native format into a native event body element (named PAYLOAD):
Click Event Types > Application Event Types to review the newly created application event.
Select HR New Ad in the Name column. (Note that the application event has the same name as the native event.)
Click Expand All in the Event Body Elements section.
The steps you performed in this section translated the inbound native event into an inbound application event named HR New Ad and created an event body element (named PAYLOAD) for the payload part that includes the following application event datatypes. Application events contain no native formats. The particular native format of the Human Resources application cannot be identified, and any specific syntactic properties have been removed.
Remember these datatypes. Later in this tutorial in "Creating the Rules for the Inbound Event Transformation Map", you create a transformation rule to transform this source inbound application event and its application datatypes to a target inbound business event and its business datatypes.
Event maps determine the native event type for a specific record type from an interaction. In this tutorial, the File/FTP adapter reads any file with an .xml extension.
Select the Modeling tab.
Select the Event Types tab.
Select Native Event Types.
Select HR New Ad in the Name column.
Click Create in the Event Map section.
Select Condition expression not specified.
Click Update to create a new event map.
Click Expand All on the Create Condition Expression page.
Select Action.
Select = from the Operator list.
Enter HR New Ad Request in the Constant Value field.
Click Apply.
Click Apply on the Create Event Map page. The event map condition displays in the Event Map section.
For the File/FTP adapter you added in "Adding an Adapter to the Global Newspaper Application" to write the file to an outbound directory, an outbound interaction must also be defined.
This task creates the outbound interaction to write an ad_%TIME%.xml file to the outbound directory.
Select the Modeling tab.
Select the Interactions tab.
Click Add.
Expand Adapter Providers > Oracle.
Select the File/FTP Adapter.
Expand Adapter Exchange Protocols > Outbound > File.
Select Write File(FileRecord).
Enter the following details:
| Field | Enter/Select |
|---|---|
| Directory (relative path) for incoming files | outbound
Note: You created this directory in Step 3 of "Preparations before Starting". Note also the relationship to the delivery channel directory you created in Step 2; |
| Staging directory (relative path) for outgoing files | Leave this field blank. |
| File naming convention for outgoing files (without extension) - for example, po_%TIME% | %TIME%
|
| File extension for the incoming files - for example, txt * | xml
|
|
Note: Recheck your answers in Step 8 to ensure their correctness. Updating an interaction at a later time is difficult. |
Click Apply.
Ensure that the Create Native Event Type box is selected.
Click Apply.
Ensure that XSD is selected in both the Native Format list and the Extractor list.
Click Apply.
You must also create a native event and specify a translator to translate the outbound application event to an outbound native event. This is similar to what you did for the Human Resources application in "Creating the Native Event, Translation, and Application Event for the Human Resources Application". The only difference is that it operates in the outbound direction.
Enter Global NP Ad in the Name field of the Create Native Event Type page.
Click Next.
Select XSD from the Translator list.
Select Create New in the Native Datatype section.
Enter Global NP Ad in the Name field.
Click Browse next to the Content field.
Select Global_Newspaper_Ad.xsd and click Select.
Your selection appears in the Content field.
Click Next.
Select XSD from the Translator list. The translators available for selection are limited to those that can handle the native format you selected in Step 12.
Select Yes from the Preserve Namespaces for Native Instances list.
Select None from the Doctype for Native Instances list. The page refreshes.
Click Next.
Review your selection and Click Finish on the Review page.
The native and application events are created.
Click Global NP Ad in the Name column of the Native Event Types page.
The Native Event Type Details page appears:
Click Event Types > Application Event Types to review the newly created application event.
Select Global NP Ad in the Name column.
Click Expand All in the Event Body Elements section.
The steps you performed in this section translated the outbound application event and its event body element of application event datatypes into an outbound native event with an event body element for the payload (named PAYLOAD).
Remember these datatypes. Later in this tutorial in "Creating the Rules for the Outbound Event Transformation Map", you create a transformation rule to transform the outbound business event and its business datatypes to an outbound application event and its application datatypes.
At this point the Human Resources application includes its own inbound native event, translator, application event, and event body elements of datatypes. The Global Newspaper application includes its own outbound native event, translator, application event, and event body elements of datatypes.
Event maps determine the native event type for a specific record type from an interaction.
Select the Modeling tab.
Select Event Types.
Select Native Event Types.
Select Global NP Ad in the Name column.
Click Create in the Event Map section.
Select Condition expression not specified.
Click Update to create a new event map.
Click Expand All in the Create Condition Expression page.
Select Action.
Select = from the Operator list.
Enter Global NP Ad in the Constant Value field.
Click Apply.
Click Apply on the Create Event Map page.
The event map condition displays in the Event Map section.
For the events you have created to move through and be executed by Oracle Application Server ProcessConnect, you must create roles, a business process, and other modeling metadata. Roles define how events are executed and implement the behavior of the Human Resources and Global Newspaper applications (known as the parties), and the entire integration. The business process spans both applications to coordinate the sending and receiving of events. This management ensures that the Human Resources and Global Newspaper applications send and receive the correct data. Business processes also hide the unique characteristics of the Human Resources and Global Newspaper applications from the integration.
Use the modeling wizard to create the modeling metadata, including the following:
The Human Resources application native role, translation binding role, application role, transformation binding role, and business role
The Global Newspaper application native role, translation binding role, application role, transformation binding role, and business roles
The business process that operates in the middle of these roles
The event transformation maps for both applications with no defined rules (you define these rules later in this tutorial)
The third and final event, known as the business event. At this point, you have already created the native and application events. This business event includes no event body element (you create that element later in this tutorial).
Follow these procedures to create this modeling metadata:
Select the Modeling tab.
Select the Business Processes tab.
Click Create End-To-End Basic Integration in the Shortcuts section.
Enter Placing Ad in the Business Process field.
Select Read File - inbound (xmlRecord) - Inbound from the Inbound Interaction list (for the inbound ad request sent by the Human Resources application). This interaction is available for selection because you:
Added Read File(FileRecord) as the inbound interaction in Step 7 of "Creating the Inbound Interaction for the Human Resources Application Adapter".
Entered xml as the file extension for the incoming file in Step 8.
Select HR New Ad from the Native Event list. This is the native event you created in Step 0 of "Creating the Native Event, Translation, and Application Event for the Human Resources Application".
Enter HR Placing New Ad in the Role Naming Convention field as the naming convention to use for inbound roles.
Select Write File - %TIME%(xmlRecord) - Outbound from the Outbound Interaction list (for the outbound ad request received by the Global Newspaper application). This interaction is available for selection because you:
Added Write File(FileRecord) as the outbound interaction in Step 7 of "Creating the Outbound Interaction for the Global Newspaper Application Adapter".
Entered %TIME% as the file naming convention for the outgoing file in Step 8.
Select Global NP Ad from the Native Event list. This is the native event you created in Step 0 of "Creating the Native Event, Translation, and Application Event for the Global Newspaper Application".
Enter Placing Ad at Global NP in the Role Naming Convention field as the naming convention to use for outbound roles.
Click Next.
Review your selections on the Review page. This page displays two tables:
The upper table, called the Initiating Spoke, shows the roles and events from the Read File - inbound (xmlRecord) - Inbound interaction up through the business process. This is the modeling metadata to be created for the inbound ad request and enables the ad request to be read from the inbound directory of the Human Resources application.
The lower table, called the Invoked Spoke, shows the roles and events from the Write File - %TIME%(xmlRecord) - Outbound interaction up through the business process. This is the modeling metadata that enables the ad request to be written to the outbound directory.
The following messages appear to remind you of tasks to perform after running the modeling wizards.
Beneath both transformation steps:
You will need to populate the rules for this transformation map.
Beneath both SetParty steps:
You will need to select a party for this SetParty step.
Beneath both business events:
You will need to define the elements for this business event.
Click Finish.
The Event Flow Diagram displays after the modeling wizard has completed. This diagram shows the events moving through the various roles of your integration. (See the following portion of the event flow diagram.) The Event Flow Diagram displays after the modeling wizard has completed. This diagram shows the events moving through the various roles of your integration.
Click Integration Diagram at the bottom of the Event Flow Diagram to see all the newly created roles and the business process for which you provided names.
Note that the word Agreement displays in two places. The one on the left is for the Human Resources application and the one on the right is for the Global Newspaper application. After you create agreements for both the Human Resources and Global Newspaper applications (described later in this tutorial), an icon appears beneath each. When you click one of these icons, the details page appears for that application agreement.
The different datatypes of the Human Resources and Global Newspaper applications that you created earlier must be represented as a single, common set of business datatypes to communicate with Oracle Application Server ProcessConnect and participate in integrations. You can manually create business datatypes or import XSD native formats of datatypes into Oracle Application Server ProcessConnect. In this section of the tutorial, you import these datatypes. As an alternative, you can also manually create datatypes by following the instructions in "Manually Creating the Business Datatypes".
You later add these datatypes to the event body element that you create in "Creating the Business Event Body Element".
Select the Modeling tab.
Select Datatypes.
Click Import in the Business Datatypes page.
Select Ad_CommonView.xsd on the Select XSD File page.
Review details about the XSD when prompted on the Translator Properties page.
Select None from the Namespace for Business Datatypes to be Created list.
Click Apply.
The Business Datatypes page appears.
Select name from the Search list.
Enter Ad_Request in the field to the right.
Click Go.
The Ad_Request business datatype appears in the Name column.
Click Ad_Request.
Click Expand All in the Datatype Members section to view the business datatypes.
The modeling wizard you ran in "Creating the Modeling Metadata with the Modeling Wizards" created a business event with no event body element. The business event establishes a common event structure and event vocabulary across the Human Resources and Global Newspaper applications. Business events are completely removed from any Human Resources or Global Newspaper application-specific properties, including data structure and vocabulary. All related events from both applications follow the same structure and the same vocabulary once they are translated and transformed into business events.
The event body element of the business event must contain a complete set of business data (for this tutorial, the business event datatypes created in "Creating the Business Event Datatypes"). You must create an event body element inside this business event that contains the business event datatypes created in "Creating the Business Event Datatypes".
Select the Modeling tab.
Select Event Types.
Select HR_New_Ad from the Name column of the Business Event Types page. This is the business event automatically created with the modeling wizard in "Creating the Modeling Metadata with the Modeling Wizards".
Click Update.
Rename the event type to Ad Request. This gives the event type a more meaningful name.
Click Apply.
Click Create in the Event Body Elements section.
Enter Ad in the Name field.
Select Business Datatype from the Classification list.
Select Unspecified from the Namespace list.
Click the flashlight next to the Name field.
|
Note: To quickly search a long list of datatypes, enter Ad% in the Search field and click Go. |
Select Ad Request and click Select. These are the business datatypes you imported in "Creating the Business Event Datatypes".
Your selection appears in the Name field.
Click Apply.
The Ad event body element is created and the datatypes imported in "Creating the Business Event Datatypes" are added to this Ad event body element.
Click Return to Event Type Details page.
Click Expand All in the Event Body Elements section to view the event body element and its datatypes.
Both the incoming business role and outgoing business role contain this single, common business event and event body element of business datatypes. You use these business datatypes later in this tutorial to create the following transformation rules:
Transform an inbound application event into an inbound business event in "Creating the Rules for the Inbound Event Transformation Map".
Transform an outbound business event into an outbound application event in "Creating the Rules for the Outbound Event Transformation Map".
At this point, the Human Resources and Global Newspaper applications include their own native events, translators, application events, business events, and event body elements of datatypes.
The Human Resources and Global Newspaper applications use different vocabulary in their messages. This creates a vocabulary mismatch. Transformation enables you to standardize on the vocabulary used by both applications in an integration and establish a common structure and vocabulary. To establish this common vocabulary, you must create transformation rules. Transformation rules describe how to transform one data item to another (in this section, from the Human Resources application’s inbound source application event and its application datatypes to an inbound target business event and its business datatypes).
When you ran the modeling wizard in "Creating the Modeling Metadata with the Modeling Wizards", an inbound event transformation map was created with no defined rules. In this section, you define the transformation rules so that a common vocabulary can be established. First, you rename the event transformation map to a more meaningful name.
Select the Modeling tab.
Select Transformations.
Click Update for the first Transform HR New Ad in the Name column. This is the map with an application event type in the Source Parameter Types column and a business event type in the Target Parameter Types column.
Rename the map to HR Ad to Common View.
Click Apply.
Go to the Sources and Targets section.
Click Expand All for both the Sources table and the Targets table. The mapping you perform in this section is very simple and intended for testing purposes.
Select the Ad_ID integer in the Sources table. The application datatypes that appear in the Sources table are the same datatypes you created in "Creating the Native Event, Translation, and Application Event for the Human Resources Application". (View these application datatypes under Step 16.)
Select the Ad_ID integer in the Targets table. The business datatypes in the Targets table are the same datatypes you imported in Step 3 of "Creating the Business Event Datatypes" and included in the business event body element in Step 12 of "Creating the Business Event Body Element". (View these business datatypes under Step 15.)
Select copy:from=integer->to=integer from the Datatype Transformation Map list.
The Transformation Map Details page appears as follows with the selections you made in Steps 8 through 9.
Click Append.
This maps the vocabulary of the source inbound application event to the vocabulary of the target inbound business event. The rule you created displays in the Statements section of this page.
|
See Also: "Transformation Statements Overview" for additional examples of event transformation mapping |
When you ran the modeling wizard in "Creating the Modeling Metadata with the Modeling Wizards", an outbound event transformation map was also created with no defined rules. In this section, you create transformation rules for the Global Newspaper application’s outbound source business event and its business datatypes to the outbound target application event and its application datatypes.
Select the Modeling tab.
Select the Transformations tab.
Click Update for the remaining map named Transform HR Ad in the Name column. This is the map with a business event type in the Source Parameter Types column and an application event type in the Target Parameter Types column.
Rename the map to Common View to Global NP Ad.
Click Apply.
Click Expand All for both the Sources table and the Targets table.
Select the Ad_ID integer in the Sources table. The business datatypes in the Sources table are the same datatypes you imported in Step 3 of "Creating the Business Event Datatypes" and included in the business event body element in Step 12 of "Creating the Business Event Body Element". (View these business datatypes under Step 15.)
Select the Ad_ID integer in the Targets table. The application datatypes in the Targets table are the same datatypes you created in "Creating the Native Event, Translation, and Application Event for the Global Newspaper Application". (View these application datatypes at Step 17.)
Select copy:from=integer->to=integer from the Datatype Transformation Map list.
Click Append.
This maps the vocabulary of the outbound source business event to the vocabulary of the outbound target application event. The rule you created displays in the Statements section of this page.
Select copy:from=string->to=string from the Datatype Transformation Map list.
Click Append. This takes you to the Advanced Transformation Rules page.
Click Expand All for the Targets table.
Select copy:from=string->to=string from the Datatype Transformation Map list.
Select the Action string in the Targets table.
Click Bind Target.
Enter Global NP Ad in the Constant Value field.
Click Bind Source.
Click Apply.
Events are sent to and from the Human Resources and Global Newspaper applications. To ensure that events are sent through the correct roles and arrive at the correct party address, you must update the destination party (in this tutorial, the Global Newspaper application) inside the SetParty step. The modeling wizard automatically created a SetParty step in the business process in "Creating the Modeling Metadata with the Modeling Wizards".
Select the Modeling tab.
Select the Business Processes tab.
Select the process diagram in the Process Diagram column for the Placing Ad business process.
Select Update (Step or Port) from the Action list.
Select SetParty for HR New Ad in the Process Diagram.
Rename to Deliver Ad to Global NP.
Select Global Newspaper from the Party list.
Click Apply.
This section contains the following tasks:
Adding the Delivery Channel for the Human Resources Application Adapter
Adding the Human Resources Application Native Role to the Agreement
Adding the Delivery Channel for the Global Newspaper Application Adapter
Adding the Global Newspaper Application Native Role to the Agreement
Sending the Agreement for Approval
|
See Also: Chapter 15, " Managing Applications and Application Agreements" for additional details about creating application agreements, adding delivery channels and native roles to application agreements, validating application agreements, and sending agreements for approval |
To participate in an integration, electronic agreements for the Human Resource and Global Newspaper applications must be created. Create one agreement for each application. You also select a native role and delivery channel to use in each agreement. Approvers representing both the Human Resources and Global Newspaper applications must review the contents of these agreements and approve them before they can be deployed in an integration.
Create the application agreement for the Human Resources application.
Select the Profiles tab.
Select the Agreements tab.
Click Create in the Application Agreements page.
Enter the following information:
| In this Field... | Enter/Select |
|---|---|
| Name | HR Agreement
|
| Agreement Id | 1
|
| Effective From Date | Leave this field blank |
| Effective To Date | Leave this field blank |
| Application Participant | Human Resources
|
Click Apply.
Add the delivery channel that describes the communication capabilities (such as message exchange and security details) of the adapter for the Human Resources application. You created this delivery channel in "Creating the Delivery Channel for the Human Resources Application Adapter".
Click Add in the Delivery Channels Used section of the Application Participant Details: Human Resources Agreement page
Select HR DC from the Delivery Channel list.
Click Apply.
Add the native role of the Human Resources application to the agreement. The native role implements the behavior of the Human Resources application agreement. You created this native role with the modeling wizard in Step 7 of "Creating the Modeling Metadata with the Modeling Wizards".
Click Add in the Native Roles section of the Agreement Details: Human Resources Agreement page.
Select HR Placing New Ad-NR from the Native Role list.
Click Apply.
Click Validate on the Agreement Details: Human Resources Agreement page.
If validation is successful, the Validate button is replaced with a Send For Approval button and the Draft status that displays in the State field of the Details section is replaced with Validated.
The agreement can be approved by specific persons before it can be deployed in an integration. Approval typically involves assigning these persons as approvers in the Oracle Application Server ProcessConnect user interface tool and exporting the contents of the agreement to an XML file for submittal to these approvers for review. For this tutorial, you do not perform Steps 5 and 6 in this section, during which the XML file is submitted for approval.
Click Send for Approval.
Select approvers (for example, the user admin) from the Available Approvers list.
Click Move to move the approver(s) to the Selected Approvers list.
Click Send for Approval.
Your selection appears in the Approvers section of the Application Details: Human Resources page. The Send For Approval button is replaced with an Approve button and the Validated status that displays in the State field of the Details section is replaced with Pending Approval.
Click Export to export the agreement to an XML file for submittal to a person for approval.
Submit the file to the approvers(s) you selected in Step 5 for approval.
Click Approve. Typically, you perform this task after your approvers notify you that they are satisfied with the agreement. For this tutorial, you do not wait for an approver.
Click Approve again when prompted to confirm.
Create the application agreement for the Global Newspaper application.
Select the Profiles tab.
Select the Agreements tab.
Click Create.
Enter the following information:
| In this Field... | Enter... |
|---|---|
| Name | Global NP Agreement
|
| Agreement Id | 2
|
| Effective From Date | Leave this field blank |
| Effective To Date | Leave this field blank |
| Application Participant | Global Newspaper
|
Click Apply.
Add the delivery channel that describes the communication capabilities (such as message exchange and security details) of the adapter for the Global Newspaper application. You created this delivery channel in "Creating the Delivery Channel for the Global Newspaper Application Adapter".
Click Add in the Delivery Channels Used section of the Application Participant Details: Global Newspaper Agreement page
Select Global NP DC from the Delivery Channel list.
Click Apply.
Add the native role of the Global Newspaper application to the agreement. You created this native role with the modeling wizard in Step 10 of "Creating the Modeling Metadata with the Modeling Wizards".
Click Add in the Native Roles section of the Agreement Details: Global Newspaper Agreement page.
Select Placing Ad at Global NP-NR from the Native Role list.
Click Apply.
Click Validate on the Agreement Details: Global Newspaper Agreement page.
If validation is successful, the Validate button is replaced with a Send For Approval button and the Draft status that displays in the State field of the Details section is replaced with Validated.
You can select an approver to approve the profile data of your agreement. For this tutorial, you do not perform Steps 5 and 6 in this section, during which the XML file is submitted for approval.
Click Send for Approval.
Select approvers (for example, the user admin) from the Available Approvers list.
Click Move to move the approver(s) to the Selected Approvers list.
Click Send for Approval.
Your selection appears in the Approvers section of the Application Details: Global Newspaper page. The Send For Approval button is replaced with an Approve button and the Validated status that displays in the State field of the Details section is replaced with Pending Approval.
Click Export to export the agreement to an XML file for submittal to a person for approval.
Submit the file to the approvers(s) you selected in Step 5 for approval.
Click Approve. Typically, you perform this task after your approvers notify you that they are satisfied with the agreement. For this tutorial, you do not wait for an approver.
Click Approve again when prompted to confirm.
Click the Modeling tab.
Click the Business Processes tab.
Click the Integration Diagram for the Placing Ad business process.
Note that both agreements now display as icons in the Integration Diagram. You can click either agreement to display the agreement details page for that application.
You are now ready to deploy your integration between the Human Resources and Global Newspaper applications. Deployment first involves creating a feature known as a configuration that includes the integration you designed in this tutorial. This configuration is then validated to ensure that your integration is correct and consistent. If validation is successful, the configuration is created. You can then deploy the configuration from the design-time repository to the runtime repository. If validation is unsuccessful, error messages appear that describe what must be corrected.
Select the Deployment tab.
Click Create.
Enter Placing Ad Phase A as the configuration name.
Click Apply. If validation is successful, the configuration is created and the following message appears:
Creation and validation of configuration Placing Ad successful
The Deploy button is now enabled.
If validation is not successful, correct the errors and click Return To Deployment to retry configuration creation.
Click Deploy.
Select High from the BI Reporting Level list.
The business intelligence (BI) level indicates how much the deployment tries to optimize the runtime configuration for performance. Low BI provides the fastest possible performance, but does not log complete information during runtime. This impacts the reports you can later create. High BI provides the most details for reports and troubleshooting.
Click Apply.
If deployment is successful, the configuration is deployed from the design-time repository to the runtime repository and the following message appears:
Deployment finished successfully for configuration Placing Ad Phase A
|
See Also: The following sections for additional details about tasks covered in this section: |
It is now time to test the results of the integration.
Ensure that the integration manager and adapter framework components are running. Both are automatically started after installation. If you are unsure, see Chapter 18, " System Management with Oracle Enterprise Manager 10g" for instructions on viewing component status and, if necessary, starting these components from Oracle Enterprise Manager 10g.
Copy the HR_Ad.xml file to the /start_at_root/ip/tutorial/human_resources/inbound directory. Note that this directory is a combination of the answers you provided to the Human Resources application delivery channel and interaction questions earlier in this tutorial.
This directory is polled by the File/FTP adapter every 10 seconds, as you specified in Step 2. The file is read and deleted from the directory, but only when the native event instance is successfully created. The result file %TIME%.xml is found in the /start_at_root/ip/tutorial/global_newspaper/outbound directory. Note that this directory is a combination of the answers you provided to the Global Newspaper application delivery channel and interaction questions earlier in this tutorial.
If the HR_Ad.xml file is not deleted, perform the following troubleshooting tasks:
Stop and restart the adapter framework.
Check that the directory in the delivery channel for the Human Resources application in combination with the directory for the Read File - inbound(xmlRecord) interaction matches with the directory in which you placed the HR_Ad.xml file. In this tutorial, the directories are as follows:
| For the... | The Directory Is... |
|---|---|
| Delivery channel | /private/Oracle/ip/tutorial/human_resources
|
| Interaction | inbound
|
Location in which to place the .xml file
|
/private/Oracle/ip/tutorial/human_resources/inbound/
|
Check the adapter framework log file and search for AIP (the prefix for error message codes).
If the file is deleted, but no results file appears:
Wait several seconds and verify that no file can be found in the expected directory.
Check that the directory in the delivery channel for the Global Newspaper application in combination with the directory for the Write File - %TIME%(xmlRecord) interaction matches with the directory in which you expect the %TIME%.xml file. In this tutorial, the directories are as follows:
| For the... | The Directory Is... |
|---|---|
| Delivery channel | /private/Oracle/ip/tutorial/global_newspaper
|
| Interaction | outbound
|
Location in which the .xml file is written
|
/private/Oracle/ip/tutorial/global_newspaper/outbound/
|
Create reports
Create a report to determine if the event is stuck in the integration manager or the adapter framework:
Select the Reports tab.
Select the Process Monitoring tab.
Click Finish.
If the adapter framework created the native event successfully, there is at least one event. Click the Details button.
If the event was processed successfully by the integration manager, then there are five events in this list: two native events, two application events, and one business event.
By clicking on the event, you can follow how the event proceeded through the integration manager. If you went from native event to application event to business event to another application and native event, then all translations and transformations processed successfully.
You can expand the status of the roles to verify that all the roles and steps have the status completed (you must do this for each event type). The future plan is for coordination reports to show this end-to-end.
|
See Also: The following sections for additional details about tasks covered in this section: |
After installation, the adapter framework and integration manager are automatically started with default logging. To view errors in, for example, translation or transformation, the logging must be set to debug. This can be done in Oracle Enterprise Manager 10g as follows:
Select the Oracle Application Server ProcessConnect middle-tier instance.
Select the Server Properties link.
Change the settings of parameters with oracle.tip.DiagnosticLevel in their name from error to debug. You typically do not need to restart the adapter framework and integration manger (but do it anyhow).
Check the integration manager log file and search for AIP.
Check the adapter framework log file and search for AIP.
Verify that all agreements and applications are approved. You do this by looking at the details of each application and agreement and verifying that none of the following buttons are present:
Validate
Send for Approval
Approve
If any of these buttons are present, click it and follow the steps in "Task 3: Creating the Agreements" to approve the application or agreement.
Verify that all agreements have a native role defined. Do this by looking at the details of each agreement and verifying that the correct native role is listed for that particular agreement.
If you created the business datatypes by hand, verify that you did not use the space (" ") character. To view the business datatypes of your configuration, select each business event and click Expand All in the Event Body Elements section.
Verify that data flow groups are created only between roles that can have data flows between them. For example, a translation binding role can only have data flows to either native roles or application roles. Verify this by clicking the integration diagram for each modeled business process.
|
See Also: "Updating the Interaction, Native Event, and Application Event" if you must update an application event with a different XSD |
You can also manually model portions of an integration. Up to this point, the tutorial has only used the wizard to generate the metadata for data flow and control flow. Data flows connect step ports and role ports of native, application, and business roles. Control flows between steps indicate the execution order of steps. Control flows connect directly to steps and do not use step ports.
The Create End-to-End Basic Integration wizard generated all the roles, the business process, the ports, the data flows, the control flows, the event types (without the body elements), and the transformation maps (without the rules). In this task, you enhance the existing business process by adding a conditional step and a transformation step. The scenario is as follows: a confirmation comes back from a newspaper. If the confirmation is positive, the business process can finish. If there is an error, human resources must be notified. The transformation step is chosen here simply to show that transformations can also be used in the business process and not only in transformation binding roles. All of the following phases must be completed before a new configuration can be created, deployed, and tested.
This section contains these topics:
Task 3: Creating a Transformation Step to Notify Human Resources
Task 5: Creating a Role Port and Data Flow to Deliver the Ad Problem Event to Human Resources
Task 7: Creating a Role Port and Data Flow to Splitting the Ad Confirmation Event
Task 8: Removing Unnecessary Control Flow (Optional)
|
See Also: The following sections for additional details about tasks covered in this section: |
Before beginning, it is helpful to create the business event(s) you want to model in the business process. It is possible to model the data flows in the business process without the business events, but it becomes harder to read because no event names can be displayed. The business event(s) can be created without any body element and thus without importing or creating any datatypes at this time.
You use the same XSD file in this example to define the business datatypes for the business event body element as you use to define the application datatypes.
Select the Modeling tab.
Select Event Types.
Click Create on the Business Events page.
Enter Ad Confirmation in the Name field.
Click Apply.
Click Create in the Event Body Elements section.
Enter Confirmation in the Name field.
Select Business Datatypes from the Classification list.
Select http://www.oracle.com/global_newspaper from the Namespace list.
Click the flashlight next to the Name field.
Select Confirmation and click Select.
Click Apply.
This creates the body element and its datatypes for the Ad Confirmation business event. This business event is sent if the ad request placement is successful.
Select the Modeling tab.
Select Event Types.
Click Create on the Business Event Types page.
Enter Ad Problem in the Name field.
Click Apply.
Click Create in the Event Body Elements section.
Enter Problem in the Name field.
Select Business Datatype from the Classification list.
Select http://www.oracle.com/human_resources from the Namespace list.
Click the flashlight next to the Name field.
Select Problem and click Select.
Click Apply.
This creates the body element and its datatypes for the Ad Problem business event. This business event is sent if there is a problem with the ad request placement.
In this tutorial, you notify human resources only if there is a problem with the ad placement. If there is no problem, human resources assumes that everything is well. To satisfy these two conditions, you must insert a condition step. A condition step evaluates a specific condition on an event type or datatype. This step is associated with a condition expression. After the condition expression is evaluated, one of the outgoing control flows (either true or false) is executed. In this tutorial, the condition step checks the confirmation event from the newspaper and either ends the process (if placement is successful) or notifies human resources (if a problem occurs).
Condition expressions enable you to define that a specific action be performed in a condition step based on the result of an expression. The conditional expression can either be created after the step is modeled or before as preparation for later use. In this tutorial, you create the expression now so that it is available for selection when you create the conditional step.
Select the Modeling tab.
Select Conditional Expressions.
Click Create.
Enter Ad Placement Confirmed? in the Name field.
Click Apply.
Click Create in the Condition Parameters section.
Enter Ad Confirmation in the Name field.
Select Event Type from the Type list. The page refreshes.
Select Business Event Type from the Classification list.
Click the flashlight next to the Name field.
Select Ad Confirmation and click Select.
Click Apply.
Click Return to List.
Click Create to the right of Expression in the Details section.
Click Update for Condition expression not specified.
Click Expand All for the Left Operand field.
Select Confirmed.
Select = from the Operator list. The page refreshes.
Enter yes in the Constant field.
Click Apply.
Click Apply on the Create Condition page.
Select the Modeling tab.
Select Business Processes.
Click Process Diagram for the Placing Ad business process.
Select Create Step from the Action list.
Click the Deliver Ad to Global NP step.
Enter Ad Placement Confirmed? in the Name field.
Select Condition Step from the Type field. The page refreshes.
Select Ad Placement Confirmed? from the Condition Expression list.
Select Deliver Ad to Global NP from the Step list of the Sequence after section. This places the Ad Placement Confirmed? step after the Deliver Ad to Global NP step.
Select End from the Step list of the first Sequence before section. This places the Ad Placement Confirmed? step before the End step.
Select False from the Guard Value list of the first Sequence before section. A guard value specifies the next step to execute based on the outcome of the condition expression (either true or false) in the condition step.
Select End from the Step list of the second Sequence before section.
Select True from the Guard Value list of the second Sequence before section.
Click Apply.
View the process diagram by clicking Modeling > Business Processes > Process Diagram (for the Placing Ad business process). After the condition expression is evaluated, one of the outgoing control flows (either true or false) you specified is executed.
This task creates the notification event for human resources in case there is a problem. Again, the transformation step is used mainly to demonstrate that transformation steps can be used in the business process to generate new event types (that is, not only in the transformation binding roles). As an alternative, you can also use a pass-through step and perform the transformation in one of the transformation steps in the roles.
As with the conditional step, the event transformation map can either be created before creating the step in the business process or at a later time. In this tutorial, you create the map first, because you must define it in the step.
Select the Modeling tab.
Select Transformations.
Click Create in the Event Transformation Maps page.
Enter Ad Confirmation to Ad Problem in the Name field.
Click Specify Source and Target. The page refreshes.
Enter Ad Confirmation in the Name field of the Source section.
Select Event Type from the Type list of the Source section. The page refreshes.
Select Business Event Type from the Classification list of the Source section.
Click the flashlight next to the Name field of the Source section.
Select Ad Confirmation and click Select.
Enter Ad Problem in the Name field of the Target section.
Select Event Type from the Type list of the Target section. The page refreshes.
Select Business Event Type from the Classification list of the Target section.
Click the flashlight next to the Name field.
Select Ad Problem and click Select.
Click Apply.
Click Expand All for both the Sources table and the Targets table.
Select Ad_ID in the Sources table.
Select Ad_ID in the Targets table.
Select copy:from=integer->to=integer from the Datatype Transformation Map list.
Click Append.
The rule is added to the Statements section.
Select Problem_Details in the Sources table.
Select Problem_Description in the Targets table.
Select copy:from=string->to=string from the Datatype Transformation Map list.
Click Append.
The rule is added to the Statements section.
Select the Modeling tab.
Select Business Processes.
Click the Process Diagram for the Placing Ad business process.
Select Create Step from the Action list.
Click the Ad Placement Confirmed? step.
Enter Notify HR Person in the Name field.
Select Transformation Step from the Type field. The page refreshes.
Select Ad Confirmation to Ad Problem(Ad Confirmation->Ad Problem) from the Transformation Map list. This is the transformation map to associate with this transformation step.
Select Ad Placement Confirmed? from the Step list of the Sequence after section. This places the Notify HR Person step after the Ad Placement Confirmed? step.
Select End from the Step list of the Sequence before section. This places the Notify HR Person step before the End step.
Click Apply.
View the process diagram by clicking Modeling > Business Processes > Process Diagram (for the Placing Ad business process).
Each step is executed when all control flows and data flows reach it. In this example, the End step is only executed when both control flows reach it. Since this is not the behavior you want, you must create an Or step. An Or step waits for at least one incoming control flow. The step is executed as soon as one of the incoming control flows is executed.
Select Create Step from the Action list.
Click the Notify HR Person step.
Enter OR in the Name field.
Select Or Step from the Type field. The page refreshes.
Select Notify HR Person from the Step list of the first Sequence after section. This places the OR step after the Notify HR Person step.
Select Ad Placement Confirmed? from the Step list of the second Sequence after section. This places the OR step after the Ad Placement Confirmed? step.
Select End from the Step list of the first Sequence before section. This places the OR step before the End step.
Click Apply.
View the process diagram for the Placing Ad business process to see your changes.
The Or step waits for at least one incoming control flow. The step is executed as soon as one of the incoming control flows is executed.
The Ad Problem business event must be delivered from the Notify HR Person transformation step out of the business process. To do this, a role port must be created. Role ports define the interfaces for a business process (or role), allowing for re-use.
Select Create Role Port from the Action list.
Click anywhere on the diagram.
Enter Ad Problem Out in the Name field.
Select Output from the Direction list.
Select Business Event Type from the Classification list.
Click the flashlight next to the Name field.
Select Ad Problem and click Select.
Click Apply.
Select Create Data Flow from the Action list.
Select the role port (this is the single red dot on the boundary of the business process).
Click Apply. There is only one available data port already preselected in the list: the output port on the Notify HR Person transformation step.
View the process diagram for the Placing Ad business process to see your changes.
Two of the steps you created require the same business event. The Ad Placement Confirmed? conditional step and the Notify HR Person transformation step each require the Ad Confirmation business event. The way to model both steps that require the same event type is to use a split step. A split step makes multiple copies of the same event type and passes them to each step with which it is linked.
Select Create Step from the Action list.
Click the Deliver Ad to Global NP step.
Enter SPLIT in the Name field.
Select Split Step from the Type list. The page refreshes.
Select Deliver Ad to Global NP from the Step list of the Sequence after section. This places the SPLIT step after the Deliver Ad to Global NP step.
Select Ad Placement Confirmed? from the Step list of the Sequence before section. This places the SPLIT step before the Ad Placement Confirmed? step.
Click Apply.
View the process diagram for the Placing Ad business process to see your changes.
Select Create Role Port from the Action list.
Click anywhere on the diagram.
Enter Ad Confirmation In in the Name field.
Select Input from the Direction list.
Select Business Event Type from the Classification list.
Click the flashlight next to the Name field.
Select Ad Confirmation and click Select.
Click Apply.
Select Create Data Flow from the Action list.
Select the role port (this is the single role port on the edge of the role).
Click Apply. There is only one available data port already preselected in the list: the output port on the Notify HR Person transformation step.
Select Input1.
Click Apply.
Select Create Data Flow from the Action list.
Click one of the two step ports without data flow on the SPLIT step.
Select Ad Confirmation-In (the Port Owner is Ad Placement Confirmed?).
Click Apply.
Select Create Data Flow from the Action list.
Click the step port without data flow on the SPLIT step.
Select Ad Confirmation-In (the Port Owner is Notify HR Person).
Click Apply.
View the process diagram for the Placing Ad business process to see your changes.
When there is a data flow between two steps, the control flow is implicit. This makes the control flow between the SPLIT step and the Ad Placement Confirmed? step redundant.
Click the SPLIT step.
Delete the Ad Placement Confirmed? control flow.
Click Yes.
View the process diagram for the Placing Ad business process to see your final changes.
This section describes how to use the Add Event Flow wizard to add an additional event flow to one of the existing spokes you initially created with the End-to-End Basic Integration wizard in "Task 2: Creating the Modeling Metadata". An event flow is the complete path a single event takes through a spoke. A spoke consists of a role set extending from the native role to the business process. Role ports and data flow connect the role set together.
This section contains these topics:
Task 2: Creating an Event Map for the Global NP Confirmation Native Event
Task 4: Adding an Event Flow to a Spoke with the Add Event Flow Wizard
Task 5: Creating Transformation Statements
|
See Also: The following sections for additional details about tasks covered in this section: |
This task creates the third native event for the integration scenario. The global newspaper delivers a confirmation to Oracle Application Server ProcessConnect. The confirmation tells whether or not the ad is placed.
Select the Modeling tab.
Select Event Types.
Select Native Event Types.
Click Create.
Enter Global NP Confirmation in the Name field.
Select Read File - inbound(xmlRecord - Inbound) from the Interaction list.
Select xmlRecord from the Record Type list.
Click Next.
Select XSD from the Translator list.
Select Create New.
Enter Global NP Confirmation in the Name field.
Click Browse next to the Content field.
Select Global_NP_AdConfirmation.xsd.
Click Next.
Select XSD from the Translator list.
Select Yes from the Preserve Namespaces for Native instances list.
Select None from the Doctype for Native Instances list.
Click Next.
Click Finish.
The native event you created is the second one to use the Read File - inbound(xmlRecord - Inbound) interaction (HR New Ad was the first one). Therefore, you must specify a condition expression to determine which native event to create for the different records passed.
Select the Modeling tab.
Select Event Types.
Select Native Event Types.
Select Global NP Confirmation from the Name column.
Click Create in the Event Map section.
Click Update for Condition expression not specified.
Click Expand All for the Left Operand field.
Select Action.
Select = from the Operator list.
Enter Global NP Ad Confirmation in the Constant Value field.
Click Apply.
Click Apply on the Create Event Map page.
When the global newspaper confirmations are received back from the newspaper, each one must be correlated to the correct ad placement request for which it is a confirmation. Events are correlated either on the presence of a certain datatype or on the content of a datatype. In this case, you correlate the confirmation to the ad based on the Ad_ID datatype.
Select the Modeling tab.
Select Event Types.
Select Native Event Types.
Click Create in the Correlations section.
Use the flashlight to select Global NP Confirmation from the Correlating Native Event Type list.
Click Select.
Use the flashlight to select Global NP Ad from the Correlated Native Event Type list.
Click Select.
Select True from the Directional list.
Click Next.
Click Update for Condition expression not specified.
Click Expand All in the Correlating Native Event Type and Correlated Native Event Type sections.
Select Ad_ID in both sections.
Select = from the Operator list.
Click Apply.
Click Apply.
The Add Event Flow wizard adds an additional event flow to a single, existing spoke. In this case, you add the event flow to the spoke extending from the Placing Ad at Global NP-NR native role to the Placing Ad business process. This is one of the two spokes you initially created with the End-to-End Basic Integration wizard in "Creating the Modeling Metadata with the Modeling Wizards".
Select the Modeling tab.
Select Business Processes.
Click Add Event Flow in the Shortcuts section.
Select Placing Ad from the Business Process list.
Select Placing Ad at Global NP-NR from the Native Role list.
Select Read File inbound(xmlRecord) - Inbound from the Interaction list.
Click Next.
Select Global NP Confirmation from the Native Event list.
Click Use Existing in the Business Event section.
Select Ad Confirmation.
Click Next.
Click Create New in the Transformation section.
Enter Global NP Confirmation to CV.
Click Next.
Click Finish.
The Event Flow Diagram appears with the second event flow added to the existing spoke. The following portion of this diagram is shown.
Select the Modeling tab.
Select Transformations.
Select Global NP Confirmation to CV from the Name column.
Click Expand All for both the Sources table and the Targets table.
Select Ad_ID in the Sources table.
Select Ad_ID in the Targets table.
Select copy:from=integer->to=integer from the Datatype Transformation Map list.
Click Append.
The statement appears in the Statements section.
In this phase, you deliver the Ad Problem business event to human resources. You can use the same spoke to model the problem event back to the human resources system. In this tutorial, however, you create a separate spoke (just imagine that you received the request for an ad placement from a human resources application, but want to send the confirmation using e-mail). The spokes are different, because the human resources application behaves differently from the e-mail system. Again, just imagine, because in this tutorial you only use the File/FTP adapter.
Task 1: Creating a Native Event, Translation, and Application Event
Task 3: Creating Transformation Statements
|
See Also: The following sections for additional details about tasks covered in this section: |
You must also create a native event and specify a translator to translate the outbound application event to an outbound native event.
Select the Modeling tab.
Select Event Types.
Select Native Event Types.
Click Create.
Enter HR Problem in the Name field.
Select Write File %TIME%(xmlRecord) - Outbound from the Interaction list.
Select xmlRecord from the Record Type list.
Click Next.
Select XSD from the Translator list.
Select Create New.
Enter HR Problem in the Name field.
Click Browse next to the Content field.
Select HR_AdProblem.xsd.
Click Next.
Select XSD from the Translator list.
Select Yes from the Preserve Namespaces for Native instances list.
Select None from the Doctype for Native Instances list.
Click Next.
Click Finish.
Because this is the second native event to use the Write File %TIME%(xmlRecord) - Outbound interaction, you must create an event map.
Select the Modeling tab.
Select Event Types.
Select Native Event Types.
Select HR Problem.
Click Create in the Event Map section.
Click Update for Condition expression not specified.
Click Expand All for the Left Operand field.
Select Action.
Select = from the Operator list.
Enter HR Problem in the Constant Value field.
Click Apply.
Click Apply.
In this section, you use the Create Spoke wizard to add a spoke to the existing set of roles, business process, transformation maps, and business event you initially created with the End-to-End Basic Integration wizard in "Creating the Modeling Metadata with the Modeling Wizards".
Select the Modeling tab.
Select Business Processes.
Click Create Spoke in the Shortcuts section.
Click Use Existing.
Select Placing Ad in the Business Process section.
Click Next.
Select Write File - %TIME%(xmlRecord) - Outbound from the Interaction list.
Click Next.
Enter Delivering E-Mail in the Role Naming Convention field.
Click Next.
Select HR Problem from the Native Event list.
Select Use Existing in the Business Event section.
Select Ad Problem.
Click Next.
Select Create New in the Transformation section.
Enter CV to HR Ad Problem.
Click Next.
Click Finish.
Select the Modeling tab.
Select Transformations.
Select CV to HR Ad Problem from the Name column.
Click Expand All for both the Sources table and the Targets table.
Select Ad_ID in the Sources table.
Select Ad_ID in the Targets table.
Select copy:from=integer->to=integer from the Datatype Transformation Map list.
Click Append.
The statement appears in the Statements section.
Select Rule from the Statement Type list.
Click Append.
Click Expand All for both the Sources table and the Targets table.
Select copy:from=string->to=string.
Select System Defined from the Datatype Transformation Map Type list.
Select Action in the Targets table.
Click Bind in the target section.
Enter HR Problem in the Constant Value field.
Click Bind in the source section.
Click Apply.
The statement appears in the Statements section.
Select Problem_Description in the Sources table.
Select Problem_Description in the Targets table.
Select copy:from=string->to=string from the Datatype Transformation Map list.
Click Append.
The statement appears in the Statements section.
In "Selecting the Destination Party in the SetParty Step", you selected the destination party with whom to integrate in the SetParty step of the business process. In this task, you specify the destination party through an alternative method. You set the destination party as part of the event transformation map by using the setToParty event header rule.
Select Event Header Rule from the Statement Type list.
Click Append.
Select setToParty from the Event Header Rule list. The page refreshes.
Click Expand All for both the Sources table and the Targets table.
Select HR Ad Problem-OUT in the Target Event section.
Enter HR Person in the Constant Value field.
Click Apply.
This section describes how to create the HR Person application and agreement.
This section contains these topics:
|
See Also: The following sections for additional details about tasks covered in this section: |
This task creates a third application, also using the File/FTP adapter and using a directory called hr_person.
Select the Profiles tab.
Select the Applications tab.
Click Create.
Enter HR Person in the Name field.
Select the Generic application type from the Application Type list. The application type enables you to group applications of a similar type together.
Click Apply.
Click Add in the Adapter Types section of the Application Details : HR Person page.
Select File/FTP Adapter from the Type list.
Click Apply.
Create a delivery channel for the adapter to use.
Click Create in the Delivery Channels section of the Adapter Type Details page of the adapter.
Enter the following details:
| Field | Enter/Select |
|---|---|
| Name | HR Person DC
|
| File or FTP mode | File |
| Polling interval in milliseconds (inbound) | 10000
|
| Base directory | start_at_root/ip/tutorial/hr_person
where Note: Do not use the |
Click Apply.
Click the Profiles tab.
Select Applications.
Select HR Person in the Name column.
Click Validate.
In this task, you create an application agreement that enables the Human Resource Person application to participate in an integration.
Select the Profiles tab.
Select the Agreements tab.
Click Create in the Application Agreements page.
Enter the following information:
| In this Field... | Enter... |
|---|---|
| Name | HR Person Agreement
|
| Agreement Id | 3
|
| Effective From Date | Leave this field blank |
| Effective To Date | Leave this field blank |
| Application Participant | HR Person
|
Click Apply.
Click Add in the Delivery Channels Used section.
Select HR Person DC from the Delivery Channel list.
Click Apply.
Click Add in the Native Roles section.
Select Delivering E-Mail-NR from the Native Role list.
Click Apply.
Select the Deployment tab.
Click Create.
Enter Placing Ad Phase B as the configuration name.
Click Apply to create a configuration.
Click Deploy to deploy the configuration. (This button is only enabled if Step 4 was successful.)
Select High from the BI Reporting Level list.
Click Apply.
Perform the following steps:
Place the HR_Ad.xml file in the /start_at_root/ip/tutorial/human_resources/inbound directory.
Verify that the file is read by the adapter and deleted.
Confirm the first part of this tutorial is still working by checking that the file ad_%TIME%.xml is in the /start_at_root/ip/tutorial/global_newspaper/outbound directory.
Place the file Global_NP_AdConfirmation.xml in the /start_at_root/ip/tutorial/global_newspaper/inbound directory. This directory is polled by the File/FTP adapter every 10 seconds. The file is read and deleted from the directory, but only when the native event is successfully created.
The ad%TIME%.xml results file is found in the /start_at_root/ip/tutorial/hr_person/outbound directory.
This section demonstrates how business datatypes can be manually created instead of through import of an XSD file.
This section contains these topics:
Select the Modeling tab.
Select Datatypes.
Click Create on the Business Datatypes page.
Select Complex from the Type list.
Enter AdType in the Name field.
Select Unspecified from the Namespace list.
Select Sequence Group from the Model Group list.
Click Apply.
Click Create in the Datatype Members section.
Select Scalar from the Type list.
Enter Title in the Name field.
Select No from the Mandatory list.
Select Core Datatype from the Classification list.
Select Unspecified from the Namespace list.
Use the flashlight to select string for the Name field.
Click Apply.
Click Return to Datatype Details.
Click Create in the Datatype Members section.
Select Scalar from the Type list.
Enter Text in the Name field.
Select No from the Mandatory list.
Select Core Datatype from the Classification list.
Select Unspecified from the Namespace list.
Use the flashlight to select string for the Name field.
Click Apply.
Click Return to Datatype Details.
The new datatype members for the AdType complex datatype appear.
Select the Modeling tab.
Select Datatypes.
Click Create on the Business Datatypes page.
Select Complex from the Type list.
Enter Ad_Request in the Name field.
Select Unspecified from the Namespace list.
Select Sequence Group from the Model Group list.
Click Apply.
Click Create in the Datatype Members section.
Select Scalar from the Type list.
Enter Ad_ID in the Name field.
Select No from the Mandatory list.
Select Core Datatype from the Classification list.
Select Unspecified from the Namespace list.
Use the flashlight to select integer for the Name field.
Click Apply.
Click Return to datatype details.
Click Create in the Datatype Members section.
Select Scalar from the Type list.
Enter Date in the Name field.
Select No from the Mandatory list.
Select Core Datatype from the Classification list.
Select Unspecified from the Namespace list.
Use the flashlight to select string for the Name field.
Click Apply.
Click Return to Datatype Details.
Click Create in the Datatype Members section.
Select Scalar from the Type list.
Enter HR_Contact_Name in the Name field.
Select No from the Mandatory list.
Select Core Datatype from the Classification list.
Select Unspecified from the Namespace list.
Use the flashlight to select string for the Name field.
Click Apply.
Click Return to Datatype Details.
Click Create in the Datatype Members section.
Select Compound from the Type list.
Enter Ad in the Name field.
Select No from the Mandatory list.
Select Business Datatype from the Classification list.
Select Unspecified from the Namespace list.
Use the flashlight to select AdType for the Name field.
Enter 1 in the Minimum field of the Cardinality section.
Do not enter a value in the Maximum field of the Cardinality section.
Click Apply.
Click Return to Datatype Details.
The new datatype members for the Ad_Request complex datatype appear.
You can then include these datatypes in a body element of a business event and in event transformation map statements.
To update an application event (and its corresponding native event), it must first be deleted and then created again. The translator creates the application event based on the record type of a native event. If you use the XSD translator, the application event datatypes are created based on the XSD file provided during the creation of the native event. Before an application event can be deleted, all integration metadata referring to it must no longer do so. For example, when the application event is used in an application role port, the role port must be updated to no longer use that application event. Another example is the transformation. When the application event is used in an event transformation map as a source or target, it must be removed first. The easiest method is to delete the complete spoke before deleting the application event. This works best if the spoke only has a few pass-through steps for handling event flows.
This task demonstrates how to update the HR New Ad application event and delete the HR Placing New Ad spoke after completing phase A of the tutorial (that is, the HR Problem event is not yet modeled).
Task 7: Updating the Agreement to Use a New Native Role
|
See Also: The following sections for additional details about tasks covered in this section: |
Select the Modeling tab.
Select Business Processes.
Click the Integration Diagram for the Placing Ad business process.
Select Delete Spoke from the Action list.
Click HR Placing New Ad-NR.
Click Yes when prompted to confirm your selection.
Select the Modeling tab.
Select Transformations.
Select HR Ad to Common View in the Delete column.
Click Yes when prompted to confirm your selection.
|
Note: Before deleting the HR New Ad native event described in this task, you must first delete the event map associated with this native event. Delete this event map from the Native Event Type Details: HR New Ad page. |
Select the Modeling tab.
Select Event Types.
Select Native Event Types.
Select HR New Ad in the Delete column.
Click Yes when prompted to confirm your selection.
Select the Modeling tab.
Select Event Types.
Select Native Event Types.
Click Create.
Enter HR New Ad in the Name field.
Select Read File -inbound(xmlRecord) - Inbound from the Interaction list.
Select xmlRecord from the Record Type list.
Click Next.
Select XSD from the Translator list.
Select Create New.
Enter HR Ad in the Name field.
Click Browse next to the Content field.
Select HR_Ad.xsd.
Click Next.
Select XSD from the Translator list.
Select Yes from the Preserve Namespaces for Native instances list.
Select None from the Doctype for Native Instances list.
Click Next.
Click Finish.
Select the Modeling tab.
Select Business Processes.
Click Create Spoke in the Shortcuts section.
Click Use Existing.
Select Placing Ad from the Business Process list.
Click Next.
Select Read File -inbound(xmlRecord) - Inbound from the Interaction list.
Click Next.
Enter HR Placing New Ad in the Role Naming Convention field.
Click Next.
Select HR New Ad from the Native Event list.
Select Use Existing in the Business Event section.
Select Ad Request.
Click Next.
Select Create New in the Transformation section.
Enter HR Ad to Common View.
Click Next.
Click Finish.
Select the Modeling tab.
Select Transformations.
Select HR Ad to Common View from the Name column.
Click Expand All for both the Sources table and the Targets table.
Select Ad_ID in the Sources table.
Select Ad_ID in the Targets table.
Select copy:from=integer->to=integer from the Datatype Transformation Map list.
Click Append.
This tutorial uses the following files:
This is the file you selected in Step 6 of "Creating the Native Event, Translation, and Application Event for the Human Resources Application" and in Step 13 of "Task 4: Creating a Native Event".
<?xml version="1.0"?>
<xs:schema targetNamespace="http://www.oracle.com/human_resources" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.oracle.com/human_resources" elementFormDefault="unqualified" attributeFormDefault="unqualified">
<xs:element name="Ad_Request">
<xs:annotation>
<xs:documentation>Comment describing your root element</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="Action" type="xs:string"/>
<xs:element name="Function_Type" type="xs:string"/>
<xs:element name="Date" type="xs:dateTime"/>
<xs:element name="HR_Contact_FirstName" type="xs:string"/>
<xs:element name="HR_Contact_LastName" type="xs:string"/>
<xs:choice>
<xs:element name="phone" type="xs:string"/>
<xs:element name="email" type="xs:string"/>
</xs:choice>
<xs:element name="description" type="xs:string" minOccurs="0"/>
<xs:element name="Ad" type="AdType" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="Ad_ID" type="xs:integer"/>
</xs:complexType>
</xs:element>
<xs:complexType name="AdType">
<xs:sequence>
<xs:element name="Title" type="xs:string"/>
<xs:element name="Text" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
This is the file you selected in Step 7 of "Creating the Native Event, Translation, and Application Event for the Global Newspaper Application".
<?xml version="1.0"?>
<xs:schema targetNamespace="http://www.oracle.com/global_newspaper" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.oracle.com/global_newspaper" elementFormDefault="unqualified" attributeFormDefault="unqualified">
<xs:element name="Ad_Request">
<xs:annotation>
<xs:documentation>Ad placement request definition required by global newspaper</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="Action" type="xs:string"/>
<xs:element name="Date" type="xs:string"/>
<xs:element name="HR_Contact_Name" type="xs:string"/>
<xs:element name="Content_Type" type="xs:string"/>
<xs:element name="Featured" type="xs:boolean"/>
<xs:choice>
<xs:element name=" HR_Contact_Phone" type="xs:string"/>
<xs:element name=" HR_Contact_Email" type="xs:string"/>
</xs:choice>
<xs:element name="description" type="xs:string" minOccurs="0"/>
<xs:element name="Ad" type="AdType" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="Ad_ID" type="xs:integer"/>
</xs:complexType>
</xs:element>
<xs:complexType name="AdType">
<xs:sequence>
<xs:element name="Title" type="xs:string"/>
<xs:element name="Text" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
This is the file you selected in Step 4 of "Creating the Business Event Datatypes".
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified" attributeFormDefault="unqualified">
<xs:element name="Ad_Request">
<xs:annotation>
<xs:documentation>Comment describing your root element</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="Ad_ID" type="xs:integer"/>
<xs:element name="Date" type="xs:string"/>
<xs:element name="HR_Contact_Name" type="xs:string"/>
<xs:element name="Ad" type="AdType" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="AdType">
<xs:sequence>
<xs:element name="Title" type="xs:string"/>
<xs:element name="Text" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
This is the file you selected in Step 4 of "Importing the Business Event Datatypes from an XSD File" and in Step 13 of "Task 1: Creating a Native Event for an Existing Interaction".
<?xml version="1.0"?>
<xs:schema targetNamespace="http://www.oracle.com/global_newspaper" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.oracle.com/global_newspaper" elementFormDefault="unqualified" attributeFormDefault="unqualified">
<xs:element name="Confirmation">
<xs:annotation>
<xs:documentation>Comment describing your root element</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="Ad_ID" type="xs:integer"/>
<xs:element name="Action" type="xs:string"/>
<xs:element name="Confirmed" type="xs:string"/>
<xs:element name="Problem_Details" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
This is the file you selected in Step 4 of "Importing the Business Event Datatypes from an XSD File".
<?xml version="1.0"?>
<xs:schema targetNamespace="http://www.oracle.com/human_resources" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:hr="http://www.oracle.com/human_resources" elementFormDefault="unqualified" attributeFormDefault="unqualified">
<xs:element name="Problem">
<xs:annotation>
<xs:documentation>Comment describing your root element</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="Ad_ID" type="xs:integer"/>
<xs:element name="Action" type="xs:string"/>
<xs:element name="Problem_Description" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="AdType">
<xs:sequence>
<xs:element name="Title" type="xs:string"/>
<xs:element name="Text" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
This is the file you specified in Step 2 of "Task 5: Testing the Results" and in Step 0 of "Task 4: Testing the Results".
<?xml version="1.0" encoding="UTF-8"?>
<n:Ad_Request xmlns:n="http://www.oracle.com/human_resources" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Ad_ID="12345">
<Action>HR New Ad Request</Action>
<Function_Type>Executive</Function_Type>
<Date>1999-05-31T13:20:00-05:00</Date>
<HR_Contact_FirstName>John</HR_Contact_FirstName>
<HR_Contact_LastName>Do</HR_Contact_LastName>
<Content_Type>Ad</Content_Type>
<Importance>6</Importance>
<HR_Contact_Email>john.do@oracle.com</HR_Contact_Email>
<Ad>
<Title>Sales</Title>
<Text>Position available, please write us.</Text>
</Ad>
</n:Ad_Request>
This is the file you specified in Step 4 of "Task 4: Testing the Results".
<?xml version="1.0"?> <n:Confirmation xmlns:n="http://www.oracle.com/global_newspaper" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Ad_ID>12345</Ad_ID> <Action>Global NP Ad Confirmation</Action> <Confirmed>no</Confirmed> <Problem_Details>Credit check not ok</Problem_Details> </n:Confirmation>
This chapter provides a tutorial that takes you through the tasks of designing and deploying an integration. The tasks for Phase A include creating application details, creating modeling metadata, creating agreements, creating and deploying the configuration, and testing the results. Phase B covers more advanced topics, such as creating and integrating an additional application, manually creating business datatypes, and updating the interaction, native event, and application event.