1Z0-451: Orchestrating Services with BPEL

This is part of 1Z0-451: Oracle SOA Foundation Practitioner Exam

Explain BPEL Components activities and partner Links

Activities

* Activities are the building blocks of a BPEL process service component.
* Activities perform specific tasks within a BPEL process service component.
* Activities can be dragged into a BPEL process using BPEL Designer.
* See this post for a list of BPEL activities.

Partner Links

See Introduction to Partner Links
* A partner link defines
– an external service with which the BPEL process is to interact.
– a conversational relationship between two services by defining roles played by each service.
* Can be defined as
– services
– references (e.g. JCA adapter)
* Can be defined in
– composite editor (preferred)
– BPEL editor (still need to wire in composite diagram)
* Dialog fields:
– Name
– Process
– WSDL URL
– Partner link type
– Pertner role
– My role (for asynch only)

Describe Synchronous and Asynchronous BPEL Processes

Synchronous Interactions

* Client sends a message to the service and receives an immediate reply.
* Uses a reply activity to respond to the client.

Asynchronous Interactions

* A client sends a request to a service and waits until the service replies.
* Uses an invoke activity to respond to the client.

Describe Message Transformations and XSLT

* See here for details.
* You use the XSLT Mapper to create the contents of a map file.

Explain Parallel Flow and Conditional branching

* See
Using Parallel Flow in a BPEL Process
Using Conditional Branching in a BPEL Process

Parallel Flow

* Enables a BPEL process service component to perform multiple tasks at the same time.
* Especially useful when you must perform several time-consuming and independent tasks.
* Created by Flow Activity.
* Use parallel flow Links to
– synchronize between activities from different flows.
– provide dependencies between parallel flow activities.
* Use optional join condition in target activities to create join condition (logical AND operation).
– defaults to no join (logical OR operation).

Control Number of Parallel Branches

* Use FlowN for BPEL 1.1 project.
– For example, if the array contains 3 elements, N is set to 3. Assuming the index variable begins at 1, the flowN activity creates three parallel branches with indexes 1, 2, and 3.
* Use forEach for BPEL 2.0 project.
– Executes a child scope activity exactly N+1 times, where N = (final counter value) – (starting counter value).
– Can only include a single child scope activity.
– Support both sequential (default) and parallel (use Parallel Execution checkbox) iterations.
– A completion condition can be specified on the Completion tab. Once completion condition is evaluated to true, the loop is terminated.

Conditional branching

* Use switch activity in BPEL 1.1 project.
* Use if activity in BPEL 2.0 project.
– if-elseif-else
* Instead of using conditional branching, use skipCondition (an XPath expression) to bypass the execution of a particular activity.

While Activity

* The while loop repeats an activity until a specified success criteria is met.
* Instead of the while activity, use repeatUtil if the body of an activity must be performed at least once.

Explain BPEL integration with Java

* See
Incorporating Java and Java EE Code in a BPEL Process

Methods for Incorporating Java and Java EE code in BPEL Processes

* Wrap as a SOAP service.
– Performance hit.
– Loss of transactionality.
* Embed Java code snippets into a BPEL process with the bpelx:exec tag.
– Better performance.
– Retain transactionality.
– BPEL 2.0 uses Java Embedding Activity to execute Java code snippets.
* Use an XML facade to simplify DOM manipulation.

Built-in bpelx:exec Methods

* Object lookup( String name ) // JNDI access
* long getInstanceId( ) //Unique ID associated with each instance
* String setTitle( String title ) / String getTitle() // Title of this instance
* String setStatus( String status ) / String getStatus() // Status of this instance
* void setCompositeInstanceTitle(String title) // Set the composite instance title
* void setIndex( int i, String value ) / String getIndex( int i )
* void setCreator( String creator ) / String getCreator() // Wo initiated this instance
* void setCustomKey( String customKey ) / String getCustomKey() // Second primary key
* void setMetadata( String metadata ) / String getMetadata () // Metadata for generating lists
* String getPreference( String key ) // Access preference
* void addAuditTrailEntry(String message, Object detail) // Add an entry to the audit trail
* void addAuditTrailEntry(Throwable t) // Access file stored in the suitcase
* Object getVariableData(String name) throws BPELFault // Access variables stored in the scope
* Object getVariableData(String name, String partOrQuery) throws BPELFault // Access variables
* Object getVariableData(String name, String part, String query) // Access variables
* void setVariableData(String name, Object value)
* void setVariableData(String name, String part, Object value)
* void setVariableData(String name, String part, String query, Object value)

Tips

* Use Wait Activity instead of thread.sleep() in a Java code.
– Releases resource upon entering the wait activity.
– Enables ongoing transaction to commit.
– Instance data is hydrated into data store.

Adding Custom Classes and JAR Files

* Add to extenstion library
– For WebLogic server, add to: $ORACLE_HOME/soa/modules/oracle.soa.ext_11.1.1
– For JDev add to: application_name/project/sca-inf/lib
* Add JARs to BpelcClasspath
SOA Infrastructure > SOA Administration > BPEL Properties > More BPEL Configuration Properties > BpelcClasspath.
* Add custom classes:
– Copy to classes directory.
– Restart WebLogic server.
* Add cusotm JARs:
– Copy to directory
– Run ant ???
– Restart WebLogic server.

Next>> Advanced BPEL Concepts

References

* Using the BPEL Process Service Component

This entry was posted in certification, soa11g. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


*

This site uses Akismet to reduce spam. Learn how your comment data is processed.