Oracle® Application Server Integration InterConnect User's Guide
10g Release 2 (10.1.2) B14069-02 |
|
Previous |
Next |
This chapter discusses using Oracle Workflow to apply business logic to an integration. It contains the following topics:
OracleAS Integration InterConnect Integration with Oracle Workflow
Using Oracle Workflow with OracleAS Integration InterConnect
Oracle Workflow is integrated with OracleAS Integration InterConnect. In the context of OracleAS Integration InterConnect, Oracle Workflow is used for business process collaborations across two or more applications. A business process collaboration is defined as the conversation between two or more applications in the context of a business process.
OracleAS Integration InterConnect leverages the robust design-time and run-time Oracle Workflow business process definition and execution support to make these business processes explicit and manageable.
Note: Knowledge of Oracle Workflow, its tools, and its Business Event System is required to use OracleAS Integration InterConnect with Oracle Workflow for business process collaboration. For more information about Oracle Workflow, refer to Oracle Workflow Administrator's Guide. |
The following are some of the common business problems that can be solved using Oracle Workflow.
If there is an interaction problem between two or more applications, then the errors arising from the problem can be centrally managed, and suitable remedial actions can be defined and performed.
Example 7-1 Oracle Workflow, OracleAS Integration InterConnect, and Error Management
Consider a situation where it may be required to keep data of an order entry system synchronized with a backend Enterprise Resource Planning (ERP) system. Assume that a new purchase order is created in the order entry system and an attempt is made to create a corresponding new purchase order through messaging by using OracleAS Integration InterConnect in the backend ERP system. The attempt fails. To deal with this scenario, the integrator can use Oracle Workflow to automatically send a compensating message to the order entry system to undo the creation of the purchase order and notify the user who created the order.
In this example, OracleAS Integration InterConnect and Oracle Workflow can be used to model the following for every purchase order that is over $50,000:
Send a notification to a named approver and wait for approval.
If approved, send the message to the ERP system. Otherwise, send a message to the order entry system to roll back the order creation.
OracleAS Integration InterConnect adds human interaction to better capture business processes. In the preceding example, OracleAS Integration InterConnect and Oracle Workflow can be used to model the following:
For every purchase order that is over $50,000, send a notification to a named approver, and wait for approval. If approved, then send the message to the ERP system; otherwise send a message to the order entry system to roll back the order creation.
Fan-in and fan-out of messages can be effectively modeled using OracleAS Integration InterConnect and Oracle Workflow. Fan-in messages involve combining two or more messages into one message. Fan-out messages involve splitting one message into two or more messages.
Example 7-2 Fan-in and Fan-out of Messages
A global organization has a centralized Human Resources ERP application in the United States. Each country has one or more local systems that capture local employee information. If a new employee joins the Japanese branch of this organization, data is entered into a local human resources application and local benefits application. Each entry submits a message for adding this information to the centralized system.
The centralized system needs data from both systems combined and will only commit the data if it was entered successfully in both of the local systems connecting to OracleAS Integration InterConnect. Using Oracle Workflow, this process can be modeled so that OracleAS Integration InterConnect routes messages from both local systems to Oracle Workflow. Oracle Workflow waits until it receives both messages, combines the data, and launches a single message to be delivered by OracleAS Integration InterConnect to the centralized human resources system.
OracleAS Integration InterConnect provides extensive support for stateless routing through event-based and content-based routing features. Using Oracle Workflow, stateful routing can be accomplished. The decision to route can be based on the event or the content of the message.
An internal (organization focused) or external (customer/partner focused) service can be built through a well-defined set of business processes involving communication between two or more applications. For example, a brick-and-mortar retail company wants to provide an online procurement service to their customers. Behind the user interface are several business processes controlling communication across several internal applications to deliver a robust, high-performance service to the customer.
Note: The ability to define explicit business process collaborations is a feature, not a requirement for completing integrations. It is not necessary to use Oracle Workflow for integration if the business process definition is simple enough to be implicitly captured in the messaging through the core functionality in iStudio. |
This section describes how OracleAS Integration InterConnect and Oracle Workflow are integrated. It includes the following sections:
During design time, business process and event definitions in iStudio can be deployed to Oracle Workflow. Consequently, Oracle Workflow tools can be launched from within iStudio to graphically create process diagrams in the context of enterprise integration through OracleAS Integration InterConnect.
Using iStudio, the following Oracle Workflow tools can be used:
Oracle Workflow Builder: Use this tool to complete business process definitions defined and deployed through iStudio. Oracle Workflow Builder creates the process diagrams as shown in Figure 7-1.
Oracle Workflow Home Page: Use this tool for centralized access to the Web-based features of Oracle Workflow. The Business Event System management and administration is a key feature on this page as shown in Figure 7-2.
See Also: For more information about the Business Event System, refer to Oracle Workflow Administrator's Guide |
OracleAS Integration InterConnect integrates with the Business Event System of Oracle Workflow. The Business Event System is an application service that uses the Advanced Queuing infrastructure to communicate business events between systems. OracleAS Integration InterConnect registers itself as an external system in Business Event System so the following conditions exist:
Messages can flow from applications through OracleAS Integration InterConnect, in the common view format, to the Business Event System. The messages will either trigger an event or continue Oracle Workflow business processes, as defined by iStudio processes and described in Oracle Workflow Builder diagrams.
Messages can flow from the Business Event System to OracleAS Integration InterConnect in the common view format to applications to either continue or end Oracle Workflow business processes.
At run time, Oracle Workflow is integrated with OracleAS Integration InterConnect at the hub. Messages are passed between OracleAS Integration InterConnect and the Business Event System of Oracle Workflow by using Advanced Queues. The OracleAS Integration InterConnect Oracle Workflow Communication Infrastructure facilitates this communication.
At design time, to keep the integration methodology consistent, iStudio reuses the messaging paradigms of publish/subscribe and request/reply to specify communication between OracleAS Integration InterConnect and Oracle Workflow. For inbound Oracle Workflow messages, an iStudio user can specify using a business process, which events Oracle Workflow should subscribe to and which procedures Oracle Workflow should implement. For outbound messages, events Oracle Workflow can publish and procedures it can invoke can be specified.
OracleAS Integration InterConnect can be used with Oracle Workflow. The following steps describe, in general terms, how to apply business logic:
Model Business Process. The user designs the business process using iStudio, and then deploys the process bundles from iStudio to a WFT
file. Next, the user will complete the process diagrams in Oracle Workflow Builder using the WFT file.
Deploy Business Processes for Run Time. The user will deploy the events to the Business Event System by using iStudio. Next, the user will deploy the process diagram to the database by using Oracle Workflow Builder.
To model the business process:
Design process bundles by using iStudio.
Deploy process bundles from iStudio to a WFT
file.
Complete process diagrams in Oracle Workflow Builder by launching Oracle Workflow Builder from iStudio and by using the deployed WFT
file.
This section describes how iStudio and Oracle Workflow work together in OracleAS Integration InterConnect. It also has instructions about how to use iStudio and Oracle Workflow during design time for business process collaborations across applications. This section includes the following topics:
A process bundle is a set of logically related business processes. The process bundles map one-to-one with an Oracle Workflow item.
A business process contains a set of OracleAS Integration InterConnect common view events or procedures that must be routed through Oracle Workflow in one Oracle Workflow business process. These events and procedures manifest themselves as Oracle Workflow business events and can be used to define a process diagram in Oracle Workflow Builder. It is a one-to-one mapping between OracleAS Integration InterConnect and Oracle Workflow Builder.
Activities in iStudio enable the user to define the common view events and procedures that must be a part of an Oracle Workflow business process. The following are types of activities in iStudio:
Publish Event: Oracle Workflow publishes an OracleAS Integration InterConnect common view event. At deployment time, a business event corresponding to the common view event is created in the Business Event System.
Subscribe Event: Oracle Workflow subscribes to an OracleAS Integration InterConnect common view event. At deployment time, a business event corresponding to the common view event is created in the Business Event System.
Invoke Procedure: Oracle Workflow invokes an OracleAS Integration InterConnect common view procedure. At deployment time, two business events corresponding to the common view procedure are created in the Business Event system. One event is for sending the request, and the other is for receiving the reply.
Implement Procedure: Oracle Workflow implements an OracleAS Integration InterConnect common view procedure. At deployment time, two business events corresponding to the common view procedure are created in the Business Event System. One event is for receiving the request, and the other is for sending the reply.
The following table describes how iStudio and Oracle Workflow concepts are mapped.
iStudio Concept | Oracle Workflow Concept | Mapping |
---|---|---|
Process Bundle | Item | One-to-one |
Business Process | Business Process | One-to-one |
Common View Event | Business Event | One-to-oneFoot 1 |
Common View Procedure | Business Event | Two business events for each procedure |
Publish Activity | Send Event Activity | One-to-one |
Subscribe Activity | Receive Event Activity | One-to-one |
Invoke Activity | Send Event Activity (for the request) |
|
|
Receive Event Activity (for the reply) |
|
Implement Activity | Send Event Activity (for the reply) |
|
|
Receive Event Activity (for the request) |
|
To create a process bundle using iStudio:
From the project list, click Workflow, and expand the subtree.
Right-click Process Bundles, and select New. The Create Process Bundle dialog box is displayed.
Enter the name of the process bundle in the Process Bundle Name field.
Click OK.
To create a business process:
From the project list, expand the process bundle for the business process to be created.
Right-click Business Processes, and select New. The Create Business Process dialog box is displayed.
Enter a name for the business process in the Business Process Name field.
Click OK.
To populate a business process with activities:
From the project list, select a business process.
Right-click the business process and in the context menu, select the activity to be part of the business process. Select from the following activities:
Publish Activity: Oracle Workflow sends a message to OracleAS Integration InterConnect in the context of the business process.
Subscribe Activity: Oracle Workflow receives a message from OracleAS Integration InterConnect.
Invoke Activity: Oracle Workflow sends a request message to OracleAS Integration InterConnect and receives a reply.
Implement Activity: Oracle Workflow receives a request from OracleAS Integration InterConnect and sends a reply.
For example, select the Subscribe Activity. The Subscribe Activity Wizard is displayed.
Select an event for the activity.
Click Finish.
Repeat these steps for adding other activities to the process.
Note: When you create multiple activities under a business process, the list of activities is unordered because the order in which the activities are added is not important. The order can be defined in Oracle Workflow Builder through a process diagram. |
After populating business processes with activities, the information must be deployed to Oracle Workflow to graphically model a business process. To deploy this information to Oracle Workflow:
In the Deploy tab in iStudio, right-click Workflow, and select Deploy To Workflow. The Deploy dialog box is displayed.
There are two sets of information that need to be deployed, either independently or together:
Oracle Workflow Business Events: Business Events need to be created in the Business Event System. This is a requirement for run time only. You can deploy these after all design-time work, including modeling the process, is complete.
Note: iStudio checks if an event is already deployed before deploying it. You can redeploy all events at any time. If you deploy an event after all design-time work, then you don't have to redeploy the event. |
To check if events have been deployed, launch the Oracle Workflow Home page.
Oracle Workflow Process Definitions through WFT
file generation: Information about business processes captured in iStudio provides a foundation for building process diagrams in Oracle Workflow Builder. Deploying process definitions is required for design time.
Note: When deploying process definitions, iStudio prompts for a filename. If an existing file is specified, then iStudio will overwrite the file. As a result, if there are existing process definitions in a file modified using Oracle Workflow Builder, then do not select that file name as the target; otherwise, all modifications made will be lost. |
By default, both choices are selected. The dialog box also enables the following to be automatically launched:
Oracle Workflow Builder: Defines business process diagrams.
Oracle Workflow Home Page: Verifies Business Event deployment.
By default, these choices are unselected. Choose to launch these tools with deployment, or complete this task at a later time by using the Design tab.
Select a choices, and click OK.
If deploying event definitions to the Oracle Workflow Business Event system is selected, the following dialog box is displayed.
Enter the required information based on the selections made during Oracle Workflow installation, and click OK.
If Deploying Process Definitions to a WFT
file was selected, then a Deploy To Workflow dialog box is displayed.
Enter the name and location of the file to create, and click OK.
Note: When deploying process definitions, iStudio prompts for a file name. If an existing file is specified, then iStudio will overwrite the file. If there are existing process definitions in a file modified using Oracle Workflow Builder, then do not select that file name as the target; otherwise all modifications made will be lost. |
Oracle Workflow tools can be directly accessed through iStudio. You do not need to start Workflow independently. The following sections discuss how to launch Oracle Workflow tools in iStudio.
To launch the Oracle Workflow Home page:
In the Design tab in Studio, right-click Workflow.
Select Launch Workflow Homepage. The Workflow Homepage dialog box is displayed.
Ensure that the URL is correct, and click OK. The Username and Password Required dialog box is displayed.
Enter the login information for the Oracle Workflow home page, and click OK. The Oracle Workflow home page is launched using the default browser.
To launch Oracle Workflow Builder:
In the Design tab in iStudio, right-click Process Bundle to view in Oracle Workflow Builder.
Select Launch Workflow Builder. The Deploy To Workflow dialog box is displayed.
Select an existing WFT
file name to load into Oracle Workflow Builder. The assumption is that a process definition has already been deployed to a file.
Oracle Workflow Builder is launched depending on which process definition file is selected.
Note: To launch Oracle Workflow Builder outside of a specific OracleAS Integration InterConnect process bundle, right-click Workflow and select Launch Workflow Builder. |
When modifying existing Oracle Workflow processes, do not add, modify, or remove OracleAS Integration InterConnect event activities directly in Oracle Workflow Builder. Always make event-related process changes in iStudio, redeploy to the file, and import in Oracle Workflow Builder.
For example, the following steps must be carried out to create an integration-related Oracle Workflow business process:
Create a process bundle in iStudio and create business processes with some activities.
Deploy to the my_process_bundle.wft
file.
Import the file into Oracle Workflow Builder.
Make non-event modifications to the process in Oracle Workflow Builder, such as adding notifications or decision functions to complete the business process.
Save the modified process to my_process_bundle.wft
.
If two new events need to be added to the business process, then use the following guidelines:
Using iStudio, make the additions to the particular business process.
Deploy to a different file such as changes_to_my_process_bundle.wft
. Do not deploy to my_process_bundle.wft
because any non-event modifications made through Oracle Workflow Builder will be lost.
Launch Oracle Workflow Builder and import both my_process_bundle.wft
and changes_to_my_process_bundle.wft
.
Move the required modifications from the process representing changes_to_my_process_bundle.wft
to the process representing my_process_bundle.wft
.
Save the modified process to my_process_bundle.wft
.
The my_process_bundle.wft
file now contains the updated process definition.