Академический Документы
Профессиональный Документы
Культура Документы
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( kon e to u
J AIN icens
RK l
NA
KO
Oracle SOA Suite 12c: Build
Composite Applications
Student Guide Volume II
D84361GC10
Edition 1.0 | November 2014 | D89148
Jay Kasi publish, license, post, transmit, or distribute this document in whole or in part without
the express authorization of Oracle.
David Mills
The information contained in this document is subject to change without notice. If you
Ted Witiuk find any problems in the document, please report them in writing to: Oracle University,
Pete Laseau 500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not
warranted to be error-free.
Tom Barrett
Restricted Rights Notice
Editors If this documentation is delivered to the United States Government or anyone using
Vijayalakshmi Narasimhan the documentation on behalf of the United States Government, the following notice is
applicable:
a ble
Smita Kommini
f e r
U.S. GOVERNMENT RIGHTS
an s
Publishers
n - t r
The U.S. Governments rights to use, modify, reproduce, release, perform, display, or
disclose these training materials are restricted by the terms of the applicable Oracle
Michael Sebastian
a no
license agreement and/or the applicable U.S. Government contract.
iii
SOA Run Time 1-39
Quiz 1-40
Agenda 1-41
Production Environment: Example 1-42
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
iv
Creating an Adapter 2-29
Summary 2-30
Practice 2 Overview 2-31
Application Navigator 2-32
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
v
Summary 3-30
Practice 3-1 Overview 3-31
Practice 3-2 Overview 3-32
Practice 3-3 and 3-4 Overview 3-33
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
vi
Quiz 5-8
Agenda 5-9
JMS Specification: Definition 5-10
JMS Message 5-11
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
6 Introduction to BPEL
Objectives 6-2
Agenda 6-3
Business Processes and BPEL 6-4
Parts of a BPEL Process 6-5
vii
BPEL, WSDL, and XSD 6-6
Partners, Partner Links, and Roles 6-7
Variables in BPEL 6-8
Interacting with Partners 6-9
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
viii
Structured and Extension BPEL 2.0 Activities 7-16
Summary 7-18
Practice 7 Overview 7-19
Before You Begin 7-22
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
ix
Recovering Faults with Enterprise Manager Fusion Middleware Control 8-41
Accessing a Recoverable Fault 8-42
Recovering a Fault Condition 8-43
Summary 8-45
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
x
Summary 9-37
Practice 9 Overview 9-38
Objectives 10-2
Agenda 10-3
Design-Time Metadata Services (MDS) Repository 10-4
Quiz 10-6
Agenda 10-7
Templates: Overview 10-8
Creating and Using Templates 10-10
Using Project Templates 10-11
a ble
Using Service Component Templates 10-12 f e r
ans
Using BPEL Scope Activity Templates 10-14
n - t r
Quiz 10-15
Agenda 10-16 a no
h a s
) ide
BPEL Subprocesses: Introduction 10-17
o m u
Stand-Alone Subprocess 10-19
m c nt G
b
ni Stude
Calling a Stand-Alone Subprocess 10-20
Inline Subprocess 10-21 i
j a in@ this
Comparing Stand-Alone and Inline Subprocesses 10-22
a r k se
kon e to u
Creating an Inline Subprocess 10-23
(
Calling an Inline Subprocess 10-24
AIN icens
Creating a Stand-Alone Subprocess 10-25
J
RK l
Calling a Stand-Alone Subprocess from BPEL 10-27
NA Differences Between Templates and Subprocesses 10-28
KO Quiz 10-29
Summary 10-30
Practice 10 Overview 10-31
xi
Adding an Operation Binding 11-12
The Finished Binding Component 11-13
Testing the Component 11-14
Examining the Results 11-15
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Quiz 11-16
Summary 11-17
Practice 11 Overview 11-18
Practice 11-1 to 11-4: Overview 11-19
xii
Practice 12-1 to 12-3 Overview 12-34
Practice 12-4 to 12-6 Overview 12-35
Objectives 13-2
Agenda 13-3
Problem Statement 13-4
Event Delivery Network 13-5
Aligning SOA and EDA Through EDN 13-6
Events: Introduction 13-7
XSD 13-8
Event Definition Language 13-9
a ble
Event Publication 13-10 f e r
ans
Event Subscription 13-11
n - t r
Event Publication and Subscription 13-12
Quiz 13-13 a no
h a s
) ide
Agenda 13-14
o m u
Creating an Event Definition 13-15
m c nt G
b
ni Stude
Configuring a Mediator to Publish Events 13-16
i
Configuring a Mediator to Subscribe to Events 13-17
j a in@ this
Setting Event Delivery Consistency 13-18
a r k se
kon e to u
Publishing Events in BPEL Components 13-19
(
Subscribing to Events in BPEL Components 13-20
AIN icens
Managing Events from Enterprise Manager 13-21
J
RK l
Viewing Event Subscriptions 13-22
NA Quiz 13-23
KO Summary 13-24
Practice 13 Overview 13-25
xiii
Test Case File 14-13
Creating Emulations 14-14
Emulating Events in a Test Case 14-15
Creating Assertions 14-16
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Quiz 14-18
Agenda 14-19
Selecting the Test Cases to Run 14-20
Running the Test Cases 14-22
Examining Results of a Test Run 14-23
Quiz 14-25
Agenda 14-26
Troubleshooting Guidelines 14-27
a ble
Debugging SOA Composite Applications with the SOA Debugger 14-29 f e r
ans
Starting the Debugger 14-30
n - t r
Setting Breakpoints in Services 14-31
Setting Breakpoints in BPEL 14-32 a no
h a s
) ide
Initiating Debugging 14-33
o m u
Examining Values 14-34
m c nt G
Frames 14-35 b
ni Stude
i
Stepping Through the Application 14-36
j a in@ this
Ending a Debug Session 14-37
a r k se
kon e to u
Summary 14-38
(
Practice 14-1 to 14-3 Overview 14-39
AIN icens
Practice 14-4 Overview 14-40
J
RK l
O NA15 Securing Composite Applications and Invoking Secured Services
K Objectives 15-2
Agenda 15-3
Web Service Security: Introduction 15-4
Securing Endpoints: Examples 15-7
Quiz 15-8
Agenda 15-9
Oracle Web Services Manager 15-10
OWSM Policy Framework 15-11
Components of Oracle Web Services Manager Architecture 15-12
Policies: Introduction 15-13
Policy Assertions 15-14
Types of Security Tokens 15-15
Security Assertion Markup Language (SAML) 15-17
Security Policies: Introduction 15-18
Quiz 15-19
xiv
Agenda 15-20
Securing SOA and Identity Propagation 15-21
Attaching a Policy to an Inbound Request 15-22
Attaching a Policy to an Inbound Request by Using Oracle JDeveloper 12c 15-23
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
A Request-Response Patterns
Request-Response Patterns A-2
a ble
One-Way Message Interaction A-3 f e r
ans
Synchronous Interaction A-5
n - t r
Asynchronous Interaction A-7
One Request, Multiple Responses A-8 a no
h a s
) ide
One Request, a Mandatory Response, and an Optional Response A-9
o m u
c nt G
Asynchronous Interaction with Timeout Pattern A-11
m
b
ni Stude
Asynchronous Interaction with a Notification Timer Pattern A-12
i
One Request, One of Two Possible Responses A-13
j a in@ this
Multiple Requests, Multiple Responses A-15
a r k se
kon e to u
Multiple Requests, First Response A-16
(
BPEL Deployment Descriptor Properties A-17
J AIN icens
RK l
NA
KO
xv
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
KO
N
ARK
J l
(
AIN icens
a r j a
kon e to u
k se
i
in@ this
b m
o
ni Stude
m ) h a
c nt G u
a
ide
s
n no
- t r an
s
f e r a b
le
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Human Tasks
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
BPEL The
TheBPEL
BPELactivities
activitieswe
weve
have
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
visited
visited
thus
thus
farfar
represent
represent
the
execution of BPEL code or
service invocations.
a ble
f e r
an s
n - t r
a no
h a s
m ) contrast,idaetask in a human
In
c o G
workflow urepresents the work
b t
m enthat needs to be done by a
i
in Stud person (user, role, or group).
@
in this
r k j a
n a u s e
( ko e to
Copyright 2014, Oracle and/or its affiliates. All rights reserved.
J AIN icens
l to as work items. Each task is associated with parameters that
areKalso referred
Tasks R
NA the nature and data related to the task.
describe
O
K
initiate parameters
Portals
Service Deadlines Client
Interface and Interface Email and
Escalations
RSS
a ble
Clients
f e r
n
Phone
a sand
Presentation r
n-t Notification
Other
a no Channels
h a s
o m )
u ide
m c Directory
Identity
n t G
b
ni (for de LDAP)
example,
i t u
j a in@ this S
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce processes require human interactions with the process. For
N AR humans may be needed for approvals, exception management, or performing
Many end-to-end
example,
business
KOactivities that are required to advance the business process. The human task service
component provides the following features:
Human interactions with processes, including assignment and routing of tasks to the
correct users or groups
Deadlines, escalations, notifications, and other features that are required for ensuring
timely performance of a task (human activity)
Presentation of tasks to end users through a variety of mechanisms, including a Worklist
application (Oracle BPM Worklist)
Organization, filtering, prioritization, and other features that are required for end users to
productively perform their tasks
Reports, reassignments, load balancing, and other features that are required by
supervisors and business owners to manage the performance of tasks
a ble
f e r
an s
n - t r
a no
h a s
They can also be added to
a BPEL process as part of o m )
u ide
an orchestrated interaction. m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i cein a composite application is associated with a BPEL process and is
N AR as part of the business process flow. However, a human task can also be added as
Typically,
integrated
a human task
KOa stand-alone component. A stand-alone human task component is useful when there is no
need for automated activity in the application. In this case, the client application creates the
task itself by interacting with the operations that are exposed from the human task
component.
At run time, the business logic and processing rules of the human task service component are
executed by the human workflow service engine. All human task service components,
regardless of the SOA composite application of which they are a part, are executed in a single
human task service engine on their deployed platform.
Double-click the
component to display
the task editor.
Select Expose as a
SOAP Service to expose
the task to clients of the
composite application.
The configuration is
stored in a .task file. a ble
f e r
an s
n - t r
Tabs on the left side of
the editor provide access a no
to categories of
h a s
configuration parameters.
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i cecreate a human task component in the composite. During creation, if
A R
In the Composite Editor,
N
you select Create Composite Service with SOAP Bindings, the human task is exposed to the
KOclients of the composite application. These clients interact with the human task service by
using its operations and associated message structures. Whether the component is exposed
or not, it can be associated with a BPEL process component.
Configure the task details (such as outcomes) and data for the parameters. These task detail
settings are saved to an XML file in the project with a .task extension that maintains the task
metadata. The human task metadata (.task) file stores workflow pattern configuration data,
including:
Task details, such as title, payload, and other properties
Routing slip configuration to specify:
- The task flow: Simple, sequential, parallel flow, ad hoc workflow, and For Your
Information (FYI) tasks. An FYI task is a notification scenario that does not require
the task assignee to perform any action on the task information.
- The assignment and routing policy (assignment of a task to a user, group, or role;
static or dynamic assignment; rules based on task outcome or payload content and
title)
- The escalation, renewal, and expiration criteria
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
The configuration options
m c nt G
are organized into
categories. in
i b de
t u
j a in@ this S
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i cetask component in the SOA composite application or a BPEL process,
N
the AR file is opened in the Human Task Editor, where you can configure task parameters
After creating
.task
a human
KOand properties. The editor enables you to configure settings that are organized into sections,
including:
General: To specify the task title, description, task outcomes, task category, task
priority, and task owner. Many of these can be literal values or dynamically determined.
Data: To define the task parameter structures (types) that are included with the task
payload that is sent to the task management service. Task parameters can be displayed
and modified in the Worklist application.
Assignment: To assign participants to the task and create task routing policies for the
workflow definition
Deadlines: To specify the expiration duration of a task
Notification: To create and send notifications when a user is assigned a task or
informed that the status of the task has changed
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
Set a priority for the task. b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce the title for the task, a priority, a task owner, and a comma-
N AR list of outcome strings. The default outcomes are APPROVE and REJECT, but
General task
separated
details include
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
The Editable via worklist check box
enables users to modify the task m c nt G
parameters in the Worklist application. ini
b de
t u
j a in@ this S
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i e
cthe
A R
Task parameters form structure of information passed to the Task Service. If you generate
aN
Task Form with the information included, task parameters can be displayed in the Worklist
KOapplication so that a task assignee can view and optionally modify the data.
To add a task parameter, perform the following steps:
1. Click the Add Task Parameter icon (the plus symbol) in the Parameters section.
2. In the Add Task Parameter dialog box, perform either of the following:
- Select the Type option to browse for a desired type, and then enter the parameter
name.
- Select the Element option to browse for an XSD element. In this case, the
Parameter Name field is set based on the chosen element name.
3. Click OK.
To allow the assignee to modify task parameter values in the Worklist application, select
Editable via Worklist. Changes made to the task parameter data are returned to the BPEL
process in the task payload along with the task outcome.
Multiple task parameters can be added to a task definition. Each parameter must be supplied
with values. The preceding two steps define the task parameter data structure that is passed
as the payload to the Task Service.
assign
assignthe
those
participants
participants whowho
will will
review
review
and
andthose
those
whowhowillwill
receive
receive
errors.
errors.
a b le
f e r
an s
n - t r
a no
h a s
o m )
u idaesingle participant
m c nt Gor multiple participants in
Add
b
ni Stude
@ i serial or parallel.
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
On theR K
Assignment l you configure the route that the task will follow. You also assign the
tab,
NA who will review and those who will receive errors. The icons on the Component
Oparticipants
K Palette allow you to add a single participant or multiple participants in serial or parallel.
The choices are:
Single: Specifies that any single person from a list can action the task. The task
completes when any of the assignees actions the task.
Parallel: Specifies when multiple users, who are working in parallel, must act
simultaneously on the task. Completion depends on a voting percentage specified, or
setting a majority or unanimous vote.
Chain: Specifies a list of participants for a workflow to act on the task in sequence
FYI: Specifies that a task is sent to a user for notification purpose. The business process
does not wait for a user action. An FYI task does affect the task outcome.
To add the desired participant type, drag the appropriate icon onto the stage in the central
canvas. The Add Participant Type window is displayed.
a b le
f e r
an s
n - t r
a no
h a s An LDAP application
m ) i d e
typically serves as the
co nt G u source of participant
i b m e information.
@ in Stud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R
Click the Add icon inl the Participant list section. Select to add a user, a group, or an
K
O NA role. The Identity Lookup window opens. This window enables you to look up the
application
K user, group, and application role names that are configured in an identity server, such as an
LDAP server.
In addition, you can select to build a list of participants by using different strategies, such as:
A static list of names, or a list that is dynamically populated by using an expression
A management chain that enables definition of the starting assignee and the number of
levels to process up the management chain to a specified top assignee
Rule-based, in which business rules determine the list of assignees based on conditions
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce you configure the assignees to whom the task is routed and
N ARhow the task is routed to those assignees. When you first display the Assignments
In the Assignment
specify
section,
KOsection, you are provided with a single stage and no participants. In simple terms, assignment
and routing comprise:
Stages, which organize the approval process for a block of participant types
Participants, who are created by using an editor (a participant list builder). The
sequence in which the assignees are added indicates the execution sequence.
Assignments and routing can be structured in complex ways with multiple stages, with each
stage having its own collection of participants (assignees) to whom the task can be assigned
depending on routing policy settings. As shown in the slide, you can add additional stages
that are processed in serial, in parallel, and by using a combination of both.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
Escalate after sets the number of m c nt G
b
ni Stude
i
levels and the highest approver title.
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce in the Deadlines section of the Human Task Editor include:
A R
The options that are available
N
KO Never Expire: The task remains in the system until acted on by a participant.
Expire after: A period can be determined as a fixed number of days, hours, and
minutes, or as a dynamically calculated period based on an expression.
Renew after: The expiration period is extended when a participant does not respond
within the specified time period. You limit the number of renewals before final expiration.
Escalate after: A task is escalated up a management chain by a specified number of
levels if a user does not respond within the time period specified.
Note: An expiration duration set in the Limit allocated duration to field, for a participant type
level, takes precedence over the settings specified in the Deadlines section (routing slip
level).
a ble
Double-click the human f e r
task activity to open the an s
configuration dialog box. n - t r
a no
When the configuration dialog box h a s
is closed, an <if> activity is
o m )
u ide
created to process each of the
m c nt G
possible outcomes of the task. b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i cein a BPEL process, add a human task activity to the process flow.
R
To create
Athe a human task
O N
When Create Human Task window opens, select an existing task definition or create a
K new human task. After you click OK, a .task file is created and opened.
Configure the human task properties by selecting an XML element from a BPEL variable
whose type is compatible with the task parameter definition. The source of data can be an
XML fragment, an expression, or a partner link.
The following components are created in the BPEL process:
A partner link for the human task service
A Scope containing the activities that assign task parameters to the variable, invoke the
task service, and wait for the task outcome in the response
An If activity containing an <if> branch for each outcome specified in the .task file.
You can add additional activities to these branches to implement the process activities
that are needed to manage the returned outcome.
Note: If the task definition specifies task parameters that can be modified by the task service,
the CopyPayloadFromTask Assign activities are generated with a single copy operation to
copy the modified task payload data to the BPEL variable that is defined as a task parameter
in the task definition. Otherwise, the CopyPayloadFromTask Assign activities are generated
without a copy operation, and can be deleted unless you want to reuse them for your own
purposes.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( kon e to u
J AIN icens
RK l
N A
KO
component.
a. True
b. False
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i c e
ARb
Answer:
N
KOA human task can be used as a stand-alone component within a composite application, and
any of its operations can be invoked as a service if its WSDL interface is exposed as a
service. Mediator components can be wired to a human task for sending messages in a For
Your Information (FYI) task scenario. For more complex human workflow patterns, it is more
common to use a human task from the context of a BPEL process.
Note: The FYI task is a form or notification that does not require the task assignee to perform
an action when receiving the task information.
Human Tasks
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
Task parameters obtained
m c nt G
from a task payload definition b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i e
cincludes
A R
If the SOA composite a human task, you need a way for users to interact with the
N The integrated development environment of Oracle SOA Suite includes Oracle ADF,
task.
KOwhich enables you to design a task display form that depicts the human task in the SOA
composite.
A task form is a Java Server Page XML (.jspx) file that defines how a task payload (from
task parameters) is displayed in the Worklist application. When you create an ADF task flow
based on a human task, you must select a task metadata file to generate the data control.
This data control is used to lay out the content on the page and connect to the workflow
service engine at execution time to retrieve the task content and act on tasks. A task form can
be auto-generated for a simple interface that contains task parameters, or you can generate a
custom task form. The example shows the steps to auto-generate a simple task form:
1. Right-click the human task activity and select Auto Generate Task Form.
2. In the Create Project window, enter a new project name, such as ApprovalTaskForm,
for the ADF task form application files, and click OK.
Note: The Directory field is automatically populated and can be changed by entering or
browsing for a directory name.
3. (Optional) Modify the task form, save any changes, and close the JSP tabbed page.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
Task flows can be deployed
with their related composite m c nt G
b
ni Stude
applications. i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
J
K deploy e
lictask
BeforeRyou the display form files, the composite application that utilizes them
A
N already be deployed.
should
KO After deploying the composite application, you can deploy the task display forms by right-
clicking the Application menu and selecting the Deploy option. When you create a generic
project and add the ADF task form based on human task files, a deployment profile is created
for the project and for the application workspace in which the project resides. Using the
Application Menu Deploy option deploys the EAR file that is identified by the projects
deployment profile in the Application Properties, instead of the Project Properties.
Note: The Oracle SOA Suite 12c server automatically associates the task display form URI
with the human task for which it was generated.
a ble
f e r
an s
n - t r
By default, the Oracle WebLogic Managed server a no
h a s
instances have an embedded LDAP server, which can
m )
be used for authentication and authorization.
o u ide
LDAP
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce application is a web application that is installed with Oracle SOA
R
The Oracle
A12c BPM Worklist
N
Suite components. To access the Worklist application, use the following URL:
KOhttp://host:port/integration/worklistapp.
The Worklist application login page is displayed. Log in to the application with a username
that is authorized to use the Worklist application.
KO The Worklist application provides a default webpage with task information, excluding task
details. By using Oracle JDeveloper to generate task display forms, you can view task details,
which are rendered in the browser. The task display form can also render an Action menu and
buttons. The action for an assigned task can be completed on either of the following:
The Worklist application page that contains the task information
The task form that displays the task parameter details. If the task parameter data is
configured to be modifiable at design time, users can view and save modified values
before they perform a selected action on the page.
Note: If task data is modified, changes must be saved before applying a selected action.
In the pane that contains the list of assigned tasks, you can select a task and perform an
action that is available in the Action menu, such as APPROVE or REJECT. The action items
correspond to the task outcomes configured in the human task component metadata.
Note: If you have not generated task forms, the Worklist application does not display any
information in the bottom-right pane. However, you can still apply an action to the tasks that
appear in the Inbox.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
Answer: a K
J l i ce
N
True AR
KO
Human Tasks
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
interface interface
WebLogic Domain
JMS
a ble
f e r
XMPP EMAIL SMPP Extension drivers ans
n - t r
a no
h a s
o m )
u ideservers
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce tasks, notifications are often part of applications that include
N ARtasks. The notification service enables an asynchronous message to be sent to a user
Although
human
not part of human
KOby a specific channel. The message can be sent as an email message, a voice message, a
text message, or an instant message. Actionable notifications enable users to respond.
Oracle SOA Suite 12c is configured with the Oracle User Messaging Service (UMS)
application that enables composite application components (such as a BPEL process and
human task, Web Service clients, and Java applications) to send notifications through email,
voice, IM, or SMS messaging channels.
Message channels are configured with drivers that handle the sending of messages to and
receiving of messages from devices that are associated with that type of channel through an
appropriate server or channel service provider.
SMS channels
Supports two-way messaging (sending and receiving
messages)
Provides user messaging preferences, enabling users to
configure how and when to receive notifications
Integrates with Fusion Middleware components through: a b le
f e r
BPEL notification activities, such as email, IM, and voice
a n s
Human workflow notifications that also provide o n -t r
actionable
messages s an
Oracle BAM alerts for monitored events) ha ide
c om t Gu
i b m en
@ in Stud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
OracleR
UMSK enablesl two-way communication between users and composite applications. It
O NA operations that can be invoked from the BPEL business process or human task to
exposes
K send notifications through the email, voice, IM, or SMS channels. Oracle UMS is integrated
with a human workflow, enabling notification messages to be delivered for different events
and enabling actionable email messages to be implemented.
Oracle UMS supports:
Sending and receiving messages and statuses
Sending notifications to a specific address on a particular channel
Sending notifications to a set of failover addresses
The email channel is configurable out of the box. To configure additional UMS driver
channels, you need to deploy the driver JEE application EAR file and ensure that you have
access to a service provider for the type of channel driver deployed.
Oracle UMS tracks the delivery status information that is provided by messaging gateways, so
that applications can respond to a failed delivery. Applications can specify one or more
failover addresses for a message in case of delivery failure to an initial address. This
capability frees application developers from having to implement complicated retry logic.
Changes require
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a server restart.
1
3
a ble
f e r
ans
n - t r
a no
h a s
2 o m Set)notification
u i demode and email
m c nproperties t G as appropriate.
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce services are communicated through Oracle UMS components.
AR the workflow notification properties, use Enterprise Manager Fusion Middleware
The workflow
ToNconfigure
notification
KOControl and access the SOA Infrastructure page menu by performing the following steps:
1. In the Target Navigation Pane, expand the SOA folder and right-click soa-infra.
2. In the context menu, select SOA Administration > Workflow Properties.
3. On the Workflow Notification Properties page, set the notification mode to All (or Email).
Set other email properties as appropriate to your email server configuration. Click Apply.
Note: After making changes to the workflow notification properties, you must restart the SOA
server.
1
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a b le
f e r
ans
n - t r
3
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce the Workflow notification properties, configure the user messaging
R
In addition
Adriver to configuring
O N
email settings to ensure that the email server and protocol settings are correctly
K specified. To access and configure the user messaging email driver settings, perform the
following steps:
1. On the Workflow Notification Properties page, click the Go to the Messaging Driver
page link. Alternatively, on the Enterprise Manager Control page, in the Target
Navigation pane, expand the User Messaging Service folder and click
usermessagingserver (soa_server1).
2. On the User Messaging Service page, click the Configure Driver icon in the User
Messaging Email Driver row entry.
3. On the User Messaging Email Driver page, enter the email driver properties and other
driver-specific configuration settings. These include mail protocols, such as Post Office
Protocol (POP3), the outgoing Simple Mail Transport Protocol (SMTP) server name, and
the incoming server name, among other settings. Click Apply.
4. After confirming the changes to be made, restart the WebLogic Managed server (SOA
server) instance.
a ble
f e r
ans
n - t r
a no
h a s
3
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i e
cview
A R
You can monitor and the notification activity performed by the human workflow service
N To view and test the human workflow notification activity, perform the following steps:
engine.
KO 1. In Enterprise Manager, in the Target Navigation pane, expand the SOA folder and right-
click soa-infra.
2. In the context menu, select Service Engines > Human Workflow.
3. On the Human Workflow Engine page, click the Notification tab. You can examine any
notification messages in the Outgoing Notifications and Incoming Notifications sections.
If you click Send Test Notification, the Send Test Notification window is displayed.
4. In the Send Test Notification window, you can select the notification channel type to test
(provided that it has been configured) and send a message. In the example, the Email
channel is selected for the test.
Note: The test message mechanism uses BPEL notification activities to send test messages.
The messages that are sent appear in the list in the Outgoing Notifications section. The
example message in the Outgoing Notifications section is actually from the human task of a
composite application that is identified by the WORKFLOW value in the Source column.
BPEL Process
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Email
notification
User
Messaging
a ble
Email Driver f e r
ans
SMTP
n - t r
IMAP/POP
a no
h a s
o m )
u ide
Email
m c ntimplemented G Email activity is
server b
ni Stude
as a scope.
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
The BPEL process component provides different ways to notify users through email, IM, SMS,
NTwitter activities. The example in the slide implements email notification by:
and
KO Dragging an Email service icon into the BPEL process and configuring the details for
sending the email
Configuring the email settings provided by the email activity
The email activity parameters can be static strings or can be dynamically derived from the
data held in the BPEL process variables. Each field (except From Account) enables you to
build an XPath expression to construct its value by clicking the XPath Expression Builder icon
on its right.
Configuring the incoming and outgoing mail server information is performed on the User
Messaging Service Email Driver page in Enterprise Manager Fusion Middleware Control.
Note: An email notification may contain multipart attachments along with the message.
a ble
f e r
ans
n - t r
The user notification activity:
a no
Sends a message to a
h a s
users preferred channel
Enables additional o m )
u ide
properties to be sent
m c nt G
with the message b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce enables a BPEL process design in which a notification channel is
N
not AR specified during design time, and simply indicates that a notification must be
The user notification
explicitly
activity
KOsent. The notification channel used is resolved at run time based on the user preferences
defined on the Notifications tab of the Worklist application, or in the User Messaging
Preferences user interface of Oracle UMS. Therefore, the responsibility of notification channel
selection is moved from Oracle BPEL Designer to the end user. If the end user has not
selected a preferred channel or rule, email is used by default.
Note: To access the User Messaging Preference user interface as a stand-alone application,
enter the following URL: http://localhost:8001/sdpmessaging/userprefs-ui. Remember to
replace localhost and the port with values that are suitable for Oracle SOA Suite installation.
A composite application is
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a ble
f e r
an s
n - t r
a no
h a s
m ) Database
i d eand notification
c o tG u
external references
@ in Stud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
RK l
NA
KO
m ) review i d e
provides a chance to
u
co nt G before approving or and edit the details
m
i nib Stude rejecting the order.
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
A Database adapter is
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a ble
f e r
ans
n - t r
An email task advises
a no
h a
their order.
s
customers of the status of
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
Objectives
Templates
BPEL Subprocesses
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( kon e to u
J AIN icens
RK l
N A
KO
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
Answer:RbK
J lice
O NAWhen artifacts are moved into the repository, all dependencies are included and
False.
K references to the transferred artifacts are updated with the correct MDS URLs on transfer.
Templates
BPEL Subprocesses
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
integral part of the application and can be customized going forward. When changes are made
to the original template, they are not reflected in the composites and components that are
created through templates.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( kon e to u
J AIN icens
RK l
N A
KO
Default Location
Custom Location
a b le
f e r
Create Template
an s
Wizard
n - t r
a no
h a s
m ) i d e MDS Repository
co nt G u
m
i nib Stude
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i e
cright-click
A R
To create a template, the appropriate object and select Create Template to invoke
NCreate Template wizard. You specify a name and location for the template. The location
the
O
K can be the design-time MDS Repository, the default location in the file system, or a custom
location that you specify. After completing any additional prompts specific to the template type
selected, the template (with any dependencies) is saved to the specified location.
Select
Start from: SOA Template
Specify the
desired template.
a ble
f e r
an s
n - t r
a no
The project is
h a s
created from
the template. o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
aK
To useR
J lice in the Create SOA Application wizard, select the start type: SOA
project template,
NA Then, specify the desired template.
Template.
O
K
1
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
2
Select the specific template.
a ble
f e r
3 ans
n - t r
Review the template
information and click Finish. a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce template, right-click in the Components swimlane of the composite
R
1. To use
Aoverviewa component
N window. Select Insert > Component Template.
KO2. Select the specific template.
3. Click Finish.
a ble
f e r
ans
n - t r
a no
The component and any
h a s
4 dependencies
to the project.
are added
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i e
ctemplate
A R
4. When a component is used, the service component and its dependencies are
N to the project.
added
O
K
Component Palette.
1
o m )referenced
u dinethe template
ifound
m c nBPEL to
t G project. in the
those
i nib Stude 3
@
in this
r k j a
n a u s e
( ko e to
Copyright 2014, Oracle and/or its affiliates. All rights reserved.
J AIN icens
R
1. Scope l
Kactivity templates can be added to a BPEL process from the Component Palette.
A
2. NWhen the scope is added, you are prompted to resolve any naming conflicts (if the project
KO
references files that are also named in the process).
3. You then bind any variables that are referenced in the template to those found in the BPEL
project.
a. SOA Project
b. Partner Link
c. Component
d. External Reference
e. Scope Activity le
r a b
s f e
- t r an
n no
s a
h a
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
Answer:Ra, Kc,Jand elice
O NA components (such as BPEL processes), and scope activities can be packaged as
Projects,
K templates.
Templates
BPEL Subprocesses
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
business logic
Can include partner links and references
Can be invoked from other parent BPEL processes
through a call activity
Do not have an interface (compares to a subroutine in an
object-oriented programming language)
r a ble
Execute completely in the context of the parent process,
n s fe
- trafault
permitting access to process variables and inheriting
n
handling and compensation logic a no
s ha de
)
c om t Gui
i b m en
@ in Stud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R K limitedl support for modularizing business process logic for reusability. The only
BPEL provides
O NA is to package reusable process logic as completely separate processes, which are
method
K utilized by the parent process (the process utilizing the reusable process logic), in a method
that is identical to using a web service (through the Invoke activity).
To address this challenge, Oracle SOA Suite provides a subprocess extension to BPEL.
A BPEL subprocess is actually not a complete process, but a fragment that modularizes a
reusable piece of business logic. This fragment can include partner links and references, and
can be invoked from other parent BPEL processes through a new call activity.
A subprocess does not have an interface like a standard BPEL process does. You can at best
compare it to a subroutine in an object-oriented programming language. At run time, it executes
completely in the context of the parent process, permitting access to process variables and
inheriting fault handling and compensation logic.
a ble
f e r
an s
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i cisenot a valid business process, but is a self-contained snippet of
N ARlogic. All references in its process snippet resolve to local definitions or arguments,
A subprocess
process
element
O
K which are defined in the partner links and variables sections of the subprocess.
Note: This contrasts with an inline subprocess, which allows unresolved references to
variables and partner links that are in-scope at the call activity.
A subprocess can converse with partners synchronously (InOut) or asynchronously (InOnly).
The partner link for these interactions can be passed as an argument from a parent process or
configured within the subprocess.
Note: For asynchronous requests, the conversation ID for the WS-Addressing or normalized
messages is set with the parent process instance ID. This enables routing of callback
messages to the correct process instance.
a b le
f e r
a n s
A call activity transfers control to the n t r
-subprocess.
There is no service invocation.
o
nArguments in the
call activity map in-scope s avariables and partner
h a
links to subprocess
argumento ism
)
passed eitheru idbyevalue or reference.
element parameters. Each
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
e
K J BPELlicprocess,
Within R
a parent a call activity transfers control to the subprocess. There is no
A
N invocation. Therefore, no inbound message activity is required to consume the
service
KO
message from the call activity, and no Reply or Invoke activity is required to return the value.
This is analogous to executing a member function; control is transferred to the implicit
subprocess scope on call activity activation, and back after scope activity completion.
There may be multiple inputs and outputs through arguments. Arguments in the call activity
map in-scope variables and partner links to subprocess element parameters. Each argument is
passed either by value or by reference, as specified in the call activity. Upon activation, the
subprocess scope is initialized with the input variables, which are set with the call activitys
arguments. Outputs are pass-by-value parameters that are written to by the subprocess.
An inline subprocess is a
subprocess embedded in
a ble
another (parent) process.
f e r
ans
n - t r
a no
Arguments in the a
variables and)partner hcallsactivity map
linkseto the inline
subprocess omelement id
uparameters. The
c
m in scope t G
i b subprocess
d e n at the time of the call.
can also refer to other
@ in Stu items
j a i n t h is
a r k s e
n
ko e to
Copyright 2014, uOracle and/or its affiliates. All rights reserved.
(
J AIN icens
R
An inline K
subprocess l is a subprocess that is embedded in another (parent) process.
AN
A
O call activity executes the referenced subprocess code. Arguments in the call activity map in-
K scope variables and partner links to the inlineSubProcess element parameters. Arguments
can be passed by reference or by value.
The call activity transfers control to the subprocess, at which time the subprocess scope is
initialized with the argument variables. In addition to parameter passing, other visible items
(those in scope at the time of the call activity) can be referred to by the inlineSubProcess
element.
Execution is similar to the subprocess element execution model. On completion of the
subprocess, control is returned to the parent process. In the normal case, execution continues
with the next activity after the call activity. In the case of abnormal subprocess completion, the
parent process resolves the process according to the standard life cycle rules of WS-BPEL.
Is a fragment of a BPEL process that Is useful for groups of activities that are
includes a number of activities that are reused within one BPEL process
reused across other BPEL processes
r a ble
Can be called from any BPEL process in Is part of the parent BPEL process code
n s fe
the same composite and is not visible in the composite
n - traview
Does not have an interface, and can be Can be called only from a ntheo parent BPEL
called only from another BPEL process. It process. It can use
h a sthe partner
parentlinks and
can include partner links. in-scope variables ) ofid e
the process.
c om t Gu
Defines the parameters to set
i b m edefine
Can either n the parameters to set or
a ble
f e r
ans
n - t r
a no
h a s
) ide
Assign a name, and if
2 desired, add a label and/or o m u
an image.
m Byc default,
n t G
the scope is
b 3
ni Stconverted de to a call activity.
i u
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i cecreated from process scope activities. To create an inline subprocess,
N
first AR and configure a scope with the activities that will define the subprocess. To convert
Inline subprocesses
create
are
KO
the scope to a subprocess, perform the following steps:
1. Right-click the scope and select Convert to a Subprocess. The Create Inline Subprocess
dialog box is displayed.
2. Name the subprocess. Typically, you leave the Replace Scope with Subprocess Call
check box selected. This automatically replaces the current scope with a Call activity.
3. Click OK. A call activity replaces the scope in the process.
The subprocess is also displayed in the palette under Subprocesses. You can see and edit the
definition of the subprocess when switching from the Main Process to the subprocess at the top
of the BPEL editor. All partner links that are available in the main process are displayed, in
case you want to add another Invoke. Changes to the subprocess are reflected in every call.
The subprocess is
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a ble
f e r
an s
n - t r
a no
h a s
m ) is ide
A call activity
c o
generated. G u
b m en t 3
i
in Stud
@
in this
r k j a
n a u s e
( ko e to
Copyright 2014, Oracle and/or its affiliates. All rights reserved.
J AIN icens
anK
To call R l
inline subprocess, perform the following steps:
A
KO1.N Expand the Subprocesses section of the Component Palette. All available subprocesses
are displayed.
2. Drag the desired subprocess from the Component Palette to the BPEL process. A new
call activity is added to the process.
3. Configure the call activity to map any necessary values from the parent process to the
subprocess.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u i de
Name the subprocess
2 and click OK. m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ceBPEL subprocess, perform the following steps:
A R
To create a stand-alone
N
O1. Create a SOA composite application that includes a BPEL 2.0 process. Right-click in the
K SOA Composite Editor and select Insert > Subprocess. The Create Subprocess dialog
box is displayed.
2. Enter appropriate values or accept the default values, and click OK to create the stand-
alone subprocess.
a ble
f e r
an s
n - t r
4
Configure the subprocess,
adding the required logic and a n5o
variables. Save your work.
h a s The subprocess is
m ) e
id as an .sbpel
stored in the project
o
c nt G u file.
m
i nib Stude
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
3. Right-click the subprocess in the SOA Composite Editor and select Edit.
N Design the desired process logic in the stand-alone subprocess. This can include
4.
KO variables, activities, and partner links.
5. The subprocess is stored in the composite as an .sbpel file.
Notes about subprocess design:
A stand-alone subprocess can include an inline subprocess.
There is no restriction on one BPEL subprocess calling itself recursively. You must
determine if you want to recursively call the same BPEL subprocess and the number of
times the subprocess calls occur.
A stand-alone subprocess cannot be shared in the MDS Repository. However, a BPEL
process with call activities for calling the subprocess can be shared in the MDS
Repository.
activity. You can drag and drop a template onto a SOA composite
application or a BPEL process and make additional changes. You
essentially are copying and pasting a template. For example, if there
are 50 lines of code in a template and you copy it twice to use, the
code increases by 100 lines.
a ble
f e r
A subprocess is a BPEL code snippet that is intended for a specific a n s
n -t
purpose. A subprocess can be called and used as it is. An inline
r
o
a nprocess code
subprocess of 50 lines can be called twice and the parent
s
remains at 50 lines, and not 100. Subprocesses h
) a ebetter
perform and
om
have a smaller memory footprint than templates. u i d
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
Answer:RaK
J lice
O NAAn inline subprocess can either define the parameters to set or can use parent process
True.
K values. Stand-alone subprocesses require that you define the parameters to set.
a ble
f e r
an s
n - t r
n o 3
1 s a You create and
You first import a ) a
h decall an inline
collection of templates
c o m Gui BPEL subprocess.
from a JAR file. m ent
i b
@ in Stud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
1. InR K practice,l you first import a collection of templates into the SOA Design Time
this
O NARepository.
K 2. You create a project and use a BPEL component template to accelerate the development
of the project.
3. You modify the project. These modifications include the creation and calling of a BPEL
inline subprocess.
You test the finished project.
KO
N
ARK
J l
(
AIN icens
a r j a
kon e to u
k se
i
in@ this
b m
o
ni Stude
m ) h a
c nt G u
a
ide
s
n no
- t r an
s
f e r a b
le
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
Objectives
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
REST: Overview
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
Resources are
a ble
typically described with
f e r
either XML or JSON.
an s
n - t r
XML
JSON resource a
Each resource has itsno
a s
own address or
h
o m )
Uniform Resource
u ide
m c nt G Identifier (URI).
b
ni Stude
i
http://<host>:<port>/soa-infra/resources/<partition-name>/relative/resource/path
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i e
cRepresentational
A R
REST stands for State Transfer.
N REST provides an alternative to using SOAP-based web services.
KO It incorporates the concept of resources. A resource is similar to an object instance in an
object-oriented programming language. Resources have data associated with them. The
underlying concept is that when you send a request for a resource, the resource that is
returned shows you the options for the next step. This model is very flexible, and does not
require that the client know in advance what services and service calls are available.
REST services rely on a stateless, client-server, cacheable communications protocol
and in virtually all cases, the HTTP protocol. RESTful applications use the HTTP verbs
GET, PUT, POST, and DELETE to create, update, read, and delete data.
RESTful services do not impose constraints on the data format that is exchanged. Data
can be formatted as XML, HTML, JavaScript Object Notation (JSON), and so on.
REST services themselves are often described with a Web Application Description
Language (WADL) document.
http://soa12c.example.com/items/123
REST SOAP
m en c
i b
@ in Stud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R
REST is an l style, whereas SOAP is a message exchange standard. Comparing
K architectural
O NAis much like comparing apples and oranges, but in practical terms, they describe ways to
them
K access web services. As such, the table in the slide lists some features of each. These
differences in features mean that in some situations, REST offers advantages, and in others,
SOAP is the better choice.
REST SOAP
Operations with limited Operations that require
bandwidth and resources contextual information and
- Mobile conversational state
- Series of short, chatty management
conversations Asynchronous operations
a ble
Stateless operations Operations that require high f e r
levels of security and an s
reliability n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i e
crequire
A R
For web services that robust security, transactions, and reliability, SOAP can leverage
NWS* standards, and would typically be a better choice. However, because of its use of URIs
the
O
K and lighter-weight message formats such as JSON, REST can offer better performance and
scalability. REST is well-suited for situations such as mobile computing, which are constrained
by limited bandwidth and resources.
REST: Overview
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
a ble
f e r
ans
n - t r
Oracle SOA Suite a no
composite applications
h a s
can also be exposed
o m )
u ide
as a REST service.
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i cebe used to expose and consume REST services.
N AR
The REST adapter can
KO
a ble
Provide a relative path
f e r
for the resources.
an s
n - t r
a no
h a s
o m )
u ide
Name the operation, resource
m c nt G
path, and HTTP verb. b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce you provide a name and an optional description, and identify it as
N AaRservice or a reference. You then provide a relative path (URI) for the resources.
To create
either
a REST binding,
O
K Finally, you bind the operation, the resource path, and the HTTP verb.
a ble
f e r
ans
n - t r
Describe the request and a no
response messages.
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce the HTTP verb (method) is selected from a drop-down list. You then
N ARthe request and response messages by using the Type Chooser.
When adding
describe
the binding,
KO
http://<host>:<port>/soa-infra/resources/<partition-name>/PackAndShipService/packingService/shipping
a ble
f e r
an s
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce binding component, the resource URI, and a sample HTTP
N AR including both the header (the method or verb can be found here) and the payload
The slide
message,
shows the finished
O
K (in this example, the XML message).
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i e
ccan
A R
The component WADL be observed from within JDeveloper.
KON
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
ofK
TestingR
J lice can be completed by using the HTTP analyzer in JDeveloper. The
the component
O NA in the slide shows a request message being sent, and the response received. In this
example
K example, the status field of the message was updated by the called operation.
a. XML
b. URIs
c. SOAP
d. JSON
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
Answer:RbK
J lice
O NAqueries use URIs to describe resources.
REST
K
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
a ble
f e r
ans
1
n - t r
a no
h a s
2 o m )
u ide
m c nt G
b
ni Stude
JDeveloper i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
1. InR
J
K practice,
this
cemodify the HelloBPEL composite application by exposing it as a
liyou
O NAREST service.
K 2. You test the service from JDeveloper.
3. You create a second composite that invokes the REST service, passing the required
resource.
4. You deploy the two composites and verify that they interact as expected.
KO
N
ARK
J l
(
AIN icens
a r j a
kon e to u
k se
i
in@ this
b m
o
ni Stude
m ) h a
c nt G u
a
ide
s
n no
- t r an
s
f e r a b
le
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
Objectives
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
Dynamic processing
Rules can perform routing within a business process based
on service-level agreements or other guidelines.
Externalization of business rules in a business process
Many conditions must be evaluated in a business process.
The parameters for these conditions can be changed r a ble
independently of the process. n s fe
ra n -t
Data validation and constraint checks n o
s a
Validate input documents or apply constraints
) ha deon requests.
Human task routing c om t Gui
Policy-based task assignments i b m to especific n roles or users
i n Stu d
Load balancing ofintasks @ among is users
r k j a t h
n a u s e
( ko e to
Copyright 2014, Oracle and/or its affiliates. All rights reserved.
J AIN icens
DynamicR Kprocessing:l Rules can perform intelligent routing within a business process based
onN A
service-level agreements or other guidelines. For example, if a customer requires a
O
K response within one day, send a loan application to the QuickLoan loan agency only. If the
customer can wait longer, route the request to three different loan agencies.
Externalization of business rules in the process: There are typically many conditions that
must be evaluated as part of a business process. However, the parameters for these conditions
can be changed independently of the process. For example, you provide loans to only those
customers with a credit score of at least 650. This value may be changed dynamically based on
new guidelines set by business analysts.
Load balancing of tasks among users: When a task is assigned to a set of users or a
role, each user in that role acquires a set of tasks and acts on them within a specified
time. For new incoming tasks, policies may be applied to set priorities on the tasks and to
put them in specific user queues. For example, a specific loan agent is assigned a
maximum of 10 loans.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( kon e to u
J AIN icens
RK l
N A
KO
a b le
f e r
a n s
If customer is a Premium customer, THEN apply a 10% discount.
n -t r
o
s an
) ha de
c om t Gui
i b m en
@ in Stud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
K form, al business rule can be expressed as an if/then statement. The IF part
In its simplest
R
O NAone or more business terms. If the tests pass, one or more actions are performed in the
tests
K THEN part, such as adding or changing business terms.
The rule IF part is composed of conditional expressions (rule conditions) that refer to facts.
Example: IF Rental_application.driver age < 21
The conditional expression compares a business term (Rental_application.driver age) to the
number 21 by using a less-than comparison.
The rule condition activates the rule whenever a combination of facts makes the conditional
expression true. In some respects, the rule condition is like a query over the available facts in
the Rules Engine, and for every row that is returned from the query, the rule is activated.
The rule THEN part contains the actions that are executed when the rule is fired. A rule is fired
after it is activated and it is selected among other rule activations by using conflict resolution
mechanisms such as priority. A rule might perform several kinds of actions. An action can add
facts, modify facts, or remove facts. An action can execute a Java method or perform a function
that may modify the status of facts or create facts.
Rules fire sequentially rather than in parallel. Note that rule actions often change the set of rule
activations and thus change the next rule to fire.
Working Memory
Decision Table R1 R2 R3
KO
combinations of property values. You can use a Decision Table to create a set of rules that
covers all combinations, or a set of rules in which no two combinations conflict.
You write rules and Decision Tables in terms of fact types and properties. Fact types are often
imported from the Java classes, XML schema, or Oracle ADF Business Components View
Objects. They can also be created in the Rules Designer.
THEN needsApproval=true()
orderTotal
needsApproval
a ble
f e r
an s
approvalLimit
n - t r
A global represents a
Working Memory a no
data value or an
h a s
expression that can
m ) or constant.
Globals
i d ecan be variable
be evaluated in rule
c o tG u They are
conditions and
i b m en similar to public static
expressions.
@ in Stud variables in Java.
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R
A global K
represents al data value or an expression that can be evaluated in rule conditions and
O NA
expressions. For example, if a 10% discount is used in several rules, you can create and use a
K defaultDiscount global variable, so that changes to the value need to be carried out in only
one place while the discount is applied to many rules in the dictionary.
Globals are named types that can be based on object, string, or standard primitives, and can be
used in rule definitions and actions.
Globals can be variable or constant. They are visible to all the rulesets in the dictionary. A
global is similar to a public static variable in the Java language.
A ruleset is a collection of
one or more related rules
and Decision Tables.
Ruleset
IF/THEN a ble
IF/THEN
IF/THEN f e r
ans
n - t r
Rulesets and Decision Tables a no
are seen as a unit of h a s
execution and can be chained o m )
u ide
together. m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce are grouped in an Oracle Business Rules object called a ruleset. A
N AR
Rules and
ruleset
Decision Tables
is a collection of one or more related rules and Decision Tables that are seen as a unit
KO
of execution and that can be chained together to yield an outcome. A ruleset provides a
namespace, similar to a Java package, for rules and Decision Tables.
Create or import
1
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
ADF-BC Facts
h a s
o m )
u ide
Rule
5
m c nt G Rule
IF condition
condition1THEN
THENaction
i ib tude Define Business Policies
naction
j a in@ this S
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i cefacts, functions, globals, value sets, and rulesets in an Oracle Business
R
You group one
Aobject or more
N
Rules called a dictionary. A dictionary is an XML file (in the local file system with a
KO
.rules extension) that stores the applications rulesets and the data model.
Creating an Oracle Business Rules dictionary requires the following:
1. Creating or importing a dictionary into a project by using the JDeveloper Rules Designer
2. Populating the dictionary with the set facts, functions, globals, value sets, and rulesets. A
data model contains the business data definitions for the facts or data objects used in the
rules.
3. Creating one or more facts. Facts can be created as XML facts (derived from XML
schema elements), Java facts (based on a Java class), RL Language (RL functions) facts,
or ADF Business Component facts (based on View Object definitions).
4. Creating rulesets as a container for a set of one or more rules or Decision Tables
5. Defining rules to express the business policies based on the facts in the data model
rule goldCust {
if (fact Customer cust && cust.SpentInLastMonths(3) > 500 ){
assert (new GoldCustomer(cust: cust));
}
}
An instance of the GoldCustomer RL class is
asserted, representing a customer who spends
more than $500 in a three-month period. a ble
f e r
ans
rule goldDiscount {
n - t r
if (fact Order ord & fact GoldCustomer(cust: ord.customer) )
{ a no
ord.discount = 0.1;
The RL fact GoldCustomer is used to
h a s
assert(ord);
infer that if a customer spent $500 in
o m
the past three months, the customer is
)
u ide
}
m c nt G
eligible for a 10% discount.
} b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce more complex business logic, Oracle Business Rules supports a
N AR Java-like language called Oracle Business Rules RL Language (RL Language). RL
For situations
high-level
that require
O
K Language defines the syntax for Oracle Business Rules programs. RL Language includes a
Java-like syntax for defining rules that support the power of Java semantics.
With RL Language, application programs can assert Java objects as facts, and rules can
reference object properties and invoke methods. Likewise, application programs can use XML
documents or portions of XML documents as facts.
Programmers can use RL Language as a full-featured rules programming language, both
directly and as part of the Oracle Business Rules SDK.
RL Language is directly executed by the Rules Engine. It is interpreted rather than compiled, to
enable rules to be changed without rebuilding, redeploying, or even restarting applications.
JDeveloper
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Rules
design time SDK
run time
SOA Rules Dictionary a ble
Composer f e r
ans
n - t r
Custom Java API a no
Java h a s
Application o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce SDK (Rules SDK) is a Java library that provides business rule
N AR features that a developer can use to write a rule-enabled program that accesses
The Oracle
management
Business Rules
O
K a dictionary, or to write customized rules programs that add rules or modify existing rules. The
Rules Designer uses the Rules SDK to create, modify, and access rules and the data model by
using well-defined interfaces. Customer applications can use the Rules SDK to access, display,
create, and modify collections of rules and the data model.
You can use the Rules SDK APIs in a rule-enabled application to access rules or to create and
modify rules. The rules and the associated data model can be initially created in a custom
application or by using the Rules Designer.
Working Memory
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
IF/THEN
IF/THEN
IF/THEN
Pattern match
rule to facts? a ble
f e r
tra
Inference
ns
n -
If yes, execute rules. no
Engine
a
a
h de s
)
c om t Gui
i b m en
@ in Stud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
Oracle R K Rules
Business l is a data-driven forward chaining system, in which the facts determine
O NArules are evaluated. When a matching rule fires, the rule may add more facts. New facts
which
K are again compared against the rules. The process repeats until a conclusion is reached or the
cycle is stopped or reset. This process is called an inference cycle.
A rule-based system consists of the following:
Rule base: Includes business policies expressed as IF-THEN rules and Decision Tables
Working memory: Includes the fact information added by applications by using assert
calls
Inference Engine (Rules Engine): Processes the rules, and performs pattern-matching
to determine which rules match a given set of facts
Rules Dictionary
a ble
f e r
ans
Facts Value sets
n - r
Globals
t
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
ice in a SOA composite application, Oracle Business Rules lets you
K J isldeployed
When aRdictionary
A Composer to view, edit, and commit changes to a dictionary. SOA Composer is a
NSOA
use
O
K browser-based editing tool.
as a unit of execution.
a. Fact
b. Ruleset
c. Dictionary
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
Answer:RbK
J lice
A
AN
O ruleset is a collection of rules that are considered as a unit of execution, and can be chained
K together to yield an outcome.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
a ble
f e r
ans
n - t r
a no
One of the most common ) h
as e
uses is to call the component
c om t Guid
from a BPEL process.
i b m en
@ in Stud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R
A Business l component (also called a Decision component) can be used to
K Rules service
NA dynamic routing with a Mediator component. It can be implemented as advanced
implement
O
K routing rules in human task definitions, where it can perform policy-based task assignments
that dispatch tasks to specific roles or users. It can also provide load balancing of tasks among
users to control the task assignment load.
A Business Rules component can also be called from a BPEL process. When used thus, the
rules can determine intelligent routing paths within a business process based on service-level
agreements or other guidelines. It can also externalize business rules in the process: Rule
conditions that are evaluated as part of a business process where parameters can be changed
are best implemented separately from the process. Rules can also validate input documents or
apply additional constraints on requests.
Oracle Business Rules is a powerful and flexible tool, and can be utilized in many ways to
achieve many objectives. In this course, we focus on its creation, configuration, and invocation
from a BPEL process within a composite application. For more information about Oracle
Business Rules, go to http://www.oracle.com/technetwork/middleware/business-
rules/documentation/index.html.
a ble
f e r
ans
n - t r
a no
h a s
m ) e structures
idfact
Specify the o
c default
initial XML u
G service input
and
b m the n t Decision
i niandSoutputt u demessage structures.
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce component in a composite application, perform the following steps:
A R
To create a Business Rules
N
O1. Drag a Business Rules component into the Components column.
K 2. Select to create or import the dictionary.
3. Select Create > Input or Create > Output to define the initial XML fact structures. These
structures are added to the Business Rules dictionary. They define the default Decision
service input and output message structures.
4. Select an XML schema element to define either the Input or Output fact structures.
5. Click OK to create the component.
When you create a Business Rules component in the Composite Editor, it creates a stand-
alone business rule in the composite application and the Business Rules dictionary. The
dictionary is created with a default Decision function for the Decision service. However, the
dictionary is not opened in the Rules Designer.
Note: The Decision service name is defined on the Advanced tab (not shown in the slide).
1
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i cein a BPEL process provides you with the option to create a new
N AR Rules component in the composite application, or to select a Business Rules
Creating
Business
a business rule
KO
component that already exists in the composite application. In addition, creating a business rule
in the context of a BPEL process enables you to create the Business Rules dictionary and
specify the rulesets that are invoked.
To create a business rule in your BPEL process:
1. In the BPEL Designer window, drag a Business Rules component into your BPEL flow.
This opens the Business Rule activity window.
Select a dictionary.
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a ble
f e r
ans
n - t r
Map BPEL variable
values to input and a no
(if the business rule h a s
is synchronous)
o m )
u ide
output facts.
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce the desired Business Rules component to the composite and
N AR it, select the desired dictionary and, from that dictionary, the operation. Then map
If you have
configured
already added
KO
the input and output facts for the business rule to the appropriate BPEL variables.
Note: If you have not yet created and configured the desired Business Rules component, you
can add a dictionary and specify the input and output facts from the configuration dialog box
shown in the slide.
a ble
The Decision Service WSDL
f e r
document defines the basic stateless
ans
t r
and stateful web service operations
n -
that can be invoked.
a no
The Business h a s metadata
Rules e
) i d
defines
c omoperations
the mapping
t G u of the Decision
i b mfunctions.
service
e n to the Decision
@ in Stud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R
After you K l
create the Business Rules component in your composite application or BPEL
A
N the following files are created in the project folder:
process,
KO A Decision service XML Schema that defines the structures for the input and output facts
A Decision service WSDL document that defines the basic stateless and stateful web
service operations that can be invoked
A Business Rules dictionary (.rules file) for containing the ruleset definitions, rule, facts,
and globals that are added to the dictionary
The Business Rules metadata (.orig file) that defines the mapping of the Decision
service operations to the Decision functions that can be executed
Note: When you expand the business rule activity in the BPEL process, you find that it is in fact
a scope that contains the following:
A few Assign activities to prepare the input fact data
An Invoke activity to execute the business rule functions
A few more Assign activities to receive output facts
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
The Rules Designer includes
m c toneach
a series
t Gofof
tabs to provide editing
the elements ofia
b access e
i turule.
nbusiness d
@
in this S
r k j a
n a u s e
( ko e to
Copyright 2014, Oracle and/or its affiliates. All rights reserved.
J AIN icens
R K Rules ldictionary holds the rules that are executed by an application. The Rules
The Business
NA saves rules and their associated definitions in the dictionary (a .rules file). The
Designer
O
K dictionary is created when you first add a Business Rule component to your composite or BPEL
process flow. By using the Rules Designer, you can define basic building blocks such as facts,
globals (variables and constants), value sets, and rulesets.
Advanced features can also be defined and edited from here, including the following:
Functions: These are parameterized functions based on the RL Language syntax.
Links: These enable linking dictionaries to other dictionaries.
Decision functions: These provide access to rules through a Decision service that is
invoked as a web service or from a Java program through the Rules SDK API.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u de
iExpression
Specify Constant and/or
m c t GUse Builder
n to define a value.
nib Stude
Final if appropriate.
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
1. InRthe
J
KRules lice click the Globals tab, and then click the Create (+) icon.
Designer,
O NAIn the Edit Global window, enter a name (for example, defaultDiscount), select a
2.
K Type (for example, int), and in the Value field, click the Expression Builder icon.
3. In the Expression Builder window, create an expression or enter a literal value (for
example, 10). Then click OK.
4. In the Edit Global window, select the Constant check box to make it a constant, and the
Final check box to make it a final value.
- Final: Select the Final check box to use the global in a rule test condition. In this
case, the global is initialized once at run time and cannot be altered. A non-final
global is modifiable in assign actions.
- Constant: If the Constant check box is selected, it does not require double
quotation marks around string literal values, and it can be selected from expression
value choice lists. Constant expression values must be constant to be valid.
5. Click OK to create the global.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce value set, perform the following steps:
A R
To define a List of Values
N
O1. In the Rules Designer, click the Value Sets tab, and then click the Create (+) icon > List
K of Values to create a row.
2. In the new value set row, select the row and replace the name. Click the Edit icon to open
the Edit Value Set window.
3. In the Edit Value Set window, click the Create (+) icon to add values and aliases.
To define a List of Ranges value set, perform the following steps:
1. In the Rules Designer, click the Value Sets tab. Then click the Create (+) icon > List of
Ranges. This adds a row to the Value Sets table.
2. In the Value Sets table, double-click the Edit icon for the new value set to display the Edit
Value Set window.
3. In the Edit Value Set dialog box, enter the value set name, select the desired data type for
the range values, and click the Add Bucket With Lower Endpoint Included icon repeatedly
to add the number of buckets required. In each bucket row that is added, click the
endpoint cell and set the lower endpoint for each range.
4. Click OK to create the List of Ranges value set.
Note: The Rules Designer always adds the negative Infinity (Infinity) bucket in List of
Ranges value set definitions.
a ble
f e r
an s
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ceof organizing your rules. Before rules can be created, you need to
N AR
Rulesets
create
provide a way
a ruleset as a container for the rules. After the ruleset is created, rules and Decision
KO
Tables can be defined within it.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce and a condition operand, perform the following steps:
A R
To create a Decision Table
N
O1. In the Rules Designer, select an existing ruleset. Click the Add icon and select the Create
K Decision Table option from the list.
2. In the Decision Table area, from the list next to the Add icon, select Condition.
3. Each condition row requires a value set from which to draw values for each cell.
4. In the Conditions area, double-click <edit-condition> to display the navigator to select or
enter an expression.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i cehighlighted thus far have resulted in the definition of a Decision function
R
The configuration
Aexposed steps
O N
that is and invoked by the BPEL process. However, Decision functions do more than
K provide exposure to BPEL. Recall that earlier in this lesson, we saw that Oracle Business
Rules can be invoked by means other than BPEL processes (and even from outside Oracle
SOA Suite).
Decision functions provide access to rules through a Decision service that is invoked as a web
service. Use a Decision function to call rules from a Java application, from a composite, or from
a BPEL process. A Decision function performs the following operations:
Collect rulesets and other Decision functions under a single executable umbrella
Handle the assertion of inputs as rule facts in the Rules Engine working memory
Collect the consequent actions to be executed
Run rulesets
Return results
In a Decision function, the rules that you use can be organized into several rulesets, and these
rulesets can be executed in a prescribed order. Facts may flow to the first ruleset, and this
ruleset may assert additional facts that flow to the second and subsequent rulesets until the
facts finally flow back to the Decision function as the Decision function output.
A business rule
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
1 determines whether or
The incoming
message includes not the order requires
order data. manual approval. 2
If the order is
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
A second business
approved rule is added. It
5 employs a Decision
Table to determine the
shipping company for
the order.
6
a ble
f e r
The results of the
ans
business rule are n - t r
incorporated into the
a no
order data, and the
h a s
order is published to
o m )
u ide
a JMS Queue.
m c nt G
7 b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ceyou modify, redeploy, and test the OrderProcessing composite
N AR If the order is approved, either manually or automatically (because the total is
In this optional
application.
practice,
KO
below the approval threshold), a second business rule uses a Decision Table to route the order
to the preferred shipping company based on the shipping option indicated in the order data.
The response from the business rule is incorporated into the data, and the message is
published to a JMS queue.
To accomplish this, you add a second Business Rules component. This component uses a
Decision Table to assign a shipping carrier based on the shipping method specified in the order
detail. You configure the Decision service interface by defining the service name and specifying
the input and output fact structures, which are drawn from an XSD file that you import into the
project.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
Objectives
Events: Overview
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
DB
Adapter
Stock
Updated
a ble
f e r
ans
n - t r
When a business event occurs:
a no
Is it of interest to any other services?
h a s
How should those services be invoked?
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i e
cSOA
A R
Decoupled composite applications require complete separation of the service consumer
Nthe service provider, which is typically achieved through the use of asynchronous
and
KOmessaging, where applications can perform in a fire and forget mode.
Advantages
This removes the need for an application to know the details of the application on the
other side.
Resource utilization improves because applications are not holding on to resources until
the interaction is complete
Disadvantages
This introduces the complexities of creating and managing message queues and topics.
This requires that both the publisher of the message and the consumer use the same
messaging technology.
Each messaging system also has its own constraints on the types of programming
languages and environments that can use the service.
What is needed is a level of abstraction that allows applications to generate an event by using
business terms and to associate a business object in an implementation-independent form.
Oracle SOA Suite 12c addresses this need with the Event Delivery Network.
OEP
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
EDN
With EDN Adapter API
ADF-BC Java
Application Event Delivery Network Application
a ble
f e r
mediator BPEL mediator
ans
describe n - t r
events Service Infrastructure a no
h a s
o m )
u ide
m c nt G
b
ni Stude
MDS
EDL XSD i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce (EDN) is not a messaging infrastructure. It coordinates events
R
The Event
Athe Delivery Network
N
within SOA Suite service infrastructure, and is available to all composites that are running
KOin the SCA container (within the same JVM).
The EDN provides a true publish-subscribe abstraction. It supports a fully declarative
approach, and does not require explicit wiring between components, thus leading to truly
decoupled applications.
of a business occurrence.
a ble
Event subscribe f e r
Delivery
ans
Events are messages that Network
n - t r
typically have a header and
a no
a payload.
h a s
o m ) subscribe
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
J
Kmessages. e
licThey
EventsRare typically have a header and a payload. The header contains
N A
metadata such as the event type and a time stamp. The payload contains details that
KOdescribe the facts of the event instance that the business logic in the consumer will process.
Events are a one-way, fire-and-forget, asynchronous notification of a business occurrence.
They are not targeted to a specific service provider, but are available to any and all interested
parties. The publisher does not:
Rely on any service component receiving the business event to complete
Care if any other service components receive the business event
Need to know where the subscribers (if any) are and what they do with the data
These are important distinctions between business events and direct service invocations that
rely on the Web Services Description Language (WSDL) file contract (for example, a SOAP
service client). If the author of the event depends on the receiver of the event, messaging
typically must be accomplished through service invocation rather than through a business
event. Unlike direct service invocation, the business event separates the client from the
server.
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
xmlns:us="http://www.example.org/ns/updtstock"
targetNamespace="http://www.example.org/ns/updtstock"
elementFormDefault="qualified">
<xsd:element name="UpdateStock"
type="us:UpdateStockType"/>
<xsd:complexType name="UpdateStockType">
<xsd:sequence>
<xsd:element name="productId" type="xsd:string"
minOccurs="1"/>
a ble
<xsd:element name="quantity" type="xsd:int"
f e r
minOccurs="1"/>
ans
</xsd:sequence>
n - t r
</xsd:complexType>
a no
</xsd:schema>
h a s
o m )
u ide
Theb m c n
referenced XSD t Gfile describes
i n ipayload
the t u dofethe event.
j a in@ this S
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
The codeK J inlthe
sample i ceslide describes the payload of an event with two values (productID
A R
N
and quantity). Components that either produce or consume events use this XSD to
KOunderstand the payload of the event.
XML schema
<definitions xmlns="http://schemas.oracle.com/events/edl"
targetNamespace="http://schemas.oracle.com/events/edl/stock
Update">
<schema-import
namespace="http://www.example.org/ns/updtstock"
location="xsd/updateStock.xsd"/>
QName
QName a ble
<event-definition name="stockUpdated">
f e r
<content
ans
xmlns:ns0="http://www.example.org/ns/updtstock"
n - t r
element="ns0:UpdateStock"/>
a no
</event-definition>
h a s
) ide
</definitions>
o m u
m c nPayload t G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
The EDN
A R uses the XML-based Event Definition Language (EDL), which enables you to define
Nevent and its associated strongly typed data. This definition is registered with the SOA
the
KOinfrastructure, and is available to all composites for publication or subscription.
An event definition consists of the following:
A global name or QName, which is qualified by a namespace to uniquely define the
event name
Custom headers, which can be used for faster content-based routing than an XPath
query on the event payload
A payload definition, which is the data associated with the event, and which is provided
by the publisher and is available to the consumer. An XSD is typically used to define the
structure of the payload information.
An EDL file is created and deployed as part of a SOA composite application, even though it
does not really belong to any one applicationit is applicable throughout the SOA Suite
container and is more or less community property. After the EDL file is deployed and
registered with the EDN, subscriptions can be created on the events in the file.
<component name="ReceiveEvent">
<implementation.mediator src="ReceiveEvent.mplan"/>
<business-events>
<subscribe
xmlns:sub1="http://schemas.oracle.com/events/edl/stockUpda
te"
a ble
name="sub1:stockUpdated"
f e r
consistency="oneAndOnlyOne"
ans
runAsRoles="$publisher"/>
n - t r
</business-events>
a no
</component>
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ceregister their interest in events of a specific type with the EDN through
N
the AR or BPEL components that consume such events.
Composite applications
Mediator
KO An EDN offers the following three levels of subscription granularity:
Namespaces, where the subscriber receives any event with a specific namespace
Event names, where the subscriber receives an event with a specify QName
Content-based XPath filters, where a subscriber can add content-based filters to accept
or reject events
The first step to consume an event is to discover its definition. Event definitions can be stored
locally in a composite or globally on the serverin either case, they can be discovered
through the JDeveloper resource catalog.
apply.)
a. BPEL component
b. ADF-BC application component
c. Mediator component
d. Human task component
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i c e
ARa, b, c, d
Answer:
N
KOAll these components can publish events.
Events: Overview
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
2
1
a ble
f e r
ans
n - t r
4 a no
h a s
o m )
u ide
3 m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce for a composite application, perform the following steps:
R
To create
AClickevent definitions
O N
1. the Event Definition Creation icon on the composite.xml window toolbar.
K 2. In the Event Definition Creation window, enter:
- The Event Definition file name, which is used for the EDL file that contains the
event definitions that are added to the project
- The directory, to specify where the EDL file is stored
- The namespace, to specify the XML Namespace for event definitions
Click the Add an Event (+) icon to create a new event.
3. In the Add an Event window, select an XML element from an XML schema that defines
the event payload structure. Enter a name for the event. Click OK.
The event is added to the Events table in the Event Definition Creation window and the
EDL file.
4. Add additional events, or click OK to create the EDL file in the project folder.
a ble
f e r
ans
n - t r
a no
h a s
3
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce a Mediator component, perform the following steps:
A R
To publish an event from
N
O1. After opening the Mediator Editor, for a selected operation, click the Create (+) icon and
K select Static routing rule.
2. In the Target Type window, click Event.
3. In the Event Chooser window, browse for an existing EDL file or create a new EDL file
with the events to be published. Select the event entry to be published and click OK.
Note: In the Mediator Routing Rule properties, the event icon appears next to the target field.
The event name is formed by concatenating the string Event:: to the event name (for
example Event::Event1). In the Composite Editor window, the Mediator component icon
has a Published Events icon (lightning within a blue circle) on the left edge as a visual
indicator for published events. The name of the published event appears inside the Mediator
component icon. A Mediator component can publish more than one event. Each event is
published in its own Routing Rule definition.
2 le
r a b
s f e
- t r an
3 n no
s4 a
h a
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce event in a Mediator component, drag a Mediator component to the
N AR column in the Composite Editor:
To subscribe
Components
to a business
KO
1. Select Subscribe to Events from the drop-down menu.
2. Click the Subscribe to New Event icon to locate an existing EDL file and select an
event.
3. To further refine a subscription, click the Filter icon to define an XPath-based filter (just
as you do for content-based routing). The filter consists of a Boolean expression that
evaluates the events payload, resulting in true() for events that should be delivered
and false() for events that the component declines.
4. After you click OK, the Mediator is added to the Composite Editor with the following
visual clues:
- The left edge of the Mediator component has a Subscribed Events icon to indicate
that it subscribes to events.
- The body of the Mediator component displays the subscribed event names.
Note: A Mediator component cannot have a service interface and subscribe to events at the
same time. A Mediator component can subscribe to multiple events.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
One and only one: Events are delivered in m c ownnglobal
their t G transaction.
b
ni Studewithout a global transaction.
Guaranteed: Events are delivered asynchronously
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce that you want, you can set the level of delivery consistency for the
N AinRaddition to the desired filters. The following delivery consistency levels are available:
After you
event
select the event
KO One and only one: An event is delivered to the subscriber in its own global (JTA)
transaction. Changes made by the subscriber within that transaction are committed after
event processing has completed. If the subscriber fails, the transaction is rolled back.
Failed events are retried a configurable number of times before being delivered to an
error queue.
Guaranteed: Events are delivered to the subscriber asynchronously without a global
transaction. The subscriber can create its own local transaction for processing, which is
committed independently of other event processing. The event is guaranteed to be
handed to the subscriber. However, because there is no global transaction, a system
failure can cause an event to be delivered multiple times. If the subscriber throws an
exception (or fails), the exception is logged and the event is not resent.
a ble
f e r
ans
n - t r
a no
In an Invoke activity: h a s
Select Event as the interaction m ) e
idtype.
o
cthe event. G u
Browse to select
b m n t
Create or i i tutodaevariable to store the event.
nbrowse
j a in@ this S
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i e
cevent
A R
To publish a business from BPEL, perform the following steps:
KON
1. Add an Invoke activity to the BPEL process.
2. Double-click the Invoke activity.
3. From the Interaction Type list, select Event.
4. Click the Browse Events icon to select an event.
5. Create or browse to a variable to store the event.
a ble
f e r
ans
n - t r
a no
In a Receive or Pick activity: as
Select Event as the interaction ) h type. d e
m Gu
oevent. i
Browse to select the c
Create or n i
browse
nt to store the event.
bm to da evariable
@ i S tu
n
jai e thi s
r k
a 2014,uOracle
s and/or its affiliates. All rights reserved.
o n
k e to
Copyright
(
J AIN icens
R
To subscribe l
K to a business event in a BPEL process, perform the following steps:
A
KON
1. Add a Receive or Pick activity.
2. Double-click the new activity.
3. Select Event from the Interaction Type list.
4. Click Browse Events to select an event.
5. Create or browse to a variable to store the event payload.
a ble
f e r
a n s
1 2n-t r
o
s an
) ha de
c om t Gui
i b m en
@ in Stud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
OracleR K
Enterprise l
Manager Fusion Middleware Control provides a Business Events page that
A
Nbe accessed to manage, track, and test events in the EDN.
can
KO To access the Business Events page after you log in to Oracle Enterprise Manager Fusion
Middleware Control, expand the SOA folder in the Farm navigator and right-click the soa-infra
node. Click Business Events to display the Business Events pane, where you can examine
the configuration information for event definitions as well as individual events.
1. To test an event, select the desired event and click Test. The Test Event window opens.
2. Enter the XML data that is needed to form the event payload that you want to test. This
initiates any application that has subscribed to the event being tested.
3. To view all the events in the SOA Infrastructure EDN, click the Events tab.
4. Select an event entry, and then click Show Event Definition.
a ble
f e r
ans
n - t r
a no
For a given event, view the as
) h de
subscription configuration
information. c om t Gui
i b m en
@ in Stud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R
Click the K l tab to search for and view the different types of subscriptions.
Subscriptions
O NA
K Subscriptions tabbed page enables you to display and search for information about all
The
subscriptions, and also to create database subscriptions (although the screenshot in the slide
has collapsed the Database Subscriptions section). However, in the example, you can see
the Search section and some of the options that enable you to search for different
subscription types, such as:
Database Subscriptions, to narrow the search result to database subscriptions
Component Subscriptions, to narrow the search result to component subscriptions
Database and Component Subscriptions (the default setting)
In the Component Subscriptions section, a table lists the events and components and their
owning composite application subscribing to the event, the event consistency settings, and
the number of delivery failures (if any). This enables you to quickly monitor the state of events
in the EDN.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i c e
ARa
Answer:
N
KO
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
In this R
practice, ice a composite application that updates the inventory quantity of a
K J you lcreate
NAitem in a database table. The application then publishes a stockUpdate event (from a
Ogiven
K BPEL process) that contains the product ID of the stock item that is updated.
A second composite application includes a Mediator that subscribes to the stockUpdate
event. The payload of the event is passed to a BPEL process that extracts the purchase order
data for any order that includes the updated item, and has a status of waiting. When the
purchase order is reconstructed, it is passed to the OrderProcessing application that you
created and deployed in the lesson titled Developing Business Rules. Recall that the
application also calls the Approval application that you created in the lesson titled
Implementing a Human Workflow and Notifications.
After deploying the two new applications, you test them by updating the database. You then
go to the Worklist application to approve any orders where it is required, and observe the
outcome.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
and assertions.
Emulations enable you to simulate the message data that
your SOA composite application receives from both the
service components inside the composite and the binding
components outside the composite.
Assertions enable you to validate an entire XML document, ble
a part of a message, a non-leaf element, or a leaf element f e ra
a n s
at a point during SOA composite application execution
n - r
t by
o
a n values.
comparing actual values to expected (asserted)
s
h a
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
supports:
Creating one or more test suites, each comprising a
collection of test cases
Deploying the composite application with its test suites to a
runtime environment
Running a composite application test suite, called a test able
run, by using Oracle Enterprise Manager Fusion s f er
Middleware Control - t r an
n no
s a
h a
Note: Each test run corresponds to
o m a) single
u idecomposite
application instance. m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce supports testing various components at the SOA composite
N AR
The composite test
applicationlevel,
framework
as listed in the slide.
O
K The composite test framework enables creating one or more test suites, each of which consists
of a logical collection of one or more test cases. Each test case contains a set of commands
that are performed when a test case instance is executed. The execution of a test suite is
known as a test run. Each test run corresponds to a single SOA composite application
instance.
A test case:
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a ble
f e r
ans
n - t r
noCase.
Create a Test
a
a
h de s
)
c om t Gui
i b m en
@ in Stud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R Kconsist ofl a logical collection of one or more test cases. Each test case contains a
Test suites
setNofAcommands to be run as the test instance is executed. The execution of a test suite is
O
K known as a test run.
1. To create a test suite, in the Project folder, right-click the testsuites folder and select
Create Test Suite.
2. Enter a name for the test suite, and then click OK.
a ble
f e r
an s
n - t r
a no
h a s
o m )
u ide
Specify the service, operation,
2 and possible callback to test. m c Load n t orGgenerate the output
i b 4 e
n Stud output will ornotspecify
message, that
i be tested.
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i e
ccase,
A R
To create the first test perform the following steps:
KO1.N Enter a name and description for the first test case to be added to the test suite.
2. Specify the operation to be tested.
3. Specify an input message.
4. Specify an output message.
a ble
f e r
ans
n - t r
a no
h a s
The Test
test case
Caseeditor
editorlooks
lookslike
assembly editor (composite.xml),
likethe
o m
the)
u ide
except that the outer m clanesare
swimlanes
swim
naret G
differently colored.
colored..b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce in the Application Navigator window as a child of the test suite, and
N
the ARfile is opened in the Test Case window. The test case XML file visually resembles the
The test
XML
case file appears
O
K composite.xml file. However, you know that it is the test case file by the name of the tabbed
window and because JDeveloper changes the color of the Exposed Services and External
References columns.
You can now visually edit the test case file by adding process initiations, emulations, and
assertions.
<message>
***
<CreditCheckRequest xmlns="http://www.example.org/ns/ccauthorize">
<CCNumber>9000-1234-1234-1234</CCNumber> The file includes
<amount>200</amount> the input message.
</CreditCheckRequest>
***
</message>
</initiate>
If specified in the wizard, It
<wireActions wireSource="ValidateCreditCard_ep" operation="validateCC">
also includes a wire assertion
<assert comparisonMethod="xml-similar">
<description/> and the description of the
a ble
<expected> output message.
f e r
<location key="output"/>
an s
***
<message>
n - t r
<CreditCheckResponse xmlns="http://www.example.org/ns/ccauthorize">
<status>VALID</status>
a no
</CreditCheckResponse>
h a s
) ide
***
</message>
o m u
</expected>
</assert>
m c nt G
</wireActions> b
ni Stude
</compositeTest> i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i cecase, several folders are created in the project. The tests folder
N ARall the test case XML files. In the slide is an example of a test case file. It is built from
When you
contains
create a test
KO
the information that is provided to the wizard, including the initiating input message, and a wire
assertion that provides an output message. The input file simulates a message provided by a
client, and the output message mimics data returned to that client by the composite.
Note: The messages folder is used to save the message files that provide messages for
emulations and assertions. Message files are XML files that contain XML message fragments,
and can be reused by copying them between test cases and test suites. The other subfolders
(componenttests and includes) are not used in Oracle SOA Suite 12c.
a ble
f e r
an
Generate sample messages
s
n - t r
automatically, or load them
from a file or manual input.
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i cecase file opened in JDeveloper, double-click the wire of the SOA
N AR application area to test. This displays the Wire Actions dialog box, from which you
With the
composite
appropriate test
KO
can design emulations and assertions for the selected part of the SOA composite application.
With emulations, you can simulate a message returned from a synchronous web service
partner, a callback message returned from an asynchronous web service partner, or a fault
message returned from a web service partner.
a ble
f e r
an s
n - t r
Specify the event to Sample data can be a no
emulate and the
a
generated and edited.
h s
target subscribers.
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ceenables you to create a test case in a test suite that publishes an event
to N AR
The unit test framework
a subscriber component such as a Mediator.
O
K To emulate an event, perform the following steps:
1. In a test case XML editor window, click the Emulate Event Messages icon in the test case
XML file window.
2. In the Event Messages window, select the event to be emulated from the Events section
(to the left of the window), and select the target subscriber component from the Publish
Event To drop-down list.
3. Generate, manually enter, or load an XML value for the event payload, and then click OK.
The test case can be executed in the same way as other test cases, by using Enterprise
Manager Fusion Middleware Control.
2
1
4 le
r a b
s f e
- t r an
n no
5 a
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ceto verify variable data or process flow. Assertions enable you to
N ARtest data in a variable or an entire XML document as a process is executed. This is
You perform
validate
assertions
KO
done by extracting a value from a variable or an XML document and comparing it to an
expected value.
1. As with emulations, right-click a wire and select Create Asserts and Emulates.
2. In the Asserts and Emulates window, click the Asserts tab, and then click the Add Assert
(+) icon.
3. In the Create Assert window, you can select one of the following assertion options
(depending on the type of interaction underlying the wire):
- Assert Input: Creates an assertion for the inbound direction
- Assert Output: Creates an assertion for the outbound direction
- Assert Callback: Creates an assertion on a callback
- Assert Fault: Creates an assertion for an application fault
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
Select a specific
test case and
click Execute.
a ble
f e r
an s
n - t r
a no
h a s
Enter a name for the
test run and click OK. o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
Before R
you
J
Kcan licetest cases within a test suite, you must deploy the composite
run any
O NA project along with all the test suites it contains to an Oracle SOA Suite 12c runtime
application
K environment, such as a development or test system. Test suites must be deployed with the
composite application, because a composite application instance is created to execute the
selected test cases that form the test run. A test run is an instance of a test.
After deploying the composite application, log in to Oracle Enterprise Manager Fusion
Middleware Control and perform the following steps to select the test cases to be run:
In the Farm navigator, expand the SOA tree and click the composite application name
[version] deployed with the test cases.
On the composite application home page, click the Unit Tests tab (do not click the Test
drop-down menu). The Unit Tests tab opens the Test Cases tabbed page.
On the composite application Unit Tests > Test Cases tabbed page, if needed, expand
Test Suites and select the specific test case to be run, or click the check box next to a test
suite name to select all the test cases in that test suite. The collection of test cases
selected forms a test run. A test run is a collection of test cases that are executed
simultaneously.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( kon e to u
J AIN icens
RK l
N A
KO
KO
using the initiations, emulations, and assertions defined in each test case. The composite
application instances run without user intervention (unless your code involves a human task,
which still needs to be managed via the normal Worklist application).
Note: After you click Execute to initiate the test run, the web browser page is refreshed with the
Test Runs page being displayed. This enables you to monitor the test run progress and view
the test run results. The following slide, titled Examining Results of a Test Run, provides an
example of the Test Runs tabbed page.
a ble
f e r
an s
n - t r
a no
h a s
o m )
u ide the cause
Composite application
m c nt Gof assertion failure.
Examine
instance ID link to access b
ni Stude
the Flow Trace page i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i e
cpage
A R
The Test Runs tabbed is displayed after you initiate a test run. Initially, the Test Runs
N may not contain any information. To update the contents of the page and view the
page
O
K progress or results for the test cases in a test run, perform the following steps:
1. Either click Refresh Test Status, or enter search criteria (such as the test run name), and
click Search.
2. In the table immediately under the Search section (or just above the Result of Test Run
section), the name of the test run should appear. Click the test run row entry that appears
to populate the Result of Test Run section with a table of the test suites and test cases
either in progress or completed and the status of each test.
In the Assertion details for section, you can see the list of failed test case composite
application instance IDs. You can also click the [XML] links in each instance row to examine the
test assertion information, such as assertion failures. An example is shown in the next slide,
titled Viewing Assertion Information.
include an inp1: namespace reference, whereas those in the expected value do not. Recall
that the xml-identical option requires an exact match between the XML message (or
fragment) structure and the assertion value. The reason for the failure is the XML structure
rather than the data itself.
Note: The instance link in each row is the instance ID of the composite application that is used
to perform the test case. If you click the instance ID link, you can access the Flow Trace page
for that instance to examine and drill down into the composite application and the component
details, as you would for any other composite application.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( kon e to u
J AIN icens
RK l
N A
KO
You start a test suite or test case by clicking the Test button
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
Answer:RbK
J lice
A
AN
O test suite or test case is executed by clicking the Execute button on the Unit Tests > Test
K Cases tabbed page of the composite application page, after you select the test suites and test
cases that are to be run. A test run creates a new composite application instance to run the test
by using the inbound message initiation as initial input.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
Imports
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
1
XML WSDL 2 3 Server Enterprise
Schema Logs Manager
Defines
Service Testing
Request
Composite
Application
a b le
e r
Client
Response?
a n sf
Web
SOA Debugger
tr Service
n -
5 o
s an
) ha de
o m GWeb u i Service Test Tool
4
Examines
SOAP/HTTP
m ent c
i b d
HTTP Analyzer
@ in StuJDeveloper
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R K SOAl applications, one approach is to follow the life cycle of a client request
To troubleshoot
and A
Nresponse (if any) through all the components involved in the interaction. Using this
O
K approach, you track the flow of a message through the system and examine possible sources
of an error in a systematic way. First look at error messages, if available, and take action or
make an educated guess as to where to start looking next. Usually, an error message points
to the probable cause and source of the error, and/or the log files to be consulted for more
information. The graphic in the slide depicts a simple request-response life cycle, highlighting
the key service artifacts that may be a source of errors. It shows the tools to help test and
debug an application, and highlights the importance of log files as sources of information.
server log files. Enterprise Manager Fusion Middleware Control provides access to all log
files.
4. The actual contents of the request-and-response messages. If SOAP/HTTP bindings are
used, these exchanges can be monitored by using an HTTP Analyzer tool.
5. The SOA debugger, which provides a troubleshooting environment within Oracle
JDeveloper. You can set breakpoints in Oracle JDeveloper for troubleshooting the binding
components and service components in SOA composite applications, and on
synchronous and asynchronous BPEL processes.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( kon e to u
J AIN icens
RK l
N A
KO
troubleshooting environment
within Oracle JDeveloper.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
service components, and m c nt and
Set breakpoints on binding components,
synchronous
G
b
niprocesses. de
asynchronous BPEL i t u
j a in@ this S
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce a troubleshooting environment within Oracle JDeveloper. You can
AR
The SOA debugger
setNbreakpoints
provides
for troubleshooting on binding components, service components, and
O
K synchronous and asynchronous BPEL processes.
The features include:
Local or remote debugging
Setting break points and tracing message flow
Viewing raw messages (SOAP and Non-XML) entering or leaving
Changing variables while debugging
Viewing transaction boundaries
a ble
f e r
Specify in minutes how
ans
Enter the port on
long the client should
n - t
wait while attempting to
r
which the debugging establish a debugging
a no
agent listens.
a s
session before stopping.
h
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i e
capplications
A R
Both local and remote can be debugged. When the debugger is started, the
N
Connection Settings window prompts for the server to use for debugging, the debug port, and
KO
the timeout for the debugger when it is inactive. The debugger properties are stored per project.
If you have imported a project from a different machine, the host will probably have to be
changed. These values can be stored in JDeveloper properties, which enables you to skip the
Connection Settings window if you always want to use the same options.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce pausing locations in a SOA composite application that you set
forN AR purposes. You can set breakpoints on a request, on a reply, or on both.
Breakpoints
debugging
are the intentional
To set a breakpoint on
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a service component,
select Edit.
a ble
f e r
ans
n - t r
a no
In the Log window at the bottomhof a s
Oracle JDeveloper, click Data. o m )
u ide
Expand the message m c ntYou
contents. G
can double-click
b
nai value e
dchange
to it.
@ i S t u
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R K stops lat the first breakpoint that you set (for example, on the service binding
The debugger
O NA
component). In the Log window at the bottom of Oracle JDeveloper, click Data. Expand the
K message contents. You can double-click a value to change it. For non-XML variables, right-
click and select View value (for example, the return message from a Database adapter).
F7 Step Into
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a ble
f e r
ans
The debugger steps
n - t r
through the copy
a no
rules in an Assign
h a s
activity one at a time.
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
To stepRthrough lice
K J an application, use the following function keys or the corresponding toolbar
N A
icons:
KO F8 steps over a frame. This places you at the next breakpoint. If there are no
breakpoints, it steps over all the frames and goes back to the first frame.
F7 steps into the next valid location. This can be a new frame or the same frame, but in
a different location.
Shift-F7 steps out of a frame. This option is used only to process a BPEL scope or
sequence activity. After completion of scope processing, it pauses at the next scope or
activity in the process.
F9 resumes a step operation.
Note: The debugger steps through the copy rules in a BPEL Assign activity one at a time.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
orK
To endR
J licaedebugging session, perform the following:
detach from
O NAthe Terminate icon in the tools menu to end a debugging session. The Terminate
Click
K Debugger Process dialog box is displayed. Select an option:
Detach removes the debugger without ending the debugging process.
Terminate ends the debugging process.
Notes
If you selected Detach, click the Debugger icon above the SOA Composite Editor to
resume debugging.
If you selected Terminate, right-click and select Initiate WS Debugging to reinitiate the
debugger and start a new debugging session.
a ble
f e
CREDITCARDS r
tablens
a
Initiate an inbound n-tr no
message.
s a
h a
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ceis to create a test suite that contains three test cases and to deploy the
N AR application with its test suite. After the composite application is deployed, you use
The goal
composite
of this practice
O
K Oracle Enterprise Manager to run the test suite and one test case.
The slide illustrates the concept of a composite application test case, which comprises:
An initiating inbound message that provides the input data for the composite application
when the test case is initiated. This initiating inbound message is created on the
composite entry point that is used to initiate the test.
An emulation for the reply from the CreditCardDB service. The reply emulates the
response to the ValidateCreditCard Mediator component from the CreditCardDB service.
An assertion to verify that all or a part of the response data contains data and values that
we expect to be returned from the Mediator component to the client that is initiating the
request
Emulations and assertions are wire actions and can be created on any wire in a composite
application. When an emulation for a reply is created, the actual service for which the emulation
is created does not have to exist. In this case, the CreditCardDB service does exist. However,
we are emulating a scenario that does not return useful data because of information that is
lacking in the database.
a ble
f e r
ans
You step through a running n - t r
BPEL process, one line at a a no
time, before terminating the h a s
debug session. o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
r j a
k se
a
on t2014, uOracle and/or its affiliates. All rights reserved.
( kCopyright o
A I N nse
OracleR
supports ice standard for Web Service Security (WS-Security) to provide
K J the lOASIS
O NA
message-level and transport-level security for web services. WS-Security defines a
K mechanism for adding transport independence and different levels of security to SOAP
messages.
If there is a need to apply integrity and confidentiality at a fine-grained level, XML signature
and encryption can be used to protect the SOAP body, header block, or portions of either.
If the SOAP message needs to be protected beyond the transport session, message-level
security can be used. If there is a need to use different forms of authentication, message-level
security authentication tokens can be used, such as username token, X.509 token, or a
Security Assertion Markup Language (SAML) token.
In the Oracle implementation, all WS-Security features (including digital signatures,
encryption, and authentication) are implemented by using a prebuilt JAX-WS handler called
an interceptor. The interceptor adds the authentication, signature, and encryption WS-
Security elements to the SOAP message, and then forwards the message to the receiving
web service. A receiving web service also has interceptors to decrypt, verify signatures, and
authenticate incoming messages.
The Oracle implementation of WS-Security integrates with Java Authentication and
Authorization Service (JAAS) and a variety of authentication providers.
more than one service, which provides the capability to do bulk attachment.
Policies can be versioned so that older policies are re-established by using a policy rollback
operation. Oracle Platform Security for Java provides automatic identity propagation. Other
supported web service standards include:
WS-Security 1.0
WS-Security 1.1
WS-SecurityPolicy 1.1
a ble
WS-Security-SwA f e r
ans
UsernameTokenProfile 1.1
n - t r
X509TokenProfile 1.1
a no
Security-Policy Use cases Working Draft 2
h a s
Note: OPSS makes use of the Oracle Fusion Middleware
o m u ideServer Java Platform
)Application
Security (JPS) implementation.
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( kon e to u
J AIN icens
R K l
A
KON
<interface.wsdl interface=".../receiveOrder#wsdl.interface(execute)"/>
<binding.ws
port=".../receiveOrder#wsdl.endpoint(receiveOrder/execute)">
<wsp:PolicyReference URI="oracle/wss_username_token_service_policy"
orawsp:category="security" orawsp:status="enabled"/>
</binding.ws> </service
KO Thus, security policies can be declaratively attached to the inbound requests (the service
endpoints) to a SOA composite, and the outbound requests (the external reference endpoints)
from the SOA composite.
The URI attributes in each example identify the policy names, which define one or more
security assertions that are applied at run time to enforce the policy rules during the request-
response message life cycle.
Note: The various URL references in the examples were shortened to make it easier to read
the examples. Details about security policies (including those used in the examples) are
discussed in subsequent slides in this lesson.
a. Signature
b. Security tokens
c. Encryption
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i c e
ARb
Answer:
N
KO
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
services consistently
Is built by using the WS-Policy standard and leverages the
OPSS Login Module and the Oracle WebLogic Server
authenticator for authentication and authorization
a ble
Metadata
f e r
Store
ans
(MDS)
n - t r
a no
h a s
Oraclec o m) Guide
Fusion
m
Middleware
n t
i b e
@ in DatabaseS tud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R
Components l
K of the OWSM Architecture include the following:
N A
KO Oracle Enterprise Manager Fusion Middleware Control: Enables administrators to
access Oracle Web Services Managers functionality to manage, secure, and monitor
web services
Oracle Web Services Manager Policy Manager: Reads and writes policies, including
the predefined and custom policies from the Meta Data Store
Oracle WSM Agent: Manages the enforcement of policies via the Policy Interceptor
Pipeline
Policy Interceptors: Enforce policies, including reliable messaging, management,
addressing, security, and Message Transmission Optimization Mechanism (MTOM)
Metadata Store (MDS): Is used for storing policies. Policies can be stored as files in the
file system (supported for development) or in the Oracle Fusion Middleware database
(supported for production).
Oracle Fusion Middleware Database: Provides database support for the MDS
a particular behavior.
Assertions are executed in the order in which they are
listed in the policy.
Policy a ble
Request f e r
ans
Assertion 1 Assertion 2 Assertion n
n - t r
Response
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
OWSMR K J consist
policies liceof one or more assertions that exhibit a particular capability or
O NA For example, a security policy could be made up of two assertions: a Log assertion
behavior.
K and a WS-Security assertion. If this particular security policy is attached to a service endpoint,
for the request message, the Log assertion is executed, first logging the request message to a
log file, followed by the WS-Security assertion that authenticates the requestor based on the
token sent in the message and decrypts the message if the message is encrypted.
OWSM policy assertions are instances of policy assertion templates that are added to a policy
at policy creation time. OWSM:
Provides a set of predefined policy assertion templates
Enables users to define custom policy assertions that can be combined with predefined
policy assertions
Note: Custom policy assertions are used when specific functionality is not provided.
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R
Specific K l (WSS) 1.0 tokens include:
WS-Security
N A
WSSUsernameToken: This token uses a plain username and password either in plain
K O
text or digest form
WSS10UsernameWithCerts: Along with UsernameToken, this token sends sensitive
data that can be signed or encrypted. Certificate information is also passed in
BinarySecurityToken, IssuerSerial, or KeyIdentifier.
WSS10AnonymousWithCerts: No username or password is sent. Client does not
identify itself to the server. The message exchange must be secure by using signatures
or encryption.
WSS10UsernameTokenOverSSL: This token is similar to the plain username token.
The transport security part is different.
WSS10MutualAuthWithCerts: The client goes for strong authentication by identifying
itself with X509 credentials. The client X509Token is embedded in the message
signature.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( kon e to u
J AIN icens
RK l
N A
KO
WS-Security: Carries
UsernameToken
Request
Policy
a ble
enforcement
f e r
point
a n s
Response
n -t r
Service
Client o
s an
WS-SecurityPolicy: ) ha de
c om t Gui
The oracle/wss_username_token_service_policy
policy can be used to m extract token n data, apply
authentication and i b e
n Stud set the subject.
authorization, and
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
OracleRFusion lice uses a policy-based model to manage web services. Policies apply
K J Middleware
O NA to the delivery of messages. Policies are part of an enterprise policy framework.
standards
K This enables policies to be centrally created and managed.
Policies contain one or more assertions. A policy assertion is the smallest unit of a policy that
performs a specific action. Policy assertions are executed on the request message and the
response message, and the same set of assertions is executed on both types of messages.
The assertions are executed in the order in which they appear in the pipeline.
Policies are configured by using Oracle JDeveloper at design time and Oracle Enterprise
Manager Fusion Middleware Control console at run time. The predefined OWSM
authentication policies are:
oracle/wss_username_token_service_policy
oracle/wss11_saml_token_client_policy
oracle/wss11_saml_token_service_policy
a. Tokens
b. Protocols
c. Assertions
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i c e
ARc
Answer:
N
KO
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
Authorize OrderProcess
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
user. Composite
ProcessOrder
Username (BPEL) oracle/wss11_saml_token_service_policy
Token
Verify SAML token.
receive Authenticate.
Set subject.
Web Client
Verify security. Binds
a b le
Authenticate.
SAML
f e r
Set subject.
an s
CCAuth
n - t r
no Authorization
oracle/wss_username_token_service_policy
Credit
s a
Fulfillment ) h a e Service
om t GRead i d
u subject.
m en c Insert SAML token.
i b
@ inFinalizeStud oracle/wss11_saml_token_client_policy
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R K in the lslide illustrates the use of three different policies to authenticate,
The example
O NA and propagate username credentials. Following the request flow, web service
authorize,
K policies are used for authentication and identity propagation:
The Web client obtains the username and password from the user, authenticates the
information, and populates the Username token by using WS-Security headers.
The ProcessOrder BPEL service entry point applies the
oracle/wss_username_token_service_policy attachment to verify security,
authenticate the user, and set the subject with the identity details.
The authorization part may then be applied by using a specified policy.
The ProcessOrder BPEL component is configured with
oracle/wss10_saml_token_client_policy attached to the external reference for
the Credit Authorization Service, causing the process to read the subject and insert the
identity information into the SAML token that is sent in the request to the external
services.
The Credit Authorization Service has oracle/wss11_saml_token_client_policy
attached so that it can verify the SAML token, authenticate, and set the subject to
complete the identity propagation between services.
a ble
f e r
ans
2 n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce 12c to attach policies for testing security in a design-time
N AR When your application is ready for deployment to a production environment, you
You use Oracle
environment.
JDeveloper
KOcan attach runtime policies in the Oracle Enterprise Manager Fusion Middleware Control
console.
To attach a policy to an exposed service, perform the following steps:
1. Right-click the exposed service and select Configure WS-Policies.
2. Click the Add icon for the type of policy, and then select the respective policy to attach.
The slide shows an example to attach an
oracle/wss_username_token_service_policy security policy to the
receiveOrder service.
oracle/wss10_saml_token_client_policy
<reference name="BookingService"
ui:wsdlLocation=".../Booking.wsdl">
<interface.wsdl interface=".../Booking#wsdl.interface(Booking)"/>
<binding.ws
port=".../Booking#wsdl.endpoint(booking_client_ep/Booking_pt)"
location=".../BookingSystem/booking_client_ep?WSDL"
soapVersion="1.1">
<wsp:PolicyReference URI="oracle/wss10_saml_token_client_policy"
a ble
orawsp:category="security" f e r
orawsp:status="enabled"/>
ans
</binding.ws>
n - t r
</reference>
a no
h a s
The attachment is added to an m
o
)
external
u i de
reference in composite.xml.
m c andnttheG
b
ni Stude
Result: Identity is propagated,
i
payload is encrypted.
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce shows the policy attachment fragment for the following scenario:
A R
The example in the slide
N
KO The scenario: SAML-based identity assertion. In this case:
- The policy enables SAML token population for outbound SOAP requests by using
the mechanisms described in WS-Security 1.0
- A SAML token is included in the SOAP message for use in SAML-based
authentication with the sender vouching confirmation
The result: Identity is propagated and the payload is encrypted.
The policy: oracle/wss10_saml_token_client_policy
Note: This policy can be applied to any SOAP-based reference.
a ble
f e r
ans
n - t r
2
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ceexternal reference, perform the following steps:
A R
To attach a policy to an
N
O 1. Right-click the external reference and select Configure WS-Policies.
K 2. Click the Add icon for the type of policy.
3. Select the relevant policy to attach.
Policies
page
a ble
f e r
ans
n - t r
a no
Specify the component
to which the policy is to h a s
be attached.
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ctoe the delivery of messages. You can attach security policies to and
N ARsecurity policies from the currently deployed SOA composite applications.
Policies
detach
apply security
wss_username_token_service_policy
wss11_saml_token_client_policy
Enrollment BookingSystem
Enrollment
BPEL
a ble
Enroll BookingService booking_client_ep
f e r
ans
n - t r
a no
Propagate security identity. as
) h de
c om t Gui
i b m wss11_saml_token_service_policy
e n
Receive security identity.
in Stu d
i n @ is
r k j a t h
n a u s e
( ko e to
Copyright 2014, Oracle and/or its affiliates. All rights reserved.
J AIN icens
R
The goal K l is to implement security on the endpoints of composite applications,
of this practice
NAas the Enrollment and BookingService interactions.
such
O
K In this practice, you perform the following tasks:
Apply the UsernameToken security to the Enrollment composite application, which
requires an authenticated username and password to be provided in the WS-Security
headers from its client. After receiving valid credentials, the policy sets the security
identity.
Attach a SAML client policy to the BookingService external reference, which propagates
the security identity to the BookingSystem composite application entry point.
Enforce a SAML service policy on Booking_client_ep, which is the entry point to the
BookingSystem composite application and which requires valid security credentials to
be provided to allow the invocation to proceed.
You first attach the security policies to the deployed applications by using Oracle Enterprise
Manager. After detaching the policies, you repeat the process at design time by attaching the
policies to the endpoints, in JDeveloper, and deploy the applications. You then deploy the
applications with the security policies disabled.
KO
N
ARK
J l
(
AIN icens
a r j a
kon e to u
k se
i
in@ this
b m
o
ni Stude
m ) h a
c nt G u
a
ide
s
n no
- t r an
s
f e r a b
le
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Request-Response Patterns
a ble
f e r
ans
n - t r
Appendix A no
s a
h a
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
Request-Response Patterns
appendix:
One-Way Message
Synchronous Interaction
Asynchronous Interaction
Asynchronous Interaction with Timeout
Asynchronous Interaction with a Notification Timer r a ble
n s fe
One Request, Multiple Responses
n - tra
One Request, One of Two Possible Responses a no
h a s
One Request, a Mandatory Response, ) and dan
e Optional
m u i
Response co t G m en
i b
@ in Stud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R K
Request-response l
patterns are used to facilitate communication between the components of
aN A
Business Process Execution Language (BPEL) process. The request-response operation
KOincludes one input element (the request) followed by one output element (the response).
Note: The request-response patterns listed in the slide are discussed on the remaining pages
of this appendix.
Request
Pattern:
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
No response
Service client Service
BPEL
Invoke
Service a ble
f e r
ans
n - t r
BPEL
Invoke Receive
BPEL
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
A one-way message interaction pattern is a special type of request-response pattern, where
OtheNclient sends a message to the service, and the service does not need to reply. This could
K be used for business updates if the requester trusts the message service and the transaction
not to fail.
The communication pattern for the one-way message interaction involves:
A service consumer: The client that invokes the service and supplies the input
message
A service provider: The service that accepts an input message from the service client,
and does not provide a response (output message)
The diagrams show various implementations of a one-way message interaction pattern, such
as:
A Mediator component with a routing rule to a service
A BPEL component to a service
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( kon e to u
J AIN icens
RK l
N A
KO
Request
Pattern:
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Immediate response
Service client Service
BPEL BPEL le
Mediator request request
r a b
BPEL
s f e
Receive - t r an
Receive
response response
n no
Route Invoke
s a
fault h a fault
Reply
o m )
u ide Reply
Client Service m c nt G
Client Service
i b d e
@ in Stu
j a i n t h is
a r k s e
n
ko e to
Copyright 2014, uOracle and/or its affiliates. All rights reserved.
(
J AIN icens
R K
In a synchronous l
interaction, a client sends a request to a service, and receives an immediate
A
N or fault.
reply
KO The service can be at either end of this interaction, and is implemented based on its role as
the client or the service. The image in the slide shows two diagrams of a synchronous
interaction between two SOA components.
A BPEL process component client with a BPEL process component service
- The BPEL client contains an Invoke to manage the request-response cycle.
- The BPEL service contains a Receive to obtain the request message, and then
after some processing, return a response by using a Reply, or throw a fault
condition.
A Mediator component client with a BPEL process service
- The client contains a synchronous route to send the request to a BPEL service,
and receive the response or fault.
- The BPEL service contains a Receive to obtain the request message, and then
after some processing, return a response by using a Reply, or throw a fault
condition.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( kon e to u
J AIN icens
RK l
N A
KO
Request
Pattern:
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Delayed response
Service client Service
J AIN icens
R K
In an asynchronouslinteraction, a client sends a request to a service and waits until the
NA replies.
service
O
K The image in the slide shows two diagrams of an asynchronous interaction between two SOA
components.
A BPEL process component client with a BPEL process component service
- The BPEL client contains an Invoke to initiate the request and do some
processing, and a Receive to obtain the response.
- The BPEL service contains a Receive to obtain the request message, and then
after some processing, return a response by using an Invoke to the client callback
port.
A Mediator component client with a BPEL process service
- The client contains an asynchronous route to send the request to a BPEL service,
and wait for a response.
- The BPEL service contains a Receive to obtain the request message, and then
after some processing, return a response by using an Invoke to the client callback
port.
Note: An asynchronous service would return errors as another response message.
Request
Pattern:
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
SOA implementation:
BPEL BPEL
request
Invoke Receive
a b le
response1
f e r
an s
Receive Invoke n - t r
response2
a no
Sequence
a s
Sequence
Receive
m ) h ide
Invoke
response3 co G u
b m en t
i
in Stud Invoke Service
Receive Client
@
in this
r k j a
n a u s e
( ko e to
Copyright 2014, Oracle and/or its affiliates. All rights reserved.
J AIN icens
In this R K
interaction l the client sends a single request to a service, and receives multiple
type,
NA in return. For example, the request can be to order a product online, and the first
Oresponses
K response can be the estimated delivery time, the second response can be payment
confirmation, and the third response can be a notification that the product has been shipped.
In this example, the number and types of responses are expected.
The BPEL Process client: When the BPEL process is on the client side of this
transaction, it needs an Invoke activity to send the request, and a sequence activity with
three Receive activities, one for each reply.
The BPEL Process service: The BPEL service needs a Receive activity to accept the
message from the client, and a sequence attribute with three Invoke activities, one for
each reply.
Note: As with all partner activities, the WSDL file defines the interaction.
Delayed response
Service client and optional response Service
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
In this R
type l the client sends a single request to a service, and receives one or
K of interaction,
A
OtwoNresponses. Here, the request is to order a product online. If the product is delayed, the
K service sends a message to inform the customer. In any case, the service always sends a
notification when the item ships.
The BPEL Process client: When the BPEL process is on the client side of this
transaction, it needs a Scope activity containing the Invoke activity to send the request,
and a Receive activity to accept the mandatory reply. The onMessage handler of the
Scope activity is set to accept the optional message and instructions on what to do if the
optional message is received (for example, notify you that the product is delayed). The
client BPEL process waits to receive the mandatory reply. If the mandatory reply is
received first, the BPEL process continues without waiting for the optional reply. As with
all partner activities, the WSDL file defines the interaction.
The BPEL Process service: The BPEL service needs a Scope activity containing the
Receive activity and an Invoke activity to send the mandatory shipping message, and
the Scope activitys onAlarm handler to send the optional delayed message if a timer
expires (for example, send the delayed message if the item is not shipped in 24 hours).
Request
Pattern:
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Delayed response
Service client or timeout Service
SOA implementation:
BPEL BPEL
request
a ble
Invoke Receive
f e r
ans
n - t r
a no
Pick response
h a s
m ) e
idInvoke
o
c nt G u
b m
onAlarm onMessage
Timeout logic logic ni Stude
Client
i Service
@
in this
r k j a
n a u s e
( ko e to
Copyright 2014, Oracle and/or its affiliates. All rights reserved.
J AIN icens
R K
In an asynchronous linteraction with a timeout, a client sends a request to a service and waits
NAit receives a reply, or until a certain time limit is reached, whichever comes first.
until
O
K The sample implementation in the slide shows:
A BPEL process client, which uses an Invoke to send an asynchronous request to the
service, and a Pick activity with:
- An onMessage branch to receive the response (callback)
- An onAlarm branch to manage the timeout condition if it occurs before the
response is received
Note: If the response comes after the time limit has expired, the message goes to
the dead letter queue.
A BPEL Process service that contains a Receive to obtain the request message, and
then after some processing, return a response by using an Invoke to the client callback
port
Note: As with all partner activities, the WSDL file defines the interaction.
Delayed response
Service client with timeout Service
SOA implementation:
BPEL BPEL
request
a ble
f e r
Invoke Notify someone Receive ans
when a timeout
n - t r
onAlarm
occurs.
a no
Scope response as
) h de
Receive c om t Gui Invoke
i b m en
Client
@ in Stud Service
n
jai e thi s
r k
a 2014,uOracle
s and/or its affiliates. All rights reserved.
o n
k e to
Copyright
(
J AIN icens
R K
In an asynchronous linteraction with a notification timer, a client sends a request to a service
O NA
and waits for a reply, although a notification is sent after a timer expires. The client continues
K to wait for a reply from the service even after the timer has expired.
The BPEL Process client: When the BPEL process is on the client side of this
transaction, it needs a Scope activity containing an Invoke activity to send the request,
and a Receive activity to accept the reply. The onAlarm handler of the Scope activity
has a time limit and instructions on what to do when the timer expires. For example, wait
30 minutes, and then send a warning indicating that the process is taking longer than
expected. As with all partner activities, the WSDL file defines the interaction.
The BPEL Process service: As with a synchronous transaction, when the BPEL
process is on the service side of an asynchronous transaction, it needs a Receive
activity to accept the incoming request, and an Invoke activity to return either the
requested information or a fault.
Note: This pattern makes use of the onAlarm branch in a Scope.
Pattern: Request
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Delayed response A
Service client or response B Service
SOA implementation:
BPEL Client Service BPEL
request
Invoke Receive
a b le
e r
Item in sf
Otherwise
a n
n-tr
stock?
Pick a no
Switch
h a s
o m )
u ide
onMessage onMessage response
m
A c ntInvoke G Invoke
B A
n S i b d e A B
i t u
in@ this
response B
r j a
k se
a
on t2014, uOracle and/or its affiliates. All rights reserved.
( kCopyright o
A I N nse
K J l i e
cone
A R
In an interaction using request and one of two possible responses, the client sends a
N request to a service and receives one of two possible responses. For example, the
single
KOrequest can be to order a product online, and the first response can be either an in-stock
message or an out-of-stock message. The diagram in the slide provides an overview.
The BPEL Process client: When the BPEL process is on the client side of this
transaction, it needs the following:
- An Invoke activity to send the request
- A Pick activity with two branches: one onMessage for the in-stock response and
instructions on what to do if an in-stock message is received, and a second
onMessage for the out-of-stock response and instructions on what to do if an out-
of-stock message is received
The BPEL Process service: The BPEL service needs a Receive activity to accept the
message from the client. It also needs a Switch activity with two branches: one with an
Invoke activity that sends the in-stock message if the item is available, and a second
branch with an Invoke activity that sends the out-of-stock message if the item is not
available.
Note: As with all partner activities, the WSDL file defines the interaction.
3. The service BPEL process has a Receive activity and a Switch activity. The Receive
activity receives the clients request (from the call service Invoke activity) and sends its
data to the Switch activity.
4. The Switch activity performs either of the following actions:
- If the item is in stock, it invokes Message A.
- If the item is not in stock, it invokes Message B.
5. Then the Switch activity sends either Message A or Message B back to the client.
6. The Pick activity in the client BPEL process receives either Message A or Message B, and a ble
f e r
depending on the message, its branches do the following:
ans
- If Message A is sent, the onMessage A branch handles the response.
n - t r
no
- If Message B is sent, the onMessage B branch handles the response.
a
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( kon e to u
J AIN icens
RK l
N A
KO
Multiple Requests
Pattern:
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
SOA implementation:
Service BPEL
Client Service 2
Flow
a b le
BPEL BPEL f e r
an s
request request
n - t r
Receive Invoke Invoke a noReceive
h a s
response m ) responseide
c o G u
Invoke Receive ib Receive
m en t Invoke
i n t u d
Service 1
i n @ is S Service 2
a r kja se th
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
In this R K J type,
interaction licethe client sends multiple requests to multiple services and receives
NA responses in return. As shown in the slide, the service client (which is a BPEL
Omultiple
K process) uses a parallel flow to coordinate the request and response interactions from two
different services. In this case, two asynchronous callbacks execute in parallel context, so that
each callback does not have to wait for the other to complete. However, the flow does not
complete until all responses are received.
An example of such request-response pattern is implemented in the purchase order course
application where the fulfillment process sends a request to determine stock availability in two
different stores, an internal and an online store. The process waits for both responses before
it chooses the store that is used to acquire the stock to fulfill the order for shipment purposes.
Another example is a loan broker process that requests and retrieves loan offers from multiple
loan service providers.
Note: If the invoked service interface definitions are identical, the pattern could be modified
into a dynamic invocation pattern.
Multiple Requests
Pattern:
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
SOA implementation:
Service BPEL
Client Service 2
Flow
BPEL BPEL
a ble
request request f e r
a n s
Receive Invoke Invoke n -t r
Receive
o
s an
) h a e
First
Pick co
m response G uid
Invoke
response
onMessage A ib
m Bent Invoke
i n onMessage
t u d
Service 1
i n @ is S Service 2
a r kja se th
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
In this R K J type,
interaction licethe client sends multiple requests to different services and expects to
NA multiple responses. However, to implement the first message response pattern, a Pick
Oreceive
K activity is used to receive the first of many possible responses, because a Pick processes
only the first message to be received for any of its onMessage branches.
As shown in the slide, the service client (which is a BPEL process) uses a parallel flow to
initiate asynchronous requests for two different services. Instead of using two asynchronous
callbacks in parallel flow, when the flow is completed, a Pick activity is used to wait for all
possible responses, in this case, one of two responses. The first response to arrive is
processed, from service 1 (as shown in the diagram), and the other response message is not
processed because Pick has completed and the service client process continues without
waiting for additional responses.
that are used at run time. The two types of properties are:
Configuration properties Updates properties
Partner link binding properties at run time
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i e
cBPEL
A R
There are two types of deployment descriptor properties:
N
KO Configuration properties, which are specific properties used by the BPEL Engine,
Enterprise Manager, or both. The server provides some predefined configuration
properties. Refer to the Oracle Fusion Middleware Developers Guide for SOA Suite 12c
for more information about configuration properties.
Partner link binding properties, which are used by BPEL process designers to
externalize literal values from a process. For example, you may define a minimum credit
rating that a customer must have before processing the order. You define partner link
binding properties on the Properties tab of the Edit Partner Link window.
The illustration shows a configuration property called inMemoryOptimization being
defined at design time by using the JDeveloper BPEL Editor. Properties are saved as name-
value pairs in <property> elements in the deployment descriptor, which is stored in the
composite.xml file that is packaged in the SOA archive.
KO
N
ARK
J l
(
AIN icens
a r j a
kon e to u
k se
i
in@ this
b m
o
ni Stude
m ) h a
c nt G u
a
ide
s
n no
- t r an
s
f e r a b
le