A BPEL Process Activities and Services

This appendix describes the BPEL process activities and services that you use when designing a BPEL process in a SOA composite application.

This appendix includes the following sections:

A.1 Introduction to Activities and Components

When you expand SOA Components in the Components window of Oracle BPEL Designer, service components are displayed. Figure A-1 shows the service components that display for a BPEL 2.0 or 1.1 process.

See the following sections for additional details about service components.

For information about Oracle BPEL Designer, see Getting Started with Oracle BPEL Process Manager .

A.2 Introduction to BPEL 1.1 and 2.0 Activities

This section provides a brief overview of BPEL activities and provides references to other documentation that describes how to use these activities.

Oracle BPEL Designer includes BPEL 1.1 and BPEL 2.0 activities that can be added to a BPEL process. These activities enable you to perform specific tasks within a process. Some activities are available in both BPEL 1.1 and BPEL 2.0. Others are available in only BPEL 1.1 or BPEL 2.0.

To access these activities, go to the Components window of Oracle BPEL Designer. The activities display in the following categories:

  • BPEL Constructs: Displays core activities (also known as constructs) provided by standard BPEL 1.1 and 2.0 functionality. The activities in this category are displayed under additional subcategories of Web Service, Activities, and Structured Activities in BPEL 1.1 and Web Service, Basic Activities, and Structured Activities in BPEL 2.0.

  • Subprocesses: Displays any created subprocesses. If no subprocesses have been created, this category is empty. For more information about subprocesses, see Introduction to Standalone and Inline BPEL Subprocess Invocations.

  • Oracle Extensions: Displays extension activities that add value and ease of use to BPEL 1.1 and 2.0 functionality.

  • SOA Components: Displays the business rules, human tasks, and Oracle Mediator service components that can be added to a BPEL process.

  • BPEL Services: Displays the partner links that can be added to a BPEL process, including JCA adapters (AQ, file, FTP, database, JMS, MQ, Oracle User Messaging Service, socket, JDE World, SAP, LDAP server, Coherence cache, and third-party), Oracle BAM 11g binding component, Oracle Healthcare binding component, Oracle B2B binding component, EJB binding component, ADF-BC binding component, Oracle E-Business Suite adapter, direct binding component, HTTP binding component, and Oracle Managed File Transfer (MFT) adapter.

  • Custom Activity Templates: Displays any created custom scope activity templates. For more information about templates, see Introduction to Templates.

Table A-1 lists the available activities.

Table A-1 BPEL 1.1 and 2.0 Constructions and Extensions

Activity Display Under... Supported in BPEL 1.1 Supported in BPEL 2.0 For More Information

Assign

BPEL Constructs

Yes

Yes

Assign Activity

Assert

Oracle Extensions

Yes

Yes

Assert Activity

Bind Entity

Oracle Extensions

Yes

No

Bind Entity Activity

Call

Oracle Extensions

No

Yes

Call Activity

Compensate

BPEL Constructs

Yes

Yes

Compensate Activity

CompensateScope

BPEL Constructs

No

Yes

CompensateScope Activity

Create Entity

Oracle Extensions

Yes

No

Create Entity Activity

Dehydrate

Oracle Extensions

Yes

Yes

Dehydrate Activity

Dynamic Partner Link

BPEL Constructs

Yes

No

Dynamic Partner Link Activity

Email

Oracle Extensions

Yes

Yes

Email Activity

Empty

BPEL Constructs

Yes

Yes

Empty Activity

Exit

BPEL Constructs

No

Yes

Note: Replaces the terminate activity in BPEL 2.0.

Exit Activity

Flow

BPEL Constructs

Yes

Yes

Flow Activity

FlowN

Oracle Extensions

Yes

No

Note: Replaced by the forEach activity in BPEL 2.0

FlowN Activity

forEach

BPEL Constructs

No

Yes

Note: Replaces the FlowN activity in BPEL 2.0.

forEach Activity

If

BPEL Constructs

No

Yes

Note: Replaces the switch activity in BPEL 2.0.

If Activity

IM

Oracle Extensions

Yes

Yes

IM Activity

Invoke

BPEL Constructs

Yes

Yes

Invoke Activity

Java Embedding

Oracle Extensions

Yes

Yes

Java Embedding Activity

Partner Link

BPEL Constructs

Yes

Yes

Partner Link Activity

Phase

Oracle Extensions

Yes

Yes

Phase Activity

Pick

BPEL Constructs

Yes

Yes

Pick Activity

Receive

BPEL Constructs

Yes

Yes

Receive Activity

Receive Signal

Oracle Extensions

Yes

Yes

Receive Signal Activity

Remove Entity

Oracle Extensions

Yes

No

Remove Entity Activity

RepeatUntil

BPEL Constructs

No

Yes

RepeatUntil Activity

Replay

Oracle Extensions

Yes

Yes

Replay Activity

Reply

BPEL Constructs

Yes

Yes

Reply Activity

Rethrow

BPEL Constructs

No

Yes

Rethrow Activity

Schedule Job

Oracle Extensions

Yes

Yes

Schedule Job

Scope

BPEL Constructs

Yes

Yes

Scope Activity

Sequence

BPEL Constructs

Yes

Yes

Sequence Activity

Signal

Oracle Extensions

Yes

Yes

Signal Activity

SMS

Oracle Extensions

Yes

Yes

SMS Activity

Switch

BPEL Constructs

Yes

No

Note: Replaced by the if activity in BPEL 2.0.

Switch Activity

Terminate

BPEL Constructs

