Professional Documents
Culture Documents
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de icens
a r n le l
K ulk ferab
p a k ans
e tr
De non-
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
a
has
applicable:
Smita Kommini
U.S. GOVERNMENT RIGHTS
)
Publishers
ฺ c om ฺ
The U.S. Government’s rights to use, modify, reproduce, release, perform, display, or
o n s den
Giri Venugopal
c Stu
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names
@
i
arn e this
may be trademarks of their respective owners.
l k
k ฺ ku o us
e p a et
i ( de icens
a r n le l
K ulk ferab
p a k ans
e tr
De non-
Contents
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2016, Oracle and/or its affiliatesฺ
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ฺ
ฺ ku o us
Configuring a Database Adapter 5-29
k
p a et
Configuring a Database Adapter Service Connection 5-30
e
( de icens
Configuring a Select Statement: Operation Type 5-31
i
a r n le l
Configuring a Select Statement: Importing Tables 5-32
ulk ferab
Configuring a Select Statement: Filtering Attributes 5-33
K
p a k ans
Configuring a Select Statement: Defining Selection Criteria 5-34
e tr
De non- Configuring a Select Statement: Editing the Expression 5-35
Configuring a Select Statement: Advanced Options 5-36
Database Adapter Runtime Connections 5-38
Transactionality 5-39
Quiz 5-40
Summary 5-41
Practice 5-1 to 5-4 Overview 5-42
Practice 5-5 to 5-7 Overview 5-43
Optional Challenge Practice 5-8 Overview 5-44
Optional Challenge Practice 5-9 Overview 5-45
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
Using Service Component Templates 10-12
) has
Using BPEL Scope Activity Templates 10-14
ฺ c om ฺ
Quiz 10-15
t i o n ide
Agenda 10-16
t e lla t Gu
BPEL Subprocesses: Introduction 10-17
o n s den
Stand-Alone Subprocess 10-19
@ c Stu
i
l k arn e this
Calling a Stand-Alone Subprocess 10-20
Inline Subprocess 10-21
k ฺ ku o us
p a et
Comparing Stand-Alone and Inline Subprocesses 10-22
e
( de icens
Creating an Inline Subprocess 10-23
i
a r n le l
Calling an Inline Subprocess 10-24
ulk ferab
Creating a Stand-Alone Subprocess 10-25
K
p a k ans
Calling a Stand-Alone Subprocess from BPEL 10-27
e tr
De non-Differences Between Templates and Subprocesses 10-28
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
Event Publication 13-10
) has
Event Subscription 13-11
ฺ c om ฺ
Event Publication and Subscription 13-12
t i o n ide
Quiz 13-13
t e lla t Gu
Agenda 13-14
o n s den
Creating an Event Definition 13-15
@ c Stu
i
l k arn e this
Configuring a Mediator to Publish Events 13-16
ฺ ku o us
Configuring a Mediator to Subscribe to Events 13-17
k
p a et
Setting Event Delivery Consistency 13-18
e
( de icens
Publishing Events in BPEL Components 13-19
i
a r n le l
Subscribing to Events in BPEL Components 13-20
ulk ferab
Managing Events from Enterprise Manager 13-21
K
p a k ans
Viewing Event Subscriptions 13-22
e tr
De non-Quiz 13-23
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
Debugging SOA Composite Applications with the SOA Debugger 14-29
) has
Starting the Debugger 14-30
ฺ c om ฺ
Setting Breakpoints in Services 14-31
t i o n ide
Setting Breakpoints in BPEL 14-32
t e lla t Gu
Initiating Debugging 14-33
o n s den
Examining Values 14-34
@ c Stu
i
Frames 14-35
l k arn e this
ฺ ku o us
Stepping Through the Application 14-36
k
p a et
Ending a Debug Session 14-37
e
Summary 14-38
i ( de icens
a r n le l
Practice 14-1 to 14-3 Overview 14-39
ulk ferab
Practice 14-4 Overview 14-40
K
p a k ans
e n-tr Composite Applications and Invoking Secured Services
De 15nSecuring
o
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
One-Way Message Interaction A-3
) has
Synchronous Interaction A-5
ฺ c om ฺ
Asynchronous Interaction A-7
t i o n ide
One Request, Multiple Responses A-8
t e lla t Gu
n s den
One Request, a Mandatory Response, and an Optional Response A-9
o
c Stu
Asynchronous Interaction with Timeout Pattern A-11
@
i
l k arn e this
Asynchronous Interaction with a Notification Timer Pattern A-12
ฺ ku o us
One Request, One of Two Possible Responses A-13
k
p a et
Multiple Requests, Multiple Responses A-15
e
( de icens
Multiple Requests, First Response A-16
i
a r n le l
BPEL Deployment Descriptor Properties A-17
K ulk ferab
p a k ans
e tr
De non-
xv
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2016, Oracle and/or its affiliatesฺ
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de icens
a r n le l
K ulk ferab
p a k ans
e tr
De non-
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2016, Oracle and/or its affiliatesฺ
K ulk ferab
p a k ans
e tr
De non-
Objectives
• Human Tasks
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2016, Oracle and/or its affiliatesฺ
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
p a k ans
e tr
De non-
BPEL The
TheBPEL
BPELactivities
activitieswe
we’ve
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
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o s aetask
Inncontrast,d
n in a human
@ c workflow S turepresents the work
i sthat needs to be done by a
l k arn e thiperson (user, role, or group).
ฺ k u us
e p ak e to
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
a
Tasksparekalso referred
a n s to as work items. Each task is associated with parameters that
describe r
ee othen-nature
t and data related to the task.
D n
initiate parameters
client task
receive
s a
)ha
m
co eฺ
n ฺ
Task parameters are either tio
simple data types, or e l
XML l a G uid
formats, described n s
with
tan XSD.ent
@ co Stud
i
arn e this
User information is typically LDAP
retrieved from an LDAP server. l k
k ฺ ku o us
e p a et
i ( de© 2014, c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
A human
p a kworkflow a n s
supports the declarative assignment and routing of tasks. In the simplest
e
e a task
case, t r
-is assigned to a single participant (user or group). Often, more complex task
D nonand routing are required. For example, tasks that follow an approval pattern may
assignment
require the task to be routed up a management chain, or worked and voted on by a group of
people. This requires some form of routing policy definition.
A participant is a user or set of users specified in the assignment and routing policy definition.
For example, a vacation request (task) is assigned to a manager (participant). The manager
must act on the request task before the vacation starts. When the manager formally approves
or rejects the request, the employee is notified of the decision. The notification can be an
email, voice message, instant message, or a short message service (SMS) message.
The Worklist application enables task assignees to view their assignments and act or route
the task as defined by the policies. The Human Task Editor tool enables you to specify task
settings such as task outcome, payload structure, task participants, assignment and routing
policy, expiration and escalation policy, and notification settings.
Portals
Service Deadlines Client
Interface and Interface Email and
Escalations
RSS
a
has
Clients
Phone
m ) and
Presentation
ฺ c oOther
t i o n Channels
i d eฺ
Notification
t e lla t Gu
o n s den
@ c Stu
i
l k
n example,
ar(for
Identity
e hisLDAP)
Directory
t
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
Many p a k abusiness
end-to-end n s processes require human interactions with the process. For
e
e ohumans
example, t r
n- may be needed for approvals, exception management, or performing
D n that
activities 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
s a
)ha
m
co eฺ
n ฺ
l a t io uid
s t el nt G
They can also be added to
a BPEL process as part of c on tude
an orchestrated interaction.
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
p a
Typically,ka human a ntask in a composite application is associated with a BPEL process and is
e
e on t r
as-part of the business process flow. However, a human task can also be added as
Dintegrated
n component. A stand-alone human task component is useful when there is no
a stand-alone
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 The configuration is
composite application. stored in a .task file.
s a
)ha
m
co eฺ
Tabs on the left side of n ฺ
the editor provide access
l a t io uid
to categories of
s t el nt G
configuration parameters.
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
In the p a k K aEditor,
Composite n sfe create a human task component in the composite. During creation, if
you
D -tr Composite Service with SOAP Bindings,” the human task is exposed to the
eeselecton“Create
clients n
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
s a
)ha
m
co eฺ
n ฺ
l a t io uid
s t el nt G
c on tude
a
are organized into r ni@ this S
The configuration options
categories.ulk s e
ฺ k u
e p ak e to
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
a k a ahuman
After creating
p n s task component in the SOA composite application or a BPEL process,
e.task
the r
e nfile-tis opened in the Human Task Editor, where you can configure task parameters
D no The editor enables you to configure settings that are organized into sections,
and properties.
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
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
Set a priority for the task.
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
General
p a k details
task a n sinclude the title for the task, a priority, a task owner, and a comma-
ee olist
separated n r
-tof outcome strings. The default outcomes are APPROVE and REJECT, but
D n be modified.
these can
1. Click the magnifying glass icon next to the Outcomes field.
2. In the Outcomes dialog box, select options from the list of seeded values. To create
additional outcomes, click the Create (green plus symbol) icon.
3. In the Add Custom window, enter a string for the custom outcome and click OK. The
new outcome is added to the list.
4. Select the desired values and click OK.
s a
)ha
m
co eฺ
n ฺ
l a t io uid
s t el nt G
c on tude
ni@ this S
The “Editable via worklist” check box
enables users to modify the task
a r
parameters in the Worklist application.
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
a k
Task parameters
p a n the structure of information passed to the Task Service. If you generate
form
e
e Form
a Task t r
-with the information included, task parameters can be displayed in the Worklist
D nonso that a task assignee can view and optionally modify the data.
application
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.
s a
)h a
m
co eฺ
n ฺ
l a t io uid
s t el nt G
c on tude
r n i@ is SorAddmultiple a single participant
l k a e th participants in
ฺ k u us serial or parallel.
e p ak e to
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
a k anstab, you configure the route that the task will follow. You also assign the
On thepAssignment
ee onwho
participants
D -tr will review and those who will receive errors. The icons on the Component
Palettenallow 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.
s a
)h a
m
co eฺ
n ฺ
l a t io uid
s t el typically
An LDAP
n t Gapplication
c on tudsource e serves as the
of participant
K ulk ferab
a
Click the
p k icon
Add a ninsthe Participant list section. Select to add a user, a group, or an
ee onrole.
application r
-t The Identity Lookup window opens. This window enables you to look up the
D n and application role names that are configured in an identity server, such as an
user, group,
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
s a
)ha
m
co eฺ
n ฺ
l a t io uid
s t el nt G
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
In the p a k K ansection,
Assignment sfe you configure the assignees to whom the task is routed and
ee how
specify n -
thetr task is routed to those assignees. When you first display the Assignments
D o are provided with a single stage and no participants. In simple terms, assignment
section,nyou
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
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
“Escalate after” sets the number of
levels and the highest approver title.lk
arn e this
k ฺ ku o us
e p a et
i ( de© 2014,c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
a k thataare
The options
p n savailable in the Deadlines section of the Human Task Editor include:
e nExpire:
-t r
D•e Never
n o 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).
s a
Double-click the human
)ha
task activity to open the m
co eฺ
configuration dialog box.
n ฺ
l a t io uid
When the configuration dialog box s t el nt G
is closed, an <if> activity is c on tude
created to process each of the
possible outcomes of the task. a r ni@ this S
k u lk se
p a kฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
p a
To create k
a human a ntask in a BPEL process, add a human task activity to the process flow.
e t r
- Human Task window opens, select an existing task definition or create a
e theoCreate
When
D n ntask. After you click OK, a .task file is created and opened.
new human
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
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de icens
a r n le l
K ulk ferab
p a k ans
e tr
De non-
component.
a. True
b. False
s a
)ha
m
co eฺ
n ฺ
l a t io uid
s t el nt G
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
Answer: a k
p -tran
b
e e
D n n can be used as a stand-alone component within a composite application, and
A humanotask
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
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
p a k ans
e tr
De non-
K ulk ferab
a k forms
Task display
p a n s
provide Worklist application users with a way to view and optionally modify
e t r
- Oracle BPM Worklist application displays all tasks assigned to a user logged in
e data.oThe
task
D n nassignee. When a task assignee clicks an assigned task, a task display form
as the task
appears to show the task information. However, if the composite application that contains a
human task component is not deployed with a task display form, the task information details
are not displayed.
Oracle Application Development Framework (Oracle ADF), which is integrated with Oracle
JDeveloper, enables you to design task display forms that display task information and the
parameters received from a human task in a SOA composite application.
ADF-based task display forms can be generated from the human task activity in a BPEL
process or created by using the ADF task flow based on a human task item in the JSF
category in the New Gallery window.
Advanced users can design their own task display forms by using ADF data controls 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.
Note: Before creating task flow forms, change the encoding preference to UTF-8 in the
JDeveloper Tools > Preferences > Environment settings.
s a
)ha
m
co eฺ
n ฺ
l a t io uid
s t el nt G
c on tude
Task parameters obtained
a r ni@ this S
from a task payload definition
k u lk se
p a kฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
a
If the SOA
p kcomposite
a n includes a human task, you need a way for users to interact with the
task.e - t r
e Theointegrated development environment of Oracle SOA Suite includes Oracle ADF,
D n n you to design a task display form that depicts the human task in the SOA
which enables
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
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
Task flows can be deployed @ c Stu
i
with their related composite
l k arn e this
applications.
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
a
Beforepyouk deploy
a n s task display form files, the composite application that utilizes them
the
ee already
should n r
-t be deployed.
D n o
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 project’s
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.
s a
)ha
m
co eฺ
n ฺ
l a t io serveruid
By default, the Oracle WebLogic Managed
instances have an embedded s t el server,
LDAP n t G
which can
be used for authentication c t u de
onand authorization.
LDAP
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
p a
The Oracle k BPM a n
Worklist application is a web application that is installed with Oracle SOA
e
Suite - t r
e 12cocomponents. To access the Worklist application, use the following URL:
D n n
http://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.
K ulk ferab
a k log inatonsthe Worklist application, they can view the task assignments, work
After users
p
ee and
queues, n - tr parameter information by selecting the specific task.
task
D no application provides a default webpage with task information, excluding task
The Worklist
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
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
Answer: aak n s
e p t r a
De non-
True
• Human Tasks
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2016, Oracle and/or its affiliatesฺ
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
p a k ans
e tr
De non-
interface interface
WebLogic Domain
JMS
s a
)ha
XMPP EMAIL SMPP Extension drivers
m
n ฺ co eฺ
l a t io uid
s t el nt G
c on tudeservers
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
Although
p a k
not parta nof human tasks, notifications are often part of applications that include
e
e tasks.
human t r
- The notification service enables an asynchronous message to be sent to a user
D non channel. The message can be sent as an email message, a voice message, a
by a specific
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: s a
– BPEL notification activities, such as email, IM, and voice) h
a
– Human workflow notifications that also provide actionable ฺ c om ฺ
t i o n ide
messages
t e lla t Gu
– Oracle BAM alerts for monitored events o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
a
OraclepUMSk enables
a n stwo-way communication between users and composite applications. It
ee ooperations
exposes n r
-t that can be invoked from the BPEL business process or human task to
D n
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
s a
)h a
m
co eฺ
n ฺ
l a t io uid
s t el nt G
2 c onnotification
Set
t u demode and email
a r ni@ thiproperties s S as appropriate.
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
p a k
The workflow n
notification
a services are communicated through Oracle UMS components.
e
Toeconfigure t r
-the workflow notification properties, use Enterprise Manager Fusion Middleware
D onaccess
Controlnand 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ฺ
s a
)ha
m
co eฺ
3 n ฺ
l a t io uid
s t el nt G
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
p a k
In addition to n the Workflow notification properties, configure the user messaging
configuring
a
e
e driver
email - t r
nsettings to ensure that the email server and protocol settings are correctly
D noTo
specified. 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.
s a
)ha
m
co eฺ
n ฺ
l a t io uid
s t el nt G
3 c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
You can
p a k
monitor a n view the notification activity performed by the human workflow service
and
e
e To
engine. t r
- and test the human workflow notification activity, perform the following steps:
nview
D n o
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
Email Driver a s
m )h
SMTP
n ฺ co eฺ
IMAP/POP
l a t io uid
s t el nt G
c on tude
Email
r ni@ thisimplemented S Email activity is
server
l a
k se as a scope.
u
ฺk to u
p sea k
e e
d © 2014, n
i ( l i c e
arn able
Copyright Oracle and/or its affiliates. All rights reserved.
l k
k Ku sfer
The BPEL
e p a processr a ncomponent provides different ways to notify users through email, IM, SMS,
e Twitter
and - t
nactivities. The example in the slide implements email notification by:
D n o
• 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.
s a
)ha
m
co eฺ
n ฺ
The user notification activity:
l a t io uid
• Sends a message to a
s t el nt G
•
user’s preferred channel
Enables additional c on tude
properties to be sent
r n i@ is S
with the message
u l k se th
a
a k ฺk to u
e e p se
i ( d © 2014, c e n
l i
arn able
Copyright Oracle and/or its affiliates. All rights reserved.
l k
k Ku sfer
The user
e p anotification
r a n activity enables a BPEL process design in which a notification channel is
eexplicitly
not t
n-specified during design time, and simply indicates that a notification must be
D nonotification
sent. The 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.
K ulk ferab
p a k ans
e tr
De non-
A composite application is
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2016, Oracle and/or its affiliatesฺ
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n sDatabased e n notification
and
@ c Stexternal u references
i
rn this and email provide customer lookup
l k a e capabilities.
k u s
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
a k
e ep n-tran
D no
A Database adapter is
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2016, Oracle and/or its affiliatesฺ
a
) has
ฺ c om ฺ
An email task advises
t i o n ide
a of Gu
customers of thellstatus
e
s
their
n t
order.
e n t
@ co Stud
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
p a k ans
e tr
De non-
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
p a k ans
e tr
De non-
Objectives
K ulk ferab
p a k ans
e tr
De non-
• Templates
• BPEL Subprocesses
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
p a k ans
e tr
De non-
K ulk ferab
a
In addition
p kto thearun-time
n s Metadata Services Repository, Oracle SOA Suite includes a file-
ee SOA
based n -t r
design-time MDS Repository for use during design time. The repository is
D o
n created when you create a SOA composite application. The default directory
automatically
location is $JDEV_USER_DIR/soamds, but the repository location can be modified to point to
another folder or version control location.
The SOA-MDS Transfer wizard enables you to share WSDL, XSD, WADL, and XQuery files
with the SOA design-time MDS Repository. This eliminates the need to duplicate these
resources across projects and applications. When artifacts are moved into the repository, all
dependencies are included and references to the transferred artifacts are updated with the
correct MDS URLs on transfer.
WADL refers to Web Application Description Language.
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de icens
a r n le l
K ulk ferab
p a k ans
e tr
De non-
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
Answer:p bk
a a n s
ee When n t r
-artifacts
D
False.
n o are moved into the repository, all dependencies are included and
references to the transferred artifacts are updated with the correct MDS URLs on transfer.
• Templates
• BPEL Subprocesses
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
p a k ans
e tr
De non-
l k
k Ku sfer
e p a is a rreusable
A template a n part of an Oracle SOA Suite project that you can use to create new
e oThere
projects. t
n- (subpart
are three types of templates, as described in the slide. Use templates to share
D
common n code of a process or a scope) between applications, composites, and
processes. You create the template once, and then share it with others. The template can be
reused multiple times.
Project templates are a way of creating a SOA project instead of starting with an empty
composite. The template can include predefined components, as well as services and
references. For example, frequently used adapters and transformations can be pre-configured
in a template to eliminate the need to re-create the same components every time a new project
is created.
Component templates package one main component, for example a BPEL process, including
all references (adapters and bindings) invoked by the process. You can enforce best practices
by packaging a BPEL process with a predefined fault handler and a number of mandatory
variables as a component template and sharing it across departments. By providing this
template to all developers, you ensure a consistent way of handling faults and naming
variables.
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
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de icens
a r n le l
K ulk ferab
p a k ans
e tr
De non-
Default Location
Custom Location
s a
Create Template ) h a
Wizard m
co eฺ
n ฺ
l a t io uid
s t el ntMDS G
c on tude Repository
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
p a
To create k
a template,
a n right-click the appropriate object and select Create Template to invoke
e
theeCreate n - t r
Template wizard. You specify a name and location for the template. The location
D
can be n odesign-time
the 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
) has
ฺ c om ฺ
t i o n ide
The project is t e lla t Gu
created from
o n s den
the template.
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
k atemplate,
To usepaaproject n s in the Create SOA Application wizard, select the start type: SOA
ee oThen,
Template. n r
-t specify the desired template.
D n
1
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2016, Oracle and/or its affiliatesฺ
2
Select the specific template.
s a
)ha
3 m
co eฺ
n ฺ
Review the template
l a t io uid
information and click Finish.
s t el nt G
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
1. To
p a k
use n
a component
a template, right-click in the Components swimlane of the composite
e t r
n- window. Select Insert > Component Template.
De overview
n o
2. Select the specific template.
3. Click Finish.
a
) has
ฺ c om ฺ
t i o n ide
The component and any t e lla t Gu
4 dependencies are added ons d e n
to the project.
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
4. When
p a akcomponenta n s template is used, the service component and its dependencies are
added t r
ee to othen-project.
D n
Component Palette.
1
K ulk ferab
1. Scope
p a kactivityantemplates
s can be added to a BPEL process from the Component Palette.
e
2. eWhenothe
t r
n-scope is added, you are prompted to resolve any naming conflicts (if the project
D n
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
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
Answer:p aa,kc, and a es
n
ee ocomponents
n -t r
D
Projects,
n (such as BPEL processes), and scope activities can be packaged as
templates.
• Templates
• BPEL Subprocesses
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
p a k ans
e tr
De non-
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) a
) has
• Execute completely in the context of the parent process,
ฺ
permitting access to process variables and inheriting c omfault
t i o n ideฺ
handling and compensation logic ella Gu s t ent
co Studn
i @
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
BPEL p a k limited
provides a n s support for modularizing business process logic for reusability. The only
method -t r
ee isotonpackage reusable process logic as completely separate processes, which are
D
utilized n
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.
s a
)ha
m
co eฺ
n ฺ
l a t io uid
s t el nt G
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
a k
A subprocess
p n is not a valid business process, but is a self-contained snippet of
element
a
e
e logic.
process t r
n- All references in its process snippet resolve to local definitions or arguments,
D nodefined
which are 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.
s a
)h a
m
o ฺ
csubprocess.
A call activity transfers control to the
n ฺ
There is no service invocation.
l a t ioArguments
u i dinethe
call activity map in-scope
s t el variables
n t Gand partner
links to subprocess
argument iscpassed on eitherelement
t u dbyevalue or reference.
parameters. Each
a r ni@ this S
k u lk se
p a kฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
Withinpaa k K BPEL
parent a n s e
fprocess, a call activity transfers control to the subprocess. There is no
e
service t r
n- the call
e invocation. Therefore, no inbound message activity is required to consume the
D
messagenofrom 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 activity’s
arguments. Outputs are pass-by-value parameters that are written to by the subprocess.
An inline subprocess is a
subprocess embedded in
s a
another (“parent”) process.
)ha
m
co eฺ
n ฺ
l a t io uid
Arguments in the call
variables andn s telactivity tG
map
linksetonthe inline
subprocess
@ coelement
partner
S ud
tparameters. The
i
l k rn in scope
subprocess
aitems e t hisat the time of the call.
can also refer to other
k ฺ ku o us
e p a et
i ( de© 2014, c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
An inline
p a k ansis a subprocess that is embedded in another (“parent”) process.
subprocess
eeactivityn - tr
D
A call executes
no and partner the referenced subprocess code. Arguments in the call activity map in-
scope variables 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
s a
Can be called from any BPEL process in Is part of the parent BPEL process code ) h a
the same composite and is not visible in the composite m
co view
o n ฺ eฺ
Does not have an interface, and can be Can be called only from t i the parent
la partner u i d
BPEL
called only from another BPEL process. It process. It can use t e lthe t G links and
can include partner links. o
in-scope variables n s ofdtheenparent process.
@ c Stu
Defines the parameters to set Can i
rn thdefine
either is the parameters to set or
k a
ฺ k ul canususe e parent process values
e p ak e to
i ( de© 2014,c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
a
Stand-alone
p k andainline
n s subprocesses are both available only in BPEL 2.0. Both are invoked by
e (extension)
theeBPEL n -t r call activity. Both are visible in the components window in JDeveloper.
D n o
Beyond these similarities, there are only differences. Stand-alone subprocesses can be called
by any number of BPEL processes within the same composite application. Inline subprocesses
are embedded within a single BPEL process, and are visible only from within that process.
Both stand-alone and inline subprocesses can include variables and partner links. The calls to
both types of subprocess can include mapping of process values to subprocess arguments.
However, inline subprocesses can also make use of any partner links and/or variables that are
in scope at the time of the call activity.
s a
)ha
m
co eฺ
n ฺ
l a t io uid
s t el nt G
Assign a name, and if
2 desired, add a label and/or c on tude
an image.
r niBy@default, i s S
the scope is
a 3
lk sconverted e h
t to a call activity.
k u
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
a k
Inline subprocesses
p a n are created from process scope activities. To create an inline subprocess,
e t r
ecreateonand- configure a scope with the activities that will define the subprocess. To convert
first
D
the scopen 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ฺ
s a
)ha
m
co eฺ
n ฺ
l a t io uid
s t el nt G
on istude
A call activity
c
a r ni@ this S 3
generated.
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
a
To callpan kinline n
subprocess,
a perform the following steps:
e t r
n-the Subprocesses section of the Component Palette. All available subprocesses
D1.e Expand
n o
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.
s a
)ha
m
co eฺ
n ฺ
l a t io uid
s t el nt G
c on tude
Name the subprocess
2 and click OK.
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
p a
To create k
a n BPEL subprocess, perform the following steps:
stand-alone
a
e t r
na- SOA composite application that includes a BPEL 2.0 process. Right-click in the
D1.e Create
n o
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
) has
ฺ c om ฺ
Configure the subprocess,
t i o
5
n ide
4 adding the required logic and
e G u
lla Thetsubprocess
variables. Save your work.
n s t e n is
K ulk ferab
a k athenssubprocess in the SOA Composite Editor and select Edit.
3. Right-click
p
e n-the tr desired process logic in the stand-alone subprocess. This can include
D4.e Design
no activities, and partner links.
variables,
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
) has
A subprocess is a BPEL code snippet that is intended for a specific
purpose. A subprocess can be called and used as it is. An inline ฺ c om ฺ
t i o n idcodee
subprocess of 50 lines can be called twice and the parent l a
el better
process
Gandu
remains at 50 lines, and not 100. Subprocesses s t
perform n t
have a smaller memory footprint than templates. c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
a k
e ep n-tran
D no
s a
)ha
m
co eฺ
n ฺ
l a t io uid
s t el nt G
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
Answer: a k
p -tran
a
e e n subprocess can either define the parameters to set or can use parent process
D
True. An o
n inline
values. Stand-alone subprocesses require that you define the parameters to set.
K ulk ferab
p a k ans
e tr
De non-
s a
)ha
m
co e3ฺ
n ฺ
1 l a t io uid
s t el nYou t G and
create
You first import a
collection of templates c on tudeBPEL subprocess.
call an inline
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de icens
a r n le l
K ulk ferab
p a k ans
e tr
De non-
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2016, Oracle and/or its affiliatesฺ
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
p a k ans
e tr
De non-
Objectives
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
p a k ans
e tr
De non-
• REST: Overview
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2016, Oracle and/or its affiliatesฺ
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
p a k ans
e tr
De non-
Resources are
s a
typically described with
either XML or JSON. )ha
m
co eฺ
n ฺ
XML
resource Each
l a t io has
resource u idits
JSON l
teown G
t or
address
n s e n
co SIdentifier tud (URI).
Uniform Resource
i @
rn this
l k a
ฺ k u use
http://<host>:<port>/soa-infra/resources/<partition-name>/relative/resource/path
e p ak e to
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
• REST
p a k stands a n s Representational State Transfer.
for
e nprovides
-t r
D•e REST
n o an alternative to using SOAP-based web services.
• 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
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
• Stateless operations s a
• Operations that require high
)ha
levels of security and m
co eฺ
reliability
n ฺ
l a t io uid
s t el nt G
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
For webp a k
services a n require robust security, transactions, and reliability, SOAP can leverage
that
e - t r
theeWS* standards, and would typically be a better choice. However, because of its use of URIs
D non message formats such as JSON, REST can offer better performance and
and lighter-weight
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
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
p a k ans
e tr
De non-
a
) has
ฺ c om ฺ
t i o n ide
Oracle SOA Suite
t e lla t Gu
composite applications
can also be exposed o n s den
@ c Stu
as a REST service.
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
The REST
p a kadapter a n s be used to expose and consume REST services.
can
e t r
De non-
s a
Provide a relative path
for the resources. )ha
m
co eฺ
n ฺ
l a t io uid
s t el nt G
c on tude
Name the operation, resource
path, and HTTP verb. a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
To create
p a k
a REST a nbinding, you provide a name and an optional description, and identify it as
e
e a service
either t r
- or a reference. You then provide a relative path (URI) for the resources.
D
Finally, n onbind
you the operation, the resource path, and the HTTP verb.
s a
)ha
m
co eฺ
n ฺ
Describe the request and
l a t io uid
response messages.
s t el nt G
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
When p a k Ktheabinding,
adding n sfe the HTTP verb (method) is selected from a drop-down list. You then
describe
D -tr and response messages by using the Type Chooser.
ee othenrequest
n
http://<host>:<port>/soa-infra/resources/<partition-name>/PackAndShipService/packingService/shipping
s a
)ha
m
co eฺ
n ฺ
l a t io uid
s t el nt G
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
The slide
p a k
shows n finished binding component, the resource URI, and a sample HTTP
the
a
e
message, n-
e oincluding t r both the header (the method or verb can be found here) and the payload
D
(in this n
example, the XML message).
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
a k aWADL
The component
p n s can be observed from within JDeveloper.
e t r
De non-
s a
)ha
m
co eฺ
n ฺ
l a t io uid
s t el nt G
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
Testing
p a
of k
the n
component
a can be completed by using the HTTP analyzer in JDeveloper. The
e t r
e oin nthe- slide shows a request message being sent, and the response received. In this
example
D n the status field of the message was updated by the called operation.
example,
a. XML
b. URIs
c. SOAP
d. JSON
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
Answer:
p bk
a a n s
ee queries
n r
-tuse URIs to describe resources.
D
REST
n o
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
p a k ans
e tr
De non-
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
p a k ans
e tr
De non-
4
a
) has
1 ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
2
@ c Stu
i
l k arn e this
JDeveloper
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
1. In
p a k practice,
this a n syou modify the HelloBPEL composite application by exposing it as a
e nservice.
-t r
De REST o
n test the service from JDeveloper.
2. You
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.
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de icens
a r n le l
K ulk ferab
p a k ans
e tr
De non-
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2016, Oracle and/or its affiliatesฺ
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
p a k ans
e tr
De non-
Objectives
K ulk ferab
In this p a k youanlearn
lesson, s basic vocabulary and the concepts for Oracle Business Rules. You
learn -t r
eehowotonconfigure business rules and Decision Tables. You also learn how to invoke your
D n business rule service component from a BPEL process.
configured
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
p a k ans
e tr
De non-
K ulk ferab
a k aRules
OraclepBusiness n s enable dynamic decisions at run time, allowing you to automate
policies, n r
ee computations,
-t and reasoning while separating rule logic from the underlying
D o
n code. This allows more agile rule maintenance and enables business analysts to
application
modify rule logic without programmer assistance and without interrupting business processes.
Consider implementing rules for the following cases:
• Volatility: Rules that are likely to change frequently
• Impact: Rules that affect the business the most
• Ownership: Rules owned by particular business parties
• Compliance: Rules that express regulatory requirements
• 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.
a
The parameters for these conditions can be changed
) h as
independently of the process. m
ฺ c o ฺ
• Data validation and constraint checks t n
io uide
l
el ona G
– Validate input documents or apply constraints s t n t requests.
• Human task routing c on tude
r n i@ is S
– Policy-based task assignments l a
k seto tspecific h roles or users
k u
ฺ among u users
– Load balancing of
p aktasks t o
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
Dynamic
p a k n Rules can perform intelligent routing within a business process based
processing:
a
e t r
n- agreements
oneservice-level or other guidelines. For example, if a customer requires a
D nowithin
response 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
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de icens
a r n le l
K ulk ferab
p a k ans
e tr
De non-
s a
)ha
If customer is a Premium customer, THEN apply a 10% discount. m
co eฺ
n ฺ
l a t io uid
s t el nt G
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
Kform, asfbusiness
e
a k
In its simplest
p a n rule can be expressed as an if/then statement. The IF part
e
e oneoornmore
tests t r
- business terms. If the tests pass, one or more actions are performed in the
D n such as adding or changing business terms.
THEN part,
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
Customer.status
Facts are discrete s a
pieces of data
)h a
that constitute the m
co eฺ
input and output n ฺ
values for the
Discount.amount
l a t io uid
business rule. s t el nt G
c on tuWhen de a fact is put
a r ni@ this S forth in memory, it is
k u lk se said to be asserted.
ฺ
ak e to u
e p
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
Rules p a
are kappliedantosdata objects that are known as facts. Facts are discrete pieces of data that
ee othe
constitute n tr and output values for a business rule. Facts must be exposed through XSD
-input
D n Fact definitions make up part of a data model, and must be defined before you can
definitions.
create rules.
These facts are asserted and added to the working memory of a rule session. Each data object
instance corresponds to a single fact.
Decision Table R1 R2 R3
K ulk ferab
a k have
Fact properties
p a n sa name, value, data type, and an optional value set. Value sets define a
evalues,
listeof n r
-at range of values, or an enumeration of values for a specified type. A value set
D o
n value space of a fact property data type into buckets that can be used to specify
splits the
constraints on the values associated with Decision Tables, choice lists, variable initial values,
and function return values or function argument values.
There are three forms of value sets:
• List of values (LOV): Defines a list of values
• List of ranges: Defines a list of value ranges, defined by range endpoints
• Enumeration: Defines a list of fixed types. Enumerated types can be imported from XML
or Java facts.
You can define a value set as a global construct that allows reuse, or as a local construct that
applies to only one condition expression.
THEN needsApproval=true()
orderTotal
needsApproval
s a
)h a
approvalLimit m
co eฺ
n ฺ
A global represents a
Working Memory l a t io uid
data value or an
s t el can n t G
expression that can
c o n ude
Globals be variable
be evaluated in rule
i @ or
S t
constant. They are
conditions and
k a rn this similar to public static
expressions.
k l
u use variables in Java.
ฺ
ak e to
e p
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
A global
p a k anasdata value or an expression that can be evaluated in rule conditions and
represents
ee on-For
expressions. tr example, if a 10% discount is used in several rules, you can create and use a
D n
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
IF/THEN s a
IF/THEN
)ha
m
co eฺ
n ฺ
l a t io uid
Rulesets and Decision Tables
are seen as a unit of s t el nt G
execution and can be chained c on tude
together.
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
Rules p a
and kDecisiona nTables are grouped in an Oracle Business Rules object called a ruleset. A
e
ruleset - t r
e is oancollection of one or more related rules and Decision Tables that are seen as a unit
D n and that can be chained together to yield an outcome. A ruleset provides a
of execution
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
l k
k Ku sfer
a one roramore
You group
e p n facts, functions, globals, value sets, and rulesets in an Oracle Business
t
D on-called athat
e object
Rules
.rulesnextension)
dictionary. A dictionary is an XML file (in the local file system with a
stores the application’s 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.
s a
)h a
rule goldDiscount { m
co eฺ )
if (fact Order ord & fact GoldCustomer(cust: ord.customer) n ฺ
l a t io uid
tel enspent
{
ord.discount = 0.1;
The RL fact GoldCustomer
infer that n if s
a customer
t Gis$500
used to
assert(ord);
the past c othree months,
t u d the customerin is
}
r n i@ forisa S
eligibleh 10% discount.
} l k a e t
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
a k thatanrequire
For situations
p s more complex business logic, Oracle Business Rules supports a
ee oJava-like
high-level n r
-t language called Oracle Business Rules RL Language (RL Language). RL
D
Languagen 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
s a
Composer )ha
m
co eฺ
n ฺ
Custom Java API l a t io uid
Java s t el nt G
Application c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
a
The Oracle
p k Business
a n Rules SDK (Rules SDK) is a Java library that provides business rule–
e t r
e on-features that a developer can use to write a rule-enabled program that accesses
management
D n or to write customized rules programs that add rules or modify existing rules. The
a dictionary,
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?
s a
)ha
m
co eฺ
Inference
n ฺ
If yes, execute rules.
l a t io uid
Engine
s t el nt G
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
a k K aRules
OraclepBusiness n sfeis a data-driven forward chaining system, in which the facts determine
ee rules
which -
are
n trevaluated. When a matching rule fires, the rule may add more facts. New facts
D nocompared against the rules. The process repeats until a conclusion is reached or the
are again
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
s a
)h a
Facts Value sets m
Globals
co eฺ
n ฺ
l a t io uid
s t el nt G
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
When paa k K anissdeployed
dictionary
fe in a SOA composite application, Oracle Business Rules lets you
use e - t
e SOAoComposer r to view, edit, and commit changes to a dictionary. SOA Composer is a
D n n editing tool.
browser-based
as a unit of execution.
a. Fact
b. Ruleset
c. Dictionary
s a
)ha
m
co eฺ
n ฺ
l a t io uid
s t el nt G
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
Answer: a k
p -tran
b
e e
D n isna collection of rules that are considered as a unit of execution, and can be chained
A ruleset o
together to yield an outcome.
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
p a k ans
e tr
De non-
s a
)ha
m
co eฺ
n ฺ
l a t io uid
One of the most common ns
tel ent G
uses is to call the component
@ co Stud
i
l k arn e this
from a BPEL process.
k ฺ ku o us
e p a et
i ( de© 2014,c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
a
A Business
p k Rulesanservice
s component (also called a Decision component) can be used to
ee ondynamic
implement r
-t routing with a Mediator component. It can be implemented as advanced
D
routing n
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.
s a
)ha
m
co eฺ
n ฺ
l a t io uid
s t el nt G
c n XML
oinitial u e structures
dfact
Specify the
i@defaultisDecision t
S service input
and
a r nthe h
t message structures.
k u lkand output s e
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
p a
To create k
a Business
a n Rules component in a composite application, perform the following steps:
e - t r
D1.e Drag
non
a Business Rules component into the Components column.
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
s a
)ha
m
co eฺ
n ฺ
l a t io uid
s t el nt G
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
Creating
p aakbusiness
a n rule in a BPEL process provides you with the option to create a new
e
e oRules
Business t r
- component in the composite application, or to select a Business Rules
D n nthat already exists in the composite application. In addition, creating a business rule
component
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ฺ
s a
)ha
m
co eฺ
Map BPEL variable n ฺ
values to input and l a t io uid
(if the business rule s t el nt G
is synchronous) c on tude
output facts.
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
If you p a
havekalreadya nadded the desired Business Rules component to the composite and
e t r
e onit,-select the desired dictionary and, from that dictionary, the operation. Then map
configured
D n and output facts for the business rule to the appropriate BPEL variables.
the input
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.
s a
)ha
m
co eฺ
n ฺ
l a t io uid
s t el nt G
c n ude
oseries
The Rules Designer includes @ a S oft
tabs to provide editing
i
n ttohieach
raccess s of
l k a
ofua business e
the elements k
k ฺ u s rule.
p a et o
e
de© 2014, nsand/or its affiliates. All rights reserved.
i (
n le li
Copyright c e
Oracle
a r
K ulk ferab
a k Rules
The Business
p a n sdictionary holds the rules that are executed by an application. The Rules
ee osaves
Designer n r
-t rules and their associated definitions in the dictionary (a .rules file). The
D n is created when you first add a Business Rule component to your composite or BPEL
dictionary
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
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
Specify Constant and/or @ c SUse tuExpression Builder
i
l k arn e this to define a value.
Final if appropriate.
k ฺ ku o us
e p a et
i ( de© 2014, c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
1. In p a kRulesanDesigner,
the s click the Globals tab, and then click the Create (+) icon.
e t r
- Global window, enter a name (for example, defaultDiscount), select a
D2.e InType
non(for example, int), and in the Value field, click the Expression Builder icon.
the Edit
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.
s a
)ha
m
co eฺ
n ฺ
l a t io uid
s t el nt G
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
p a
To define k
a “List ofnValues” value set, perform the following steps:
a
e t r
- Designer, click the Value Sets tab, and then click the Create (+) icon > “List
D1.e Innthe
o nRules
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
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
Rulesets
p a k aanway
provide s of organizing your rules. Before rules can be created, you need to
ee a ruleset
create n r
-t as a container for the rules. After the ruleset is created, rules and Decision
D
Tables n o
can be defined within it.
s a
)ha
m
co eฺ
n ฺ
l a t io uid
s t el nt G
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
p a
To create k
a Decision
a n Table and a condition operand, perform the following steps:
e t r
- Designer, select an existing ruleset. Click the Add icon and select the Create
D1.e Innthe
o nRules
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.
s a
)ha
m
co eฺ
n ฺ
l a t io uid
s t el nt G
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
a k
The configuration
p a n highlighted thus far have resulted in the definition of a Decision function
steps
e t r
D on- andto invoked
e is exposed
that
providenexposure
by the BPEL process. However, Decision functions do more than
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.
K ulk ferab
p a k ans
e tr
De non-
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
K ulk ferab
In this p a k you
practice, a n s and configure a business rule and call it from a BPEL process. This
create
ee process
BPEL n r
-talso calls the ManualApproval application that you completed in the lesson titled
D n o
“Implementing a Human Workflow and Notifications.”
In the business rule, a pair of rules will use the IF/THEN logic to compare the incoming order
total to a global that defines the threshold for manual approval, and to determine whether or not
the order requires manual approval. This determination is returned to the BPEL process.
If approval is required, the Manual Approval composite is invoked.
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
s a
)ha
The results of the
business rule are
m
co eฺ
n ฺ
incorporated into the
l a t io uid
order data, and the
s t el nt G
order is published to c on tude
a JMS Queue.
a r ni@ this S
7
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
In this p a k K practice,
optional n s feyou modify, redeploy, and test the OrderProcessing composite
ee onIf-the
application. traorder is approved, either manually or automatically (because the total is
D
below then 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.
K ulk ferab
a k Table
The Decision
p a n suses a [provided] XSD document to define the input and output facts and
e sets
theevalue n r
-tto constrain the possible shipping choices and carriers.
D n o
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
p a k ans
e tr
De non-
Objectives
• Events: Overview
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2016, Oracle and/or its affiliatesฺ
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
p a k ans
e tr
De non-
DB
Adapter
Stock
Updated
s a
)ha
m
co eฺ
n ฺ
When a business event occurs:
l a t io uid
• Is it of interest to any other services?
s t el nt G
• How should those services be invoked?
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
a
Decoupled
p k n SOA applications require complete separation of the service consumer
composite
a
e t r
- provider, which is typically achieved through the use of asynchronous
e the service
and
D nonwhere applications can perform in a “fire and forget” mode.
messaging,
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
s a
mediator BPEL mediator )ha
m
co eฺ
describe n ฺ
events Service Infrastructure l a t io uid
s t el nt G
c on tude
MDSa r ni@ this S
EDL XSD
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
The Event
p a kDelivery
a nNetwork (EDN) is not a messaging infrastructure. It coordinates events
e
e theoSOA
within t r
- Suite service infrastructure, and is available to all composites that are running
D n ncontainer (within the same JVM).
in the SCA
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.
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
a
The table
p kin the aslide
n scompares SOAP (service), JMS (messaging), and EDN (events). When
ee areoused
these n r
-t together, you can create a rich and highly functional combination of Service-
D n Architecture (SOA) and event-driven architecture (EDA) approaches to implementing
Oriented
the varied business requirements.
The EDN provides a way for events to coexist with services. Therefore, the EDN enables the
SOA and EDA worlds to be aligned.
of a business occurrence.
s a
Event
Delivery
subscribe
)ha
Network
m
co eฺ
Events are messages that
n ฺ
typically have a header and
l a t io uid
a payload.
s t el nt G
c onsubscribe t u de
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
Events
p a
arek messages.
a n They typically have a header and a payload. The header contains
e
e osuch
metadata t r
- as the event type and a time stamp. The payload contains details that
D n then facts of the event instance that the business logic in the consumer will process.
describe
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"/>
s a
<xsd:element name="quantity" type="xsd:int"
)ha
minOccurs="1"/>
m
co eฺ
</xsd:sequence>
n ฺ
</xsd:complexType>
l a t io uid
</xsd:schema>
s t el nt G
c on tude
r ni@ thXSD
The referenced
a is Sfile describes
k u lk payload
the s eof the event.
ฺ
ak e to u
e p
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
a
The code
p ksampleaninsthe slide describes the payload of an event with two values (productID
eequantity).
and n - tr Components that either produce or consume events use this XSD to
D no the payload of the event.
understand
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 s a
<event-definition name="stockUpdated">
<content )ha
m
co eฺ
xmlns:ns0="http://www.example.org/ns/updtstock"
n ฺ
element="ns0:UpdateStock"/>
l a t io uid
</event-definition>
s t el nt G
</definitions>
c on tude
a r ni@ thiPayload sS
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
The EDN
p a k
uses the
a nXML-based Event Definition Language (EDL), which enables you to define
e
eeventoand
the t r
- its associated strongly typed data. This definition is registered with the SOA
D n n and is available to all composites for publication or subscription.
infrastructure,
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 application—it 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"
s a
name="sub1:stockUpdated"
consistency="oneAndOnlyOne" )ha
m
co eฺ
runAsRoles="$publisher"/>
n ฺ
</business-events>
l a t io uid
</component>
s t el nt G
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
a
Composite
p k n register their interest in events of a specific type with the EDN through
applications
a
e
eMediator
the t r
n-or BPEL components that consume such events.
D n o
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 server—in either case, they can be discovered
through the JDeveloper resource catalog.
K ulk ferab
Both the
p a k anand
Mediator s BPEL service components can publish events and subscribe to them.
Other n r
ee applications,
-t including Oracle Application Development Framework (ADF) business
D o
n applications and Java EE applications, can raise events. You can also raise
component
events through PL/SQL APIs.
Note: For more information about creating and publishing Oracle ADF business component
business events, see the Oracle Fusion Middleware Fusion Developer’s Guide for Oracle
Application Development Framework. The Oracle Fusion Middleware Developer’s Guide for
Oracle SOA Suite 12c discusses how the human task component can create and generate
business events, and how a Mediator or BPEL component can subscribe to those events.
apply.)
a. BPEL component
b. ADF-BC application component
c. Mediator component
d. Human task component
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
Answer: p a,kb, c,adns
a
D n -tr
e components
Alletheseo can publish events.
n
• Events: Overview
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2016, Oracle and/or its affiliatesฺ
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
p a k ans
e tr
De non-
2
1
a
) has
ฺ c om ฺ
t i o n ide
4
t e lla t Gu
o n s den
@ c Stu
i
3
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
a
To create
p keventadefinitions
n s for a composite application, perform the following steps:
e t r
- Event Definition Creation icon on the composite.xml window toolbar.
D1.e Click
non
the
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.
s a
)ha
m
co eฺ
n ฺ
l a t io uid
s t el nt G
3
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
p a
To publishk an event
a n from a Mediator component, perform the following steps:
e - t r
D1.e After
n o nopening the Mediator Editor, for a selected operation, click the Create (+) icon and
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
s a
)ha
m
co eฺ
3 n ฺ
l a t io uid
s t el 4 nt G
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
a k
To subscribe
p to aan
business event in a Mediator component, drag a Mediator component to the
e t r
e on-column in the Composite Editor:
Components
D n “Subscribe to Events” from the drop-down menu.
1. Select
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 event’s 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.
s a
)ha
m
co eฺ
n ฺ
l a t io uid
s t el nt G
c on tude
One and only one: Events are delivered rinntheir i@ownisglobal S transaction.
a h
lk se t without a global transaction.
Guaranteed: Events are delivered asynchronously
k u
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
p a
After you k
select n event that you want, you can set the level of delivery consistency for the
the
a
e t r
n- to the desired filters. The following delivery consistency levels are available:
e in addition
event
D n o
• 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
) has
ฺ c om ฺ
t i o n ide
In an Invoke activity: t e lla t Gu
• Select Event as the c ons tudtype.
interaction en
• Browse to select r ni@ the event. i s S
• Create or a h
lkbrowseseto at variable to store the event.
k u
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
p a
To publishka n event from BPEL, perform the following steps:
business
a
e t r
an-Invoke activity to the BPEL process.
D1.e Add
non
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
) has
ฺ c om ฺ
t i o n ide
In a Receive or Pick activity: tell
a G u
n s type. e n t
• Select Event as the interaction o
c Stu d
• Browse to selectnthe i @ event.
k
• Create or browse
l ar toeatvariablehis to store the event.
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
a k to aa nbusiness
To subscribe
p s event in a BPEL process, perform the following steps:
e - t r
D1.e Add
non
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.
s a
)ha
1 2 ฺco m
t i o n ideฺ
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
a k anManager
OraclepEnterprise s Fusion Middleware Control provides a Business Events page that
e t r
n- to manage, track, and test events in the EDN.
e be accessed
can
D n o
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.
s a
)ha
m
co eฺ
n ฺ
l a t io uid
For a given event, view the tel t G
subscription configuration on tudes n
c
information.
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
a
Click the
p k n tab to search for and view the different types of subscriptions.
Subscriptions
a
e t r
n- tabbed page enables you to display and search for information about all
e Subscriptions
D
The
n o
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
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
Answer:
p ak
a a n s
e t r
De non-
s a
)ha
m
co eฺ
n ฺ
l a t io uid
s t el nt G
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
a k K you
In thisppractice, a n s fe a composite application that updates the inventory quantity of a
create
D ee itemonin-atrdatabase
given table. The application then publishes a stockUpdate event (from a
n
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
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
p a k ans
e tr
De non-
K ulk ferab
p a k ans
e tr
De non-
Objectives
K ulk ferab
In this p a k youanexplore
lesson, s the implementation of unit tests and test suites (a collection of unit
eeto test
tests) n r
-t use cases and conditions that verify the correctness of your application
various
D n o
implementation coding paths.
With Oracle SOA Suite 12c, testing the components in a composite application becomes
important when you have an application that depends on other services that may not yet be
implemented. By using test suites and test cases, you learn to use emulations and assertions
to test your application in the absence of dependent services to find out if your application
works.
In addition, you learn that unit tests are useful ways to debug an application even with the
presence of dependent services to ensure that your application interactions are consistent with
the requirements of the services that the application invokes.
The goal is to learn how to create test cases and test suites in JDeveloper, deploy them with
the application so that you execute the test cases and suites in Oracle Enterprise Manager
Fusion Middleware Control, and examine the results.
Test cases and test suites provide you with a useful way to debug composite applications and
their interactions.
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
p a k ans
e tr
De non-
K ulk ferab
p a k ans
e tr
De non-
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, a
a part of a message, a non-leaf element, or a leaf element ) has
at a point during SOA composite application execution
ฺ c om by
comparing actual values to expected (asserted)
t i o nvalues.
i d eฺ
la u el nt G
s t
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
a k
e ep n-tran
D no
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 s a
run, by using Oracle Enterprise Manager Fusion ) ha
Middleware Control ฺ c om ฺ
n t io uide
l a
el nt G
Note: Each test run corresponds tooansinglede s t composite
c t u
application instance.
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
a k
The composite
p test
a nframework supports testing various components at the SOA composite
e t r
e on- as listed in the slide.
application–level,
D n
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ฺ
K ulk ferab
Each test
p a kcase must
a n sbelong to a test suite, and can be thought of as a unit test for a composite
ee onEach
application. r
-t test case is executed when the test suite that contains it is run. Test cases
D n the following components:
comprise
• Process initiation, which enables simulation of input messages that initiate your
composite process to test the behavior of the application service entry points
• Emulations, which enable you to simulate the behavior of the internal and external
components with which your SOA composite application interacts
• Assertions, which enable you to verify the contents of the different data messages that are
exchanged during service interactions and process flow
• Message files, which contain sample XML message structures that are used for execution
of the process initiation, emulation, and assertion components
Note: Message data can be embedded in each component or loaded at run time from the
message files, which must be deployed with the test suite.
s a
)ha
m
co eฺ
n ฺ
Create a Test
l a t io Case.uid
s t el nt G
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
a
Test suites
p kconsist
a nof a logical collection of one or more test cases. Each test case contains a
e t r
- to be run as the test instance is executed. The execution of a test suite is
seteof commands
D
known asnoantest 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
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
Specify the service, operation,
2 and possible callback to test.
i
rn 4 tLoad isor generate the output
k a h
message, or specify that
ฺ k ul use output will not be tested.
e p ak e to
i ( de© 2014,c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
a
To create
p kthe firstatest
n s case, perform the following steps:
e na -name r
t and description for the first test case to be added to the test suite.
D1.e Enter
n o
2. Specify the operation to be tested.
3. Specify an input message.
4. Specify an output message.
s a
)ha
m
co eฺ
n ฺ
l a t io uid
The Test
test case
Caseeditor
editorlooks
lookslike thens
likethe
tel ent G
assembly editor (composite.xml),
@ co Stud
i
n lanes
rswim
except that the outer swimlanes is
are
are
l k
differently colored.
colored..a e t h
k ฺ ku o us
e p a et
i ( de© 2014, c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
The test
p a k fileaappears
case n s in the Application Navigator window as a child of the test suite, and
r
e filenis-topened in the Test Case window. The test case XML file visually resembles the
theeXML
D no
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">
<assert comparisonMethod="xml-similar"> also includes a wire assertion
<description/> and the description of the
s a
<expected>
<location key="output"/>
output message.
)ha
<message>
m
co eฺ
***
n ฺ
<CreditCheckResponse xmlns="http://www.example.org/ns/ccauthorize">
<status>VALID</status>
l a t io uid
</CreditCheckResponse>
s t el nt G
on tude
***
</message>
c
ni@ this S
</expected>
</assert>
a r
</wireActions>
</compositeTest>
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
When p a
you kcreate aantest case, several folders are created in the project. The tests folder
e
e all
contains t r
- test case XML files. In the slide is an example of a test case file. It is built from
the
D non that is provided to the wizard, including the initiating input message, and a wire
the information
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.
s a
)h a
m
Generate sample messages
o themฺ
cload
automatically, or
n ฺ e
t
from a file
l a ioor manual
u i dinput.
s t el nt G
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
With the
p a k
appropriate
a n test case file opened in JDeveloper, double-click the wire of the SOA
e
composite - t
e oapplicationr area to test. This displays the Wire Actions dialog box, from which you
D n nemulations and assertions for the selected part of the SOA composite application.
can design
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.
s a
)ha
m
co eฺ
n ฺ
Specify the event to Sample
l a t io can ubeid
data
emulate and the
t el nandt G
generated
s edited.
target subscribers.
co Studn e
i @
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
The unit
p a k framework
test a n s enables you to create a test case in a test suite that publishes an event
ae
to e subscriber
n r
-t component such as a Mediator.
D o
n an event, perform the following steps:
To emulate
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
s a
)ha
m
co eฺ
n ฺ
5 l a t io uid
s t el nt G
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
a
You perform
p k n to verify variable data or process flow. Assertions enable you to
assertions
a
e
e test
validate t r
- in a variable or an entire XML document as a process is executed. This is
D ondata
done bynextracting 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
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
p a k ans
e tr
De non-
Select a specific
test case and
click Execute.
s a
)ha
m
co eฺ
n ฺ
l a t io uid
s t el nt G
Enter a name for the
test run and click OK. c on tude
a r ni@ this S
k u lk se
p a kฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
a
Beforepyou kcan run
a nany test cases within a test suite, you must deploy the composite
e
e onproject
application t r
- along with all the test suites it contains to an Oracle SOA Suite 12c runtime
D n such as a development or test system. Test suites must be deployed with the
environment,
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
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de icens
a r n le l
K ulk ferab
p a k ans
e tr
De non-
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c SExamine tu the cause
Composite application i
instance ID link to access
l k arn e this of assertion failure.
the Flow Trace page
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
The Test
p a k tabbed
Runs a n s page is displayed after you initiate a test run. Initially, the Test Runs
eemayonot
page n r
-tcontain any information. To update the contents of the page and view the
D n or results for the test cases in a test run, perform the following steps:
progress
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
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de icens
a r n le l
K ulk ferab
p a k ans
e tr
De non-
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
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
Answer: p bk
a a n s
ee suite n -t r
D
A test
n o or test case is executed by clicking the Execute button on the Unit Tests > Test
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
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
p a k ans
e tr
De non-
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
s a
Response?
)h
Web a
Client
SOA Debugger
c m
Service
o ฺ
n ฺ
5
l a t io uide
s t el nt G
c on tWeb u e Test Tool
dService
Examines
4 SOAP/HTTP
a r ni@ this S
HTTP Analyzer
k u lk sJDeveloper
e
ฺ
ak e to u
e p
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
a k aSOA
To troubleshoot
p n sapplications, one approach is to follow the life cycle of a client request
eeresponse
and n r
-t(if any) through all the components involved in the interaction. Using this
D o
n you track the flow of a message through the system and examine possible sources
approach,
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
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de icens
a r n le l
K ulk ferab
p a k ans
e tr
De non-
troubleshooting environment
within Oracle JDeveloper.
s a
)ha
m
co eฺ
n ฺ
l a t io uid
s t el nt G
c on tude
service components, and r i@ is and
Set breakpoints on binding components,
nsynchronous S
a
lk processes. e t h
k u
asynchronous BPEL
s
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
The SOA
p a k
debuggera nprovides a troubleshooting environment within Oracle JDeveloper. You can
e t r
- for troubleshooting on binding components, service components, and
setebreakpoints
D non and asynchronous BPEL processes.
synchronous
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
s a
Specify in minutes how
)h a
long the client should m
Enter the port on
n ฺ
wait while attempting coto eฺ
which the debugging t io uid
establish a debugging
l a
agent listens.
t
session
s elbeforenstopping.
t G
c on tude
a r ni@ this S
k u lk se
p a kฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
p a
Both local k
and n applications can be debugged. When the debugger is started, the
remote
a
e
Connection -
e onSettings t r window prompts for the server to use for debugging, the debug port, and
D n for the debugger when it is inactive. The debugger properties are stored per project.
the timeout
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.
s a
)ha
m
co eฺ
n ฺ
l a t io uid
s t el nt G
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
p a
Breakpointsk are nintentional pausing locations in a SOA composite application that you set
the
a
e t r
n- purposes. You can set breakpoints on a request, on a reply, or on both.
foredebugging
D n o
• Create Breakpoints Pair: Set for a request-reply (outbound-inbound) interaction. This is
useful for scenarios in which both the request and reply are important.
• Create Request Breakpoint: Set for a request (outbound) interaction. This is useful for
scenarios in which only the request is important.
• Create Reply Breakpoint: Set for a reply (inbound) interaction. This is useful for
scenarios in which only the reply is important.
Components on which breakpoints are set are designated with red request (outbound) icons,
reply (inbound) icons, or request-reply (outbound-inbound) icons.
To set a breakpoint on
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2016, Oracle and/or its affiliatesฺ
a service component,
select Edit.
K ulk ferab
To begin
p a k ansof the SOA composite application, right-click the right handle of the service
debugging
ee component
binding n - tr and select Initiate WS Debugging from the shortcut menu. This invokes the
D no Enter the request message data to send and click Send Request, or click
HTTP Analyzer.
HTTP Content to copy and paste the contents from an XML file. You can either enter data field-
by-field or copy and paste an XML document.
s a
)ha
m
co eฺ
n ฺ
l a t io uid
In the Log window at the bottomsof t el nt G
Oracle JDeveloper, click Data. c on tude
Expand the message r i@ isYou
ncontents. S
can double-click
a h
lka valueseto tchange it.
k u
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
a k
The debugger
p stops
a n at the first breakpoint that you set (for example, on the service binding
e t r
e on-In the Log window at the bottom of Oracle JDeveloper, click Data. Expand the
component).
D n contents. You can double-click a value to change it. For non-XML variables, right-
message
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ฺ
s a
)ha
The debugger steps m
co eฺ
n ฺ
through the copy
l a t io uid
rules in an Assign
s t el nt G
activity one at a time. c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
To stepp a k
through annapplication, use the following function keys or the corresponding toolbar
a
e
e on-
icons: t r
D
• F8nsteps 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
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
a
To endpor kdetachafrom
n s a debugging session, perform the following:
n r
eethe oTerminate
-t icon in the tools menu to end a debugging session. The Terminate
D
Click
n Process dialog box is displayed. Select an option:
Debugger
• 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.
K ulk ferab
p a k ans
e tr
De non-
s a
CREDITCARDS
)ha
table
m
co eฺ
Initiate an inbound n ฺ
message. l a t io uid
s t el nt G
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
The goal
p a k
of this n is to create a test suite that contains three test cases and to deploy the
practice
a
e
composite n-
e oapplicationt r with its test suite. After the composite application is deployed, you use
D
Oracle n
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
) has
You step through a running ฺ c om ฺ
t i o n ide
BPEL process, one line at a
t e l la t Gu
time, before terminating the
o n s den
debug session.
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
p a k ans
e tr
De non-
K ulk ferab
p a k ans
e tr
De non-
Objectives
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
p a k ans
e tr
De non-
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
s a
• WS-Security-SwA
)ha
• UsernameTokenProfile 1.1 m
co eฺ
n ฺ
• X509TokenProfile 1.1
l a t io uid
• Security-Policy Use cases Working Draft 2
s t el nt G
Note: OPSS makes use of the Oracle Fusion Middleware
c n udeServer Java Platform
oApplication
Security (JPS) implementation. i @ S t
l k arn e this
k ฺ ku o us
e p a et
i ( de icens
a r n le l
K ulk ferab
p a k ans
e tr
De non-
<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
l k
orawsp:category="security" orawsp:status="enabled"/>
</binding.ws> </reference>
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
a k inathe
The examples
p n sslide briefly show how security policies can be attached to service
ee obindings
endpoint n r
-t in the composite.xml file.
D n
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
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
Answer:
p bk
a a n s
e t r
De non-
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
p a k ans
e tr
De non-
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
K ulk ferab
OWSMp a k be leveraged
can a n s from Oracle Enterprise Manager Fusion Middleware Control to:
r
e n-t define policies by using the OWSM Policy Manager
D•e Centrally
no
• Enforce OWSM security and management policies locally at run time
Tasks that can be performed from OWSM include:
• Handling WS-Security (for example, encryption, decryption, signing, signature
validation, and so on)
• Defining authentication and authorization policies against an LDAP directory
• Generating standard security tokens, such as SAML tokens, to propagate identities
across multiple web services that are used in a single transaction
• Segmenting policies into different namespaces by creating policies within different
folders
• Examining log files
s a
Metadata
)ha
Store
(MDS)
m
co eฺ
n ฺ
l a t io uid
s t el nt G
Oracle@ con Stude
Fusion
r ni this
Middleware
a
k u lkDatabases e
ฺ
ak e to u
e p
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
a k of athensOWSM Architecture include the following:
Components
p tr
e n-Enterprise
D•e Oracle Manager Fusion Middleware Control: Enables administrators to
no Oracle Web Services Manager’s functionality to manage, secure, and monitor
access
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
K ulk ferab
a k types
The different
p a n s policies that are available are the following:
of
e n-t r
D•e WS-ReliableMessaging:
no
The reliable messaging policies that implement the WS-
ReliableMessaging standard describe a wire-level protocol that allows guaranteed
delivery of SOAP messages, and can maintain the sequential order in which a set of
messages are delivered.
• Management: Management policies log request, response, and fault messages to a
message log. Management policies may include custom policies.
• WS-Addressing: WS-Addressing policies verify that SOAP messages include WS-
Addressing headers in conformance with the WS-Addressing specification. Transport-
level data is included in the XML message rather than relying on the network-level
transport to convey this information.
• Security: Security policies implement the WS-Security 1.0 and 1.1 standards. They
enforce message protection (message integrity and message confidentiality), and
authentication and authorization of web service requesters and providers. The following
token profiles are supported: username token, X.509 certificate, Kerberos ticket, and
Security Assertion Markup Language (SAML) assertion.
• Message Transmission Optimization Mechanism (MTOM): Binary content, such as
an image in JPEG format, can be passed between the client and the web service. To be
passed, the binary content is typically inserted into an XML document.
a particular behavior.
• Assertions are executed in the order in which they are
listed in the policy.
Policy s a
Request
)ha
Assertion 1 Assertion 2 Assertion n m
co eฺ
Response n ฺ
l a t io uid
s t el nt G
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
OWSM p a k
policies n of one or more assertions that exhibit a particular capability or
consist
a
e
e oFor
behavior. t r
- example, a security policy could be made up of two assertions: a Log assertion
D n n
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.
K ulk ferab
Specific
p a k ans (WSS) 1.0 tokens include:
WS-Security
e n-tr
D•e WSSUsernameToken:
noor digest form
This token uses a plain username and password either in plain
text
• 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
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de icens
a r n le l
K ulk ferab
p a k ans
e tr
De non-
s a
)ha
m
co eฺ
n ฺ
l a t io uid
s t el nt G
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
k K afornexchanging
SAMLpisameant sfe security information between different security domains
e
(parties), -
e oespeciallyt r authentication details such as user login information, user attributes, and
D n n information in the form of policies.
authorization
SAML contains one or more “assertions,” each of which conveys information about subjects
(human users or any entities). Each assertion may contain multiple statements about
authentication, authorization, and additional attributes.
SAML supports the following types of “assertions”:
• Authentication assertion: Conveys information that a certain subject was
authenticated at a certain instant
• Authorization assertion: Conveys information about the access privileges for a user to
certain resources
• Attribute: Conveys information about subject attributes
SAML assertions are typically used for achieving single sign-on (SSO). When a user is
authenticated in one domain, the user is not required to authenticate again in other domains.
This is possible because authentication information is conveyed to all relevant parties, which
then use the information to testify that the user or entity was indeed authenticated at the
instant claimed. Note that the user could be a program.
WS-Security: Carries
UsernameToken
Policy a
Request
enforcement
ha s
point
m )
Client
Response
ฺ co eฺ
Service
n
l a t io uid
s t el nt G
WS-SecurityPolicy:
c on tude
The oracle/wss_username_token_service_policy
ni@token
policy can be used to rextract i s S
data, apply
a
lkauthorization,
authentication and e h
t and set the subject.
k u s
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
a k K Middleware
OraclepFusion n s fe uses a policy-based model to manage web services. Policies apply
ee oton-the
standards tradelivery of messages. Policies are part of an enterprise policy framework.
D n policies to be centrally created and managed.
This enables
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
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
Answer:
p ck
a a n s
e t r
De non-
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
p a k ans
e tr
De non-
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
has
• Authenticate.
SAML
• Set subject.
)
CCAuth
ฺ c om ฺ
oracle/wss_username_token_service_policy
t i o n Crediti de
l a
el nt G Service u
Authorization
s t e
Fulfillment
c on • Read t u dsubject.
a r ni@ this •SInsert SAML token.
k u lk se
Finalize oracle/wss11_saml_token_client_policy
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
a
The example
p k in a n slide illustrates the use of three different policies to authenticate,
the
e
e oand
authorize, t r
n- propagate username credentials. Following the request flow, web service
D
policiesnare 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.
l k
k Ku sfer
a showsrathe
The slide
e p n policy attachment fragment for the following scenario:
- t
D•e Then- onThe policy enforces the authentication of credentials that are provided via the
scenario: UsernameToken–based identity authentication. In this case:
s a
)ha
m
co eฺ
2
n ฺ
l a t io uid
s t el nt G
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
You use
p a k
Oracle n
JDeveloper
a 12c to attach policies for testing security in a design-time
e t r
e on-When your application is ready for deployment to a production environment, you
environment.
D n runtime policies in the Oracle Enterprise Manager Fusion Middleware Control
can attach
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"
s a
orawsp:category="security"
)ha
orawsp:status="enabled"/>
m
co eฺ
</binding.ws>
n ฺ
</reference>
l a t io uid
s t el nt G
The attachment is added to ancexternal on tude
reference in composite.xml.
a r
Result: Identity is propagated,ni@ tand h istheS
u
payload is encrypted.
k lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
a k
The example
p in a n slide shows the policy attachment fragment for the following scenario:
the
e - t r
D•e The
n- onThe policy enables SAML token population for outbound SOAP requests by using
scenario: SAML-based identity assertion. In this case:
a
) has
ฺ c om ฺ
2 t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
a
To attach
p ka policy
a ntosan external reference, perform the following steps:
r
e n-t the external reference and select Configure WS-Policies.
De1. Right-click
no
2. Click the Add icon for the type of policy.
3. Select the relevant policy to attach.
Policies
page
s a
)ha
m
co eฺ
n ฺ
l a t io uid
Specify the component
to which the policy is to s t el nt G
be attached. c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
Policies
p a k
apply n to the delivery of messages. You can attach security policies to and
security
a
e
e security
detach t r
n- policies from the currently deployed SOA composite applications.
D n o
To manage SOA composite application policies, perform the following steps:
1. On the Oracle Enterprise Manager home page, expand the soa-infra > SOA folders, and
click a SOA composite application link.
2. On the SOA composite home page, click the Policies tab.
Note: The Policies page enables you to attach policies to and detach policies from the
web service binding components and the service components of the SOA composite
application. The policies table displays the attached policy name, the component to
which the policy is attached, the policy reference status (enabled or disabled) that you
can toggle, the category (Management, Reliable Messaging, MTOM Attachment,
Security, or WS Addressing), any violations, and all authentication, authorization,
confidentiality, and integrity failures since the SOA Infrastructure was last restarted.
3. On the Policies page, click Attach To/Detach From.
4. Select the component to which to attach or from which to detach a policy. This invokes a
dialog box for attaching or detaching policies.
K ulk ferab
a k policies
5. Select
p a n sthat are appropriate to your environment, and then click Attach.
e nAttach r
-t additional policies as required.
De Note:
o
n you have finished attaching policies, click Validate.
6. When
Note: If an error message appears, make the necessary corrections until you no longer
have any validation errors.
7. Click OK.
wss_username_token_service_policy
wss11_saml_token_client_policy
Enrollment BookingSystem
Enrollment
BPEL
s a
Enroll BookingService booking_client_ep
)ha
m
co eฺ
n ฺ
l a t io uid
Propagate security identity. tel t G
on tudes n
c S
r n i@wss11_saml_token_service_policy
i s
Receive security identity. a
lk se t h
k u
p a kฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
The goal
p a k
of this n is to implement security on the endpoints of composite applications,
practice
a
e
e as the
such - t r
nEnrollment and BookingService interactions.
D n o
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.
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de icens
a r n le l
K ulk ferab
p a k ans
e tr
De non-
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2016, Oracle and/or its affiliatesฺ
Request-Response Patterns
a
) has
ฺ c om ฺ
Appendix A i o n ide
t
lla t Gu
t e
s den
o
c Stu n
i @
l k arn e this
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
p a k ans
e tr
De non-
Request-Response Patterns
appendix:
• One-Way Message
• Synchronous Interaction
• Asynchronous Interaction
• Asynchronous Interaction with Timeout
a
• Asynchronous Interaction with a Notification Timer
) has
• One Request, Multiple Responses
ฺ c om ฺ
• One Request, One of Two Possible Responses t i o n ide
t e lla t Gu
• One Request, a Mandatory Response, o n sanddan e nOptional
c u
Response i@ s St
l k arn e thi
k ฺ ku o us
e p a et
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
a k anpatterns
Request-response
p s are used to facilitate communication between the components of
e
a Business -
e onProcess t r Execution Language (BPEL) process. The request-response operation
D n one input element (the request) followed by one output element (the response).
includes
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
Invoke
BPEL Service s a
)ha
m
co eฺ
Invoke Receive n ฺ
BPEL BPEL
l a t io uid
s t el nt G
c on tude
a r ni@ this S
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
a
A one-way
p k message
a n interaction pattern is a special type of request-response pattern, where
e t r
- a message to the service, and the service does not need to reply. This could
eclientosends
the
D
be usednfornbusiness 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
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de icens
a r n le l
K ulk ferab
p a k ans
e tr
De non-
Request
Pattern:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2016, Oracle and/or its affiliatesฺ
Immediate response
Service client Service
BPEL BPEL
Mediator request request
s a
BPEL
) ha
Receive
c m
o ฺ
Receive
n ฺ
Route
response
Invoke
response
l a t io uide
fault s t el nt G
fault
Reply
c on tude Reply
r i@ is S
nClient
Client Service
l k a e t h Service
k ฺ ku o us
e p a et
i ( de© 2014,c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
a k aninteraction,
In a synchronous
p s a client sends a request to a service, and receives an immediate
e n-
e or fault.
reply t r
D n o
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
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de icens
a r n le l
K ulk ferab
p a k ans
e tr
De non-
Request
Pattern:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2016, Oracle and/or its affiliatesฺ
Delayed response
Service client Service
K ulk ferab
a k ansinteraction, a client sends a request to a service and waits until the
In an asynchronous
p
ee replies.
service n - tr
D no in the slide shows two diagrams of an asynchronous interaction between two SOA
The image
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
s a
response1
)ha
Receive
m
co eฺ
Invoke
n ฺ
response2
l a t io uid
Sequence
s t el nSequence
t G
Receive on tude
cInvoke
response3 @
a r ni this S
Receive Clientk u lk se Invoke Service
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
a k K atype,
In thispinteraction n sfethe client sends a single request to a service, and receives multiple
tr For example, the request can be to order a product online, and the first
ee onin-return.
responses
D
responsen 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
k a rn this ships
Receive B
ฺ k ul use Invoke B
e p ak e to
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
a k of interaction,
In thisptype a n s the client sends a single request to a service, and receives one or
eeresponses.
two n r
-t Here, the request is to order a product online. If the product is delayed, the
D o
servicensends 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 activity’s 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
Invoke Receive s a
)ha
m
co eฺ
n ฺ
l a t io uid
Pick response
s t el nt G
c on tude
r n i@ is S Invoke
onAlarm onMessage
u l ka se th
Client Service
Timeout logic logic
ฺ k u
e p ak e to
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
a k ansinteraction with a timeout, a client sends a request to a service and waits
In an asynchronous
p
eeit receives
until n - tra reply, or until a certain time limit is reached, whichever comes first.
D no implementation in the slide shows:
The sample
• 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
s a
h a
Invoke Notify someone Receive m)
when a timeout
n ฺ co eฺ
onAlarm
occurs.
l a t io uid
Scope response tel t G
on tudes n
c
Receive
a r ni@ this S Invoke
Client k u lk se Service
k
a etฺ o u
e p
i ( de© 2014,
c e nsand/or its affiliates. All rights reserved.
a r n le li
Copyright Oracle
K ulk ferab
a k ansinteraction with a notification timer, a client sends a request to a service
In an asynchronous
p
eewaitsofor
and
D n -atrreply, although a notification is sent after a timer expires. The client continues
to wait n
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
Item in ) has
Otherwise
stock?
ฺ c om ฺ
t i o n ide
Pick
t e lla t Gu
Switch
o n s den
response A i@
c Stu
onMessage onMessage
B A k a rn thisInvoke Invoke
k u l B se A B
p akฺ to u
response
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
K sfe
a k
In an interaction
p n one request and one of two possible responses, the client sends a
using
a
e
e request
single t r
- to a service and receives one of two possible responses. For example, the
D onbe
requestncan 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 client’s 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, anda
depending on the message, its branches do the following: ) has
ฺ c om ฺ
- If Message A is sent, the onMessage A branch handles the response.
t i o n ide
- If Message B is sent, the onMessage B branch handles the response.
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de icens
a r n le l
K ulk ferab
p a k ans
e tr
De non-
Multiple Requests
Pattern:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2016, Oracle and/or its affiliatesฺ
SOA implementation:
Service BPEL
Client Service 2
Flow
s a
BPEL BPEL
) ha
request request m
co eฺ
n ฺ
Invoke Invoke l a t ioReceive
u id
Receive l
te ent G
n s
response
i @ co responseS tud
Invoke Receive lkarReceive
n this Invoke
Service 1 u
ฺk to us e Service 2
p sea k
e e
d © 2014, n
i ( l i c e
arn able
Copyright Oracle and/or its affiliates. All rights reserved.
l k
k Ku sfer
a ratype,
In thispinteraction
e n the client sends multiple requests to multiple services and receives
n-
e responses
multiple t in return. As shown in the slide, the service client (which is a BPEL
D
process)nouses 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
s a
request request
)ha
m
co eฺ
Receive Invoke Invoke
n ฺ
Receive
l a t io uid
s t el nt G
First c onresponse t u de
Invoke
response Pick i@
a r n this S Invoke
onMessage A lk onMessage B
Service 1 u
ฺk to us e Service 2
p sea k
e e
d © 2014, n
i ( l i c e
arn able
Copyright Oracle and/or its affiliates. All rights reserved.
l k
k Ku sfer
a ratype,
In thispinteraction
e n the client sends multiple requests to different services and expects to
e multiple
receive t
n- responses. However, to implement the first message response pattern, a Pick
D
activitynisoused 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
Packaged Deployed a
has
Defines
properties
)
JDeveloper
composite.xml SOA
ฺ c om ฺ
Fusion
Archive t i o n Middleware
i de
l a
el nt G u
Control
s t
<component name="MyBPELComponent"> ...
<property name="bpel.config.inMemoryOptimization"> c on tude
true</property>
a r ni@ this S Engine BPEL
</component>
k u lk se
p akฺ to u
( d ee ense
r n i © 2014,
Copyright
e l icOracle and/or its affiliates. All rights reserved.
lka rab l
u
Therep a
arektwoKtypes
n s feBPEL deployment descriptor properties:
of
e n-tra properties, which are specific properties used by the BPEL Engine,
D•e Configuration
no
Enterprise Manager, or both. The server provides some predefined configuration
properties. Refer to the Oracle Fusion Middleware Developer’s 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.
a
) has
ฺ c om ฺ
t i o n ide
t e lla t Gu
o n s den
@ c Stu
i
l k arn e this
k ฺ ku o us
e p a et
i ( de icens
a r n le l
K ulk ferab
p a k ans
e tr
De non-