Yes

No

Note: Replaced by the exit activity in BPEL 2.0

Terminate Activity

Throw

BPEL Constructs

Yes

Yes

Throw Activity

Translate

Oracle Extensions

Yes

Yes

Translate Activity

User Notification

Oracle Extensions

Yes

Yes

User Notification Activity

Validate

Oracle Extensions (in BPEL 1.1)

BPEL Constructs (in BPEL 2.0)

Yes

Yes

Validate Activity

Wait

BPEL Constructs

Yes

Yes

Wait Activity

While

BPEL Constructs

Yes

Yes

While Activity

XQuery Transform

Oracle Extensions

Yes

Yes

XQuery Transform Activity

XSLT Transform

Oracle Extensions

Yes

Yes

XSLT Transform Activity

For more information about activities, see the Business Process Execution Language for Web Services Specification or the Web Services Business Process Execution Language Specification Version 2.0 by visiting the following URL:

http://www.oasis-open.org

A.2.1 Tabs Common to Many Activities

While each activity performs specific tasks, many activities include tabs that enable you to perform similar tasks. This section describes these common tabs.

A.2.1.1 Annotations Tab

The Annotations tab displays on all activities and enables you to provide descriptions in activities in the form of code comments and name-and-pair value assignments.

The Annotations tab does not provide a method for changing the order of annotations. As a work around, change the order of annotations in the Source view of the project's BPEL file in Oracle BPEL Designer.

A.2.1.2 Assertions Tab

The Assertions tab displays in invoke, receive, reply, and the onMessage branches of pick and scope activities. A set of assertions are executed upon receipt of a callback message at a request-response operation in these activities. The assertions specify an XPath expression that, when evaluated to false, causes a BPEL fault to be thrown from the activity. This provides an alternative to using a potentially large number of switch, assign, and throw activities after a partner callback.

You can select when to execute a condition:

  • Preassert: This condition is executed before the invoke or reply activity send out the outbound message.

  • Postassert: This condition is executed after an invoke activity, receive activity, or onMessage branch receives the inbound message.

For more information, see the online help for this tab and Throwing Faults with Assertion Conditions.

A.2.1.3 Correlations Tab

The Correlations tab displays in invoke, receive, and reply activities, the onMessage branch of pick activities, and the OnMessage branch of scope activities. Correlation sets address complex interactions between a process and its partners by providing a method for explicitly specifying correlated groups of operations within a service instance. A set of correlation tokens is defined as a set of properties shared by all messages in the correlated group.

For more information, see the online help for this tab and Introduction to Correlation Sets in an Asynchronous Service.

A.2.1.4 Documentation Tab

The Documentation tab enables you to embed human documentation in the activities of a BPEL file. These comments only display in the source code of the BPEL file. The following example provides details.

<invoke>
. . .
   <documentation>
      Invokes the credit rating service partner link
   </documentation>
. . .

Note:

This tab is only available in BPEL 2.0 projects.

A.2.1.5 Headers Tab

The Headers tab displays in invoke, receive, and reply activities, and the onMessage branch of pick and scope (for BPEL 1.1) activities. You create header variables for use with adapters, such as Advanced Queuing (AQ), file, FTP, MQ, and Java Message Service (JMS).

For more information, see the online help for this tab and Understanding Technology Adapters

A.2.1.6 Properties Tab

The Properties tab displays in invoke, receive, and reply activities, and the onMessage branch of pick and scope activities. You can define normalized message header properties for components such as Oracle BPEL Process Manager, Oracle Mediator, Oracle JCA adapters, REST adapters, and Oracle B2B.

For more information, see the online help for this tab and Propagating Normalized Message Properties Through Message Headers.

A.2.1.7 Skip Condition Tab

The Skip Condition tab displays in most activities and enables you to specify an XPath expression that, when evaluated to true, causes the activity to be skipped. This extension provides an alternative to the case pattern of a switch activity that you use to make an activity conditional.

For more information, see the online help for this tab and Specifying XPath Expressions to Bypass Activity Execution.

A.2.1.8 Sources and Targets Tabs

The Sources and Targets tabs enable you to define the source and target activities to execute in a flow activity. This feature enables you to synchronize the execution of activities within a flow activity to ensure that a target activity only executes after a source activity has completed.

For more information, see the online help for this tab and Synchronizing the Execution of Activities in a Flow Activity.

A.2.1.9 Timeout Tab

The Timeout tab displays in receive activities and provides a timeout setting for request-response operations. This provides an alternative to the onMessage and onAlarm branches of a pick activity that you must use when you want to specify a time out duration for partner callbacks.

For more information, see the online help for this tab and Setting Timeouts for Request-Reply and In-Only Operations in Receive Activities.

A.2.2 Using the Native Format Builder Wizard Outside of Adapter Configuration

The Native Format Builder wizard enables you to create a native XSD schema file. You can now invoke the Native Format Builder wizard outside of adapter creation to create new schemas and edit existing schemas.

A.2.2.1 To create a native format schema from the Applications Window:
  1. From the Oracle JDeveloper main menu, select File > New.

  2. From the Categories list, select SOA Tier > Interfaces.

  3. Click NXSD Schema to invoke the Native Format Builder wizard.

  4. On the Welcome page, click Next.

  5. On the File Name and Directory page, specify the file name of the schema (for example, addresses_schema.xsd) and directory path.

  6. Follow the remaining pages of the wizard to create the native format schema.

For more information about the Native Format Builder wizard, see Chapter "Native Format Builder Wizard" of Understanding Technology Adapters.

A.2.2.2 To edit an existing native format schema from the Applications Window:

You can access the Native Format Builder wizard for schema editing from the Applications window. The context menu option Edit NXSD is available for selection if the schema file is detected to be a native format schema file.

  1. In the Applications window, right-click a native format schema file (for example, addresses.xsd).

  2. Select Edit NXSD.

For more information about the Native Format Builder wizard, see Chapter "Native Format Builder Wizard" of Understanding Technology Adapters.

A.2.3 Assign Activity

This activity provides a method for data manipulation, such as copying the contents of one variable to another. Copy operations enable you to transfer information between variables, expressions, endpoints, and other elements.

Figure A-2 shows the Copy Rules tab of the Assign dialog for BPEL 1.1. You create a mapping between source and target nodes in the tree in either of the following ways:

  • Drag the source node to the target node to create a BPEL copy rule from the source to the target node. This action creates a line that connects the source and target types.

  • Select the source node, select the target node, and then click the Add icon above the table at the bottom of the dialog. The mapping is then added to the table and the connecting line between the nodes is drawn in the tree.

The copy rule is displayed in the From and To sections at the bottom of the dialog.

Figure A-2 Copy Rules Tab of Edit Assign Dialog

Description of Figure A-2 follows
Description of "Figure A-2 Copy Rules Tab of Edit Assign Dialog"

The Select Insertion Mode list above the source node section enables you to insert the next copy rule you create either after or before the rule selected at the bottom of the dialog.

Icons display above the target node that enable you to perform the following tasks (from left to right) on target nodes. By default, the center canvas is open. If it is closed, drag the bars open to display the center canvas.

  • Expression icon: Drag this icon to a target node to invoke the Expression Builder dialog for assigning an XPath expression to that node. You can also drag this icon to the center canvas to invoke this dialog, specify the expression, save and close the dialog, and then drag the icon to the target node.

  • Literal (BPEL 2.0 specification) icon or XML Fragment (BPEL 1.1 specification) icon: Drag this icon to a target node to invoke a dialog for assigning a literal (if the BPEL project supports the BPEL 2.0 specification) or XML fragment (if the BPEL project supports the BPEL 1.1 specification) to that target node. You can also drag this icon to the center canvas to invoke this dialog, specify the value, save and close the dialog, and then drag the icon to the target node.

  • Remove icon: Drag this icon to a target node to create a bpelx:remove extension rule. You can also drag this icon to the center canvas to invoke this dialog, specify the rule, save and close the dialog, and then drag the icon to the target node.

  • Rename icon: Drag this icon to rename a target node. This adds a bpelx:rename extension rule with an elementTo attribute. You can also drag this icon to the center canvas to invoke a dialog, specify the rule, save and close the dialog, and then drag the icon to the target node.

  • Recast icon: Drag this icon to recast a target node. This adds a bpelx:rename extension rule with a typeCastTo attribute. This results in an xsi:type attribute in the XML output. You can also drag this icon to the center canvas to invoke a dialog, specify the rule, save and close the dialog, and then drag the icon to the target node.

You can also change a selected copy rule to a bpelx extension type (bpelx:copyList, bpelx:insertAfter, bpelx:insertBefore, or bpelx:append).

The method of selection differs between BPEL 1.1 and BPEL 2.0.

Figure A-3 shows how you select an extension type in BPEL 1.1. You select a copy rule, select the Copy dropdown list, and then select the appropriate extension.

Figure A-3 Copy Rule Converted to bpelx Extension in BPEL 1.1

Description of Figure A-3 follows
Description of "Figure A-3 Copy Rule Converted to bpelx Extension in BPEL 1.1"

Figure A-4 shows how you select an extension type in BPEL 2.0. You right-click a copy rule, select Change rule type, and then select the appropriate extension.

Figure A-4 Copy Rule Converted to bpelx Extension in BPEL 2.0

Description of Figure A-4 follows
Description of "Figure A-4 Copy Rule Converted to bpelx Extension in BPEL 2.0"

For more information about manipulating XML data with bpelx extensions, see Manipulating XML Data with bpelx Extensions.

In the From and To XPath fields, you can also place your cursor over the icon to the left of the source type to display the operation being performed (for example, copy, append, and so on). Each operation type is represented by a different icon. You can also right-click a copy rule to display a list of actions to perform:

  • Edit 'From' expression or Edit 'To' expression: Select this option to edit XPath expression values when the created copy rule contains a query for the source or target node. This selection invokes the Expression Builder dialog. The menu option that displays is based on the current content of your copy rule selection.

  • ignoreMissingFromData: Select this option to toggle the ignoreMissingFromData attribute on the copy rule on and off. When toggled on, this suppresses any bpel:selectionFailure standard faults. For more information, see ignoreMissingFromData Attribute.

  • insertMissingToData: Select this option to toggle the insertMissingToData attribute on the copy rule on and off. For more information, see Section insertMissingToData Attribute.

  • keepSrcElementName (in BPEL 2.0 projects only): Select this option to toggle the keepSrcElementName attribute on the copy rule on and off. This option enables you to replace the element name of the destination (as selected by the to-spec) with the element name of the source.

  • Change Rule Type (in BPEL 2.0 projects only): Select this option to change the type of the selected rule to one of the BPEL extension rules: bpelx:copyList, bpelx:insertAfter, bpelx:insertBefore, or bpelx:append.

  • Delete rule: Select this option to delete the selected rule.

For more information about the ignoreMissingFromData, insertMissingToData, and keepSrcElementName attributes, see How to Use Assign Extension Attributes.

The icons above the To section enable you to add, delete, move up, and move down a selected copy rule.

For more information about the assign activity, see the online Help for the Copy Rules dialog and Manipulating XML Data in a BPEL Process.

Note:

If an assign activity contains multiple bpelx:append settings, it must be split into two assign activities. Otherwise, bpelx:append is moved to the end of the list each time, which can cause problems. As a work around, move it manually.

A.2.4 Assert Activity

This activity enables you to perform an assertion on a specified expression.

This is a standalone activity in which to specify assertions. This activity can be placed anywhere in the BPEL process flow. You can also specify assertions in message exchange activities from the Assertions tab in invoke activities, reply activities, receive activities, and the onMessage branch of pick and scope activities.

Figure A-5 shows the Assert dialog.

For more information about the standalone assert activity, see Assertion Conditions in a Standalone Assert Activity and What Happens When You Create Assertion Conditions.

A.2.5 Bind Entity Activity

This activity enables you to select the entity variable to act as the data handle to access and plug in different data provider service technologies.

The entity variable can be used with an Oracle Application Development Framework (ADF) Business Component data provider service using service data object (SDO)-based data. The entity variable enables you to specify BPEL data operations to be performed by an underlying data provider service. The data provider service performs the data operations in a data store behind the scenes and without use of other data store-related features provided by Oracle BPEL Process Manager (for example, the database adapter). This action enhances Oracle BPEL Process Manager runtime performance and incorporates native features of the underlying data provider service during compilation and runtime.

Figure A-6 shows the Bind Entity dialog.

A.2.6 Call Activity

This activity enables you to execute referenced subprocess code in standalone and inline subprocesses in BPEL 2.0. A subprocess is a fragment of BPEL code that can be reused within a particular processor by separate processes.

Figure A-7 shows the Edit Call dialog.

For more information about the call activity, see Introduction to Standalone and Inline BPEL Subprocess Invocations and Creating Standalone and Inline BPEL Subprocesses in a BPEL Process.

A.2.7 Compensate Activity

This activity invokes compensation on an inner scope activity that has successfully completed. This activity can be invoked only from within a fault handler or another compensation handler. Compensation occurs when a process cannot complete several operations after completing others. The process must return and undo the previously completed operations. For example, assume a process is designed to book a rental car, a hotel, and a flight. The process books the car and the hotel, but cannot book a flight for the correct day. In this case, the process performs compensation by unbooking the car and the hotel.The compensation handler is invoked with the compensate activity, which names the scope on which the compensation handler is to be invoked.

Figure A-8 shows the Compensate dialog in BPEL 1.1. You can perform the following tasks:

  • Click the General tab to provide the activity with a meaningful name.

  • Select the scope activity on which to invoke the compensation handler.

In BPEL 2.0, the Compensate dialog includes a Documentation tab.

For more information about the compensate activity, see Using Compensation After Undoing a Series of Operations.

A.2.8 CompensateScope Activity

This activity enables you to start compensation on a specified inner scope that has already completed successfully. Only use this activity from within a fault handler, another compensation handler, or a termination handler.

Note:

This activity is only supported in BPEL 2.0 projects.

Figure A-9 shows the CompensateScope dialog.

Figure A-9 CompensateScope Dialog

Description of Figure A-9 follows
Description of "Figure A-9 CompensateScope Dialog"

For more information about the compensateScope activity, see Using Compensation After Undoing a Series of Operations.

A.2.9 Create Entity Activity

This activity enables you to create an entity variable. The entity variable can be used with an Oracle ADF Business Component data provider service using SDO-based data.

Figure A-10 shows the Create Entity dialog.

Figure A-10 Create Entity Dialog

Description of Figure A-10 follows
Description of "Figure A-10 Create Entity Dialog"

For more information, see Delegating XML Data Operations to Data Provider Services.

A.2.10 Dehydrate Activity

By default, dehydration points are set on activities such as a receive, onMessage, onAlarm, and wait. The dehydrate activity enables you to explicitly specify a dehydration point. This activity acts as a dehydration point to automatically maintain long-running asynchronous processes and their current state information in a database while they wait for asynchronous callbacks. Storing the process in a database preserves the process and prevents any loss of state or reliability if a system shuts down or a network problem occurs. This feature increases both BPEL process reliability and scalability.

The bpelx:dehydrate extension implements dehydration. For BPEL projects that support BPEL version 1.1, the syntax is as follows:

<bpelx:dehydrate name="DehydrateInstance"/>

For BPEL projects that support BPEL version 2.0, the syntax is as shown in the following example:

<extensionActivity>
      <bpelx:dehydrate name="DehydrateInstance"/>
 </extensionActivity>

Figure A-11 shows the Dehydrate dialog in BPEL 2.0.

A.2.11 Dynamic Partner Link Activity

This activity enables you to dynamically assign an endpoint reference to a partner link for use at runtime in BPEL version 1.1.

Figure A-12 shows the Dynamic Partner Link dialog in BPEL 1.1.

Figure A-12 Dynamic Partner Link Dialog

Description of Figure A-12 follows
Description of "Figure A-12 Dynamic Partner Link Dialog"

For more information, see Creating a Dynamic Partner Link at Design Time for Use at Runtime.

A.2.12 Email Activity

This activity enables you to send an email notification about an event.

For example, an online shopping business process of an online bookstore sends a courtesy email message to you after the items are shipped. The business process calls the notification service with your user ID and notification message. The notification service gets the email address from Oracle Internet Directory.

Figure A-13 shows the Email dialog in BPEL 2.0.

For more information about the email activity, see How To Configure the Email Notification Channel.

A.2.13 Empty Activity

This activity enables you to insert a no-operation instruction into a process. This activity is useful when you must use an activity that does nothing (for example, when a fault must be caught and suppressed).

Figure A-14 shows the Empty dialog in BPEL 2.0.

For more information about the empty activity, see How to Insert No-Op Instructions into a Business Process with an Empty Activity.

A.2.14 Exit Activity

This activity enables you to immediately end all currently running activities on all parallel branches without involving any termination handling, fault handling, or compensation handling mechanisms.

Note:

This activity replaces the terminate activity in BPEL 2.0 projects.

Figure A-15 shows the Exit dialog.

For more information about the exit activity, see Immediately Ending a Business Process Instance with the Exit Activity in BPEL 2.0.

A.2.15 Flow Activity

This activity enables you to specify one or more activities to be performed concurrently. A flow activity completes when all activities in the flow have finished processing. Completion of a flow activity includes the possibility that it can be skipped if its enabling condition is false.

For example, assume you use a flow activity to enable two loan offer providers (United Loan service and Star Loan service) to start in parallel. In this case, the flow activity contains two parallel activities – the sequence to invoke the United Loan service and the sequence to invoke the Star Loan service. Each service can take an arbitrary amount of time to complete their loan processes.

Figure A-16 shows an initial flow activity with its two panels for parallel processing. You drag activities into both panels to create parallel processing. When complete, a flow activity looks as shown in Figure A-17.

Figure A-16 Flow Dialog (At Time of Creation)

Description of Figure A-16 follows
Description of "Figure A-16 Flow Dialog (At Time of Creation)"

Figure A-17 Flow Dialog (After Design Completion)

Description of Figure A-17 follows
Description of "Figure A-17 Flow Dialog (After Design Completion)"

You can also synchronize the execution of activities within a flow activity. This ensures that certain actives only execute after other activities have completed.

Note:

Oracle's BPEL implementation executes flows in the same, single execution thread of the BPEL process, and not in separate threads.

For more information about the flow activity, see Creating a Parallel Flow.

A.2.16 FlowN Activity

This activity enables you to create multiple flows equal to the value of N, which is defined at runtime based on the data available and logic within the process. An index variable increments each time a new branch is created, until the index variable reaches the value of N.

Note:

This activity is replaced by the forEach activity in BPEL 2.0 projects.

Figure A-18 shows the FlowN dialog.

For more information about the flowN activity, see Customizing the Number of Flow Activities with the flowN Activity in BPEL 1.1.

A.2.17 forEach Activity

This activity enables you to process multiple sets of activities sequentially or in parallel. The forEach activity executes its contained (child) scope activity exactly N+1 times, where N equals the final counter value minus the starting counter value that you specify in the Counter Values tab of the For Each dialog. While other structured activities such as a flow activity can have any type of activity as its contained activity, the forEach activity can only use a scope activity.

Note:

This activity replaces the flowN activity in BPEL 2.0 projects.

Figure A-19 shows a forEach activity with its contained scope.

For more information about the forEach activity, see Processing Multiple Sets of Activities with the forEach Activity in BPEL 2.0.

A.2.18 If Activity

This activity enables you to define conditional behavior for specific activities to decide between two or more branches. Only one activity is selected for execution from a set of branches.

Note:

This activity replaces the switch activity in BPEL 2.0 projects.

Figure A-20 shows an if activity with the following defined if, elseif, and else branches.

For more information about the if activity, see Defining Conditional Branching with the If Activity in BPEL 2.0.

A.2.19 IM Activity

This activity enables you to send an automatic, asynchronous instant message (IM) notification to a user, group, or destination address. Figure A-21 shows the IM dialog.

For more information, see How to Configure the IM Notification Channel.

A.2.20 Invoke Activity

This activity enables you to specify an operation you want to invoke for the service (identified by its partner link). The operation can be one-way or request-response on a port provided by the service. You can also automatically create variables in an invoke activity. An invoke activity invokes a synchronous web service or initiates an asynchronous web service.

The invoke activity opens a port in the process to send and receive data. It uses this port to submit required data and receive a response. For synchronous callbacks, only one port is needed for both the send and receive functions.

Figure A-22 shows the Invoke dialog in BPEL 2.0. You can perform the following tasks:

  • Provide the activity with a meaningful name.

  • Select the partner link for which to specify an operation.

  • Select the operation to perform.

  • Automatically create a variable or select an existing variable in which to transport the data (payload).

For more information about the invoke activity, see the following:

A.2.21 Java Embedding Activity

This activity enables you to add custom Java code to a BPEL process using the Java BPEL extension bpelx:exec. This is useful when you have Java code that can perform a function, and want to use this existing code instead of starting over. In BPEL 2.0 projects, the bpelx:exec extension and Java code are wrapped in an <extensionActivity> element.

Figure A-23 shows the Edit Java Embedding dialog in BPEL 2.0.

Figure A-23 Edit Java Embedding Dialog

Description of Figure A-23 follows
Description of "Figure A-23 Edit Java Embedding Dialog"

For more information about the Java embedding activity, see Incorporating Java and Java EE Code in a BPEL Process.

A.2.22 Partner Link Activity

This activity enables you to define the external services with which your process interacts. A partner link type characterizes the conversational relationship between two services by defining the roles played by each service in the conversation and specifying the port type provided by each service to receive messages within the conversation. For example, if you create a process to interact with a Credit Rating Service and two loan provider services (United Loan and Star Loan), you create partner links for all three services.

Figure A-24 shows the Partner Link dialog in BPEL 2.0. You provide the following details:

  • A meaningful name for the service.

  • The web services description language (WSDL) file of the external service.

  • The actual service type (defined as Partner Link Type).

  • The role of the service (defined as Partner Role).

  • The role of the process requesting the service (defined as My Role).

Figure A-24 Partner Link Activity

Description of Figure A-24 follows
Description of "Figure A-24 Partner Link Activity"

For more information about partner links, see Invoking an Asynchronous Web Service from a BPEL Process.

A.2.23 Phase Activity

This activity creates Oracle Mediator and business rules service components for integration with a BPEL process. You create message request input and message response output variables and design business rules for evaluating variable content for the BPEL process.

When you complete these tasks, the following activities and service components are created:

  • An assign activity that includes the message request input and message response output variables.

  • An invoke activity that is automatically designed to invoke an Oracle Mediator partner link in the BPEL process.

  • An Oracle Mediator partner link that is automatically designed to route the message request input variable to the business rules service component in the SOA composite application of which this BPEL process is a part. The business rules service component displays in the SOA Composite Editor. Oracle Mediator also displays as a service component in the SOA Composite Editor.

  • A business rules service component that evaluates the content of the message request input variable and returns the results in the message response output variable to Oracle Mediator. Oracle Mediator then makes a routing decision and routes the message to the correct target destinations.

Figure A-25 shows the Phase dialog in BPEL 2.0.

For more information, see Creating Dynamic Business Processes .

A.2.24 Pick Activity

This activity waits for the occurrence of one event in a set of events and performs the activity associated with that event. The occurrence of events is often mutually exclusive (the process either receives an acceptance or rejection message, but not both). If multiple events occur, the selection of the activity to perform depends on which event occurred first. If the events occur nearly simultaneously, there is a race and the choice of activity to be performed is dependent on both timing and implementation.

The pick activity provides an OnMessage branch. When you double-click the OnMessage icon in BPEL 2.0, the dialog shown in Figure A-26 appears.

The two branches of the pick activity are as follows:

  • OnMessage (Automatically displays below the Pick activity icon.)

    Contains the code for receiving a reply, for example, from a loan service.

  • OnAlarm (Does not automatically display; you must manually add this branch by selecting the Pick activity icon and clicking the Add OnAlarm icon.)

    Contains the code for a timeout, for example, after one minute.

Whichever branch completes first is executed; the other branch is not executed. The branch that has its condition satisfied first is executed.

Figure A-27 shows the OnAlarm dialog of the pick activity in BPEL 2.0.

Figure A-27 OnAlarm Branch Dialog of a Pick Activity

Description of Figure A-27 follows
Description of "Figure A-27 OnAlarm Branch Dialog of a Pick Activity"

Note:

You can also create OnMessage branches in BPEL 1.1 scope activities and OnAlarm branches in BPEL 1.1 and 2.0 scope activities. Expand the Scope activity in Oracle JDeveloper, and browse the icons on the left side to find the branch you want to add.

If you add correlations to an OnMessage branch, the correlations syntax is placed after the assign activity syntax. The correlation syntax must go before the assign activity.

A.2.24.1 To put the correlation syntax before the assign activity:
  1. Create a correlation set in Oracle JDeveloper.

  2. Assign this to the OnMessage branch.

  3. Complete the remaining design tasks.

  4. Before making or deploying the BPEL process, move the correlation syntax before the assign activity in the BPEL source code.

For more information about the pick activity, see the following:

A.2.25 Receive Activity

This activity specifies the partner link from which to receive information and the port type and operation for the partner link to invoke. This activity waits for an asynchronous callback response message from a service, such as a loan application approval service. While the BPEL process is waiting, it is dehydrated (compressed and stored) until the callback message arrives. The contents of this response are stored in a response variable in the process.

Figure A-28 shows the Receive dialog in BPEL 2.0. You can perform the following tasks:

  • Provide a meaningful name.

  • Select the partner link service for which to specify an operation.

  • Select the operation to be performed.

  • Automatically create a variable or select an existing variable in which to transport the callback response.

For more information about the receive activity, see the following:

A.2.26 Receive Signal Activity

Use this activity in detail processes to wait for the notification signal from the master process to begin processing and in a master process to wait for the notification signal from all detail processes indicating that processing has completed.

Figure A-29 shows the Edit Receive Signal dialog.

Figure A-29 Receive Signal Dialog

Description of Figure A-29 follows
Description of "Figure A-29 Receive Signal Dialog"

For more information, see Coordinating Master and Detail Processes .

A.2.27 Remove Entity Activity

This activity enables you to remove an entity variable. This action removes the row.

Figure A-30 shows the Remove Entity dialog.

Figure A-30 Remove Entity Dialog

Description of Figure A-30 follows
Description of "Figure A-30 Remove Entity Dialog"

A.2.28 RepeatUntil Activity

Use this activity if the body of an activity must be performed at least once. The XPath expression condition in the repeatUntil activity is evaluated after the body of the activity completes. The condition is evaluated repeatedly (and the body of the activity processed) until the provided boolean condition is true. Figure A-31 shows the Repeat Until dialog.

Note:

This activity is only supported in BPEL 2.0 projects.

Figure A-31 Repeat Until Dialog

Description of Figure A-31 follows
Description of "Figure A-31 Repeat Until Dialog"

For more information about the repeatUntil activity, see, Defining Conditional Branching with the repeatUntil Activity.

A.2.29 Replay Activity

This activity enables you to re-execute the activities inside a selected scope.

Figure A-32 shows the Replay dialog in BPEL 2.0.

For more information about the replay activity, see Re-executing Activities in a Scope Activity with the Replay Activity.

A.2.30 Reply Activity

This activity allows the process to send a message in reply to a message that was received through a receive activity. The combination of a receive activity and a reply activity forms a request-response operation on the WSDL port type for the process.

Figure A-33 shows the Reply dialog in BPEL 2.0.

For more information about the reply activity, see the following:

A.2.31 Rethrow Activity

This activity enables you to rethrow a fault originally captured by the immediately enclosing fault handler.

Note:

This activity is only supported in BPEL 2.0 projects.

Figure A-34 shows a rethrow activity within a fault handler (catch activity).

For more information about rethrowing faults, see Rethrowing Faults with the Rethrow Activity.

A.2.32 Schedule Job

This activity enables you to schedule an Oracle Enterprise Scheduler job in a BPEL process. Figure A-35 shows the Schedule Job dialog.

Figure A-35 Schedule Job Dialog

Description of Figure A-35 follows
Description of "Figure A-35 Schedule Job Dialog"

For more information, see Invoking an Oracle Enterprise Scheduler Job in a BPEL Process.

A.2.33 Scope Activity

This activity consists of a collection of nested activities that can have their own local variables, fault handlers, compensation handlers, and so on. A scope activity is analogous to a { } block in a programming language.

Each scope has a primary activity that defines its behavior. The primary activity can be a complex structured activity, with many nested activities within it of arbitrary depth. The scope is shared by all the nested activities.

Figure A-36 shows the Scope dialog in BPEL 2.0. Define appropriate activities inside the scope activity.

Fault handling is associated with a scope activity. The goal is to undo the incomplete and unsuccessful work of a scope activity in which a fault has occurred. You define catch activities in a scope activity to create a set of custom fault-handling activities. Each catch activity is defined to intercept a specific type of fault.

Figure A-37 shows the Add Catch icon inside a scope activity. Figure A-38 shows the catch activity area that appears when you click the Add Catch icon. Within the area defined as Drop Activity Here, you drag additional activities to create fault handling logic to catch and manage exceptions.

For example, a client provides a social security number to a credit rating service when applying for a loan. This number is used to perform a credit check. If a bad credit history is identified or the social security number is identified as invalid, an assign activity inside the catch activity notifies the client of the loan offer rejection. The entire loan application process is terminated with a terminate activity.

Figure A-37 Creating a Catch Branch

Description of Figure A-37 follows
Description of "Figure A-37 Creating a Catch Branch"

Figure A-38 Catch Activity Icon

Description of Figure A-38 follows
Description of "Figure A-38 Catch Activity Icon"

For more information about the scope activity and fault handling, see the following:

A.2.34 Sequence Activity

This activity enables you to define a collection of activities to perform in sequential order. For example, you may want the following activities performed in a specific order:

  • A customer request is received in a receive activity.

  • The request is processed inside a flow activity that enables concurrent behavior.

  • A reply message with the final approval status of the request is sent back to the customer in a reply activity.

A sequence activity makes the assumption that the request can be processed in a reasonable amount of time, justifying the requirement that the invoker wait for a synchronous response (because this service is offered as a request-response operation).

When this assumption cannot be made, it is better to define the customer interaction as a pair of asynchronous message exchanges.

When you double-click the Sequence icon, the activity area shown in Figure A-39 appears. Drag and define appropriate activities inside the sequence activity.

For more information about the sequence activity, see the following:

A.2.35 Signal Activity

This activity is used in a master process to notify detail processes to perform processing at runtime and used in detail processes to notify a master process that processing has completed. Figure A-40 shows the Edit Signal dialog.

For more information, see Coordinating Master and Detail Processes .

A.2.36 SMS Activity

This activity enables you to send a short message system (SMS) notification about an event.

Figure A-41 shows the SMS dialog in BPEL 2.0.

For more information about the SMS activity, see How to Configure the SMS Notification Channel.

A.2.37 Switch Activity

This activity consists of an ordered list of one or more conditional branches defined in a case branch, followed optionally by an otherwise branch. The branches are considered in the order in which they appear. The first branch whose condition is true is taken and provides the activity performed for the switch. If no branch with a condition is taken, then the otherwise branch is taken. If the otherwise branch is not explicitly specified, then an otherwise branch with an empty activity is assumed to be available. The switch activity is complete when the activity of the selected branch completes.

A switch activity differs in functionality from a flow activity. For example, a flow activity enables a process to gather two loan offers at the same time, but does not compare their values. To compare and make decisions on the values of the two offers, a switch activity is used. The first branch is executed if a defined condition (inside the case branch) is met. If it is not met, the otherwise branch is executed.

Note:

This activity is replaced by the if activity in BPEL 2.0 projects.

Figure A-42 shows a switch activity with the following defined branches.

For more information about the switch activity, see the following:

A.2.38 Terminate Activity

This activity enables you to end the tasks of an activity (for example, the fault handling tasks in a catch branch). For example, if a client's bad credit history is identified or a social security number is identified as invalid, a loan application process is terminated, and the client's loan application document is never submitted to the service loan providers.

Note:

  • The terminate activity is replaced by the exit activity in BPEL 2.0 projects.

  • Do not use the terminate activity with a synchronous BPEL process because it can lead to timeouts.

Figure A-43 shows several terminate activities in the otherwise branch of a switch activity.

For more information about the terminate activity, see Stopping a Business Process Instance with the Terminate Activity in BPEL 1.1.

A.2.39 Throw Activity

This activity generates a fault from inside the business process.

Figure A-44 shows the Throw dialog in BPEL 2.0.

For more information about the throw activity, see Throwing Internal Faults with the Throw Activity.

A.2.40 Translate Activity

This activity enables you to configure an inbound (with automatic use of the doTranslateFromNative function) translation or outbound (with automatic use of the doTranslateToNative function) translation.

  • Inbound translation consists of native format to XML and opaque to XML.

  • Outbound translation consists of XML to native format and large XML to an attachment in a directory.

This activity is supported in both BPEL 1.1. and 2.0. Figure A-45 shows the Translate dialog.

For more information, see Translating Between Native Data and XML.

A.2.41 User Notification Activity

This activity enables you to design a BPEL process in which you do not explicitly select a notification channel during design time, but simply indicate that a notification must be sent. The channel to use for sending notifications is resolved at runtime based on preferences defined by the end user in the User Messaging Preferences user interface of the Oracle User Messaging Service. This moves the responsibility of notification channel selection from Oracle BPEL Designer to the end user. If the end user does not select a preferred channel or rule, email is used by default for sending notifications to that user. Figure A-46 provides details.

Figure A-46 User Notification Dialog

Description of Figure A-46 follows
Description of "Figure A-46 User Notification Dialog"

For more information about user notifications, see Allowing the End User to Select Notification Channels.

For more information about the Oracle User Messaging Service, see Administering Oracle User Messaging Service and Developing Applications with Oracle User Messaging Service.

A.2.42 Validate Activity

This activity enables you to validate variables in the list. The variables are validated against their XML schema.

Figure A-47 shows the Validate dialog in BPEL 2.0.

For more information about the validate activity, see Validating XML Data.

A.2.43 Wait Activity

This activity allows a process to specify a delay for a certain period or until a certain deadline is reached. A typical use of this activity is to invoke an operation at a certain time. This activity enables you to wait for a given time period or until a certain time has passed. Exactly one of the expiration criteria must be specified.

Figure A-48 shows the Wait dialog in BPEL 2.0.

For more information about the wait activity, see Setting an Expiration Time with a Wait Activity .

A.2.44 While Activity

This activity supports repeated performance of a specified iterative activity. The iterative activity is repeated until the given while condition is no longer true.

Figure A-49 shows the While dialog in BPEL 2.0. You can enter expressions in this dialog.

For more information about the while activity, see Defining Conditional Branching with the While Activity.

A.2.45 XQuery Transform Activity

This activity enables you to create an XQuery transformation that maps source elements to target elements (for example, incoming purchase order data into outgoing purchase order acknowledgment data).

Figure A-50 shows the XQuery dialog in BPEL 2.0. This dialog enables you to perform the following tasks:

  • Define the source and target variables and parts to map.

  • Specify the XQuery mapper file.

  • Click the second icon (the Add icon) to the right of the Mapper File field to access the XQuery Mapper for creating a new XQuery file for graphically mapping source and target elements. Click the Edit icon (third icon) to edit an existing XQuery file.

For more information, see Creating Transformations with the XQuery Mapper.

A.2.46 XSLT Transform Activity

This activity enables you to create an XSL transformation that maps source elements to target elements (for example, incoming purchase order data into outgoing purchase order acknowledgment data).

Figure A-51 shows the Transform dialog in BPEL 2.0. This dialog enables you to perform the following tasks:

  • Define the source and target variables and parts to map.

  • Specify the transformation mapper file.

  • Click the second icon (the Add icon) to the right of the Mapper File field to access the XSLT Map Editor for creating a new XSL file for graphically mapping source and target elements. Click the Edit icon (third icon) to edit an existing XSL file.

For more information about the transform activity, see Creating Transformations with the XSLT Map Editor .

A.3 Introduction to BPEL Services

BPEL processes can communicate with web-based applications and clients through SOAP web services, Oracle ADF Business Component (BC) services, JCA adapters, Oracle B2B services, Oracle Healthcare services, Oracle Business Activity Monitoring 11g, HTTP binding, direct binding, EJB services, REST adapters, Oracle E-Business Suite, JDE World, SAP, cloud adapters, and partner links.

To access BPEL services:

  1. In the Components window of Oracle BPEL Designer, expand BPEL Services to display the services.
  2. Drag and drop the service to the appropriate swimlane. Table A-2 lists the available services and provides references to documentation that describes these services.

    Table A-2 BPEL Services

    BPEL Service For More Information, See...

    ADF-BC services

    ADF-BC Services

    AQ adapter

    Oracle B2B

    Oracle Business Activity Monitoring (BAM) 11g

    Coherence Cache

    Database adapter

    Direct binding service

    Oracle E-Business Suite adapter

    EJB service

    File adapter

    FTP adapter

    Healthcare adapter

    HTTP binding

    HTTP Binding Service

    JDE World adapter

    http://www.oracle.com/technetwork/middleware/adapters/documentation/index.html

    JMS adapter

    LDAP

    Oracle MFT

    MQ adapter

    REST service

    Integrating REST Operations in SOA Composite Applications

    Cloud adapters

    Cloud Adapters

    SAP adapter

    http://www.oracle.com/technetwork/middleware/adapters/documentation/index.html

    SOAP

    Socket adapter

    Third-party adapter

    Oracle User Messaging Service