Home arrow Web Services arrow Page 4 - Process Lifecycles and Web Services
WEB SERVICES

Process Lifecycles and Web Services


Last week, we began taking a look at business processes and their role in constructing web services. This week, we will look at process lifecycles, invoking and providing web services, and more. This article, the third in a series, is excerpted from chapter 12 of Building Web Services with Java: Making sense of XML, SOAP, WSDL, and UDDI, written by Steve Graham et al. (Sams; ISBN: 672326418).

Author Info:
By: Sams Publishing
Rating: 5 stars5 stars5 stars5 stars5 stars / 7
August 17, 2006
TABLE OF CONTENTS:
  1. · Process Lifecycles and Web Services
  2. · Properties and Correlation Sets
  3. · Invoking Web Services and Providing Web Services
  4. · Data Handling and Related Activities

print this article
SEARCH DEVARTICLES

Process Lifecycles and Web Services - Data Handling and Related Activities
(Page 4 of 4 )

Messages initiate business processes. Processes receive messages from business partners and respond to partners via messages. Every invocation of a Web service that is orchestrated by a process is based on the exchange of messages. All these messages are specified as part of the external interface of the business process, its portTypes.

Looking at the messages from the point of view of the process definition, BPEL provides the construct for variables to store these messages. Variables are used for

  • Messages that a process receives

  • Messages that are needed as input for the invocation of Web services operations

  • The result of service invocations

  • Intermediate data that the internal business logic might depend on (for example, to compose messages or for conditional logic)

Variables can be typed either by WSDL message types or by XML schema types: WSDL messages types are to be specified for messages that are exchanged with partners. Variables used only for internal data handling can be typed either way.

Variables are scoped. They can be globally declared at the process level. BPEL also supports the notion of variables that are local to a BPEL scope (more details on scopes later). The scope of a variable determines its visibility and lifetime. A variable is visible within the scope it's declared in and also to all nested scopes within that scope.

The purchase order request is an example of a global variable declaration using a message type. Its declaration appears in the variables section of the process:

<process name="PurchaseOrderProcess"...>
...
<variables>
...
<variable name="poSubmissionRequest"
messageType=
"pos:poSubmissionRequest"/> ... </variables>
... </process>

The next snippet shows an example of a local, xsd-type variable. It's declared at the scope level:

<scope>
...  
<variables>
...
<variable name="itemCount"
type="xsd:integer"/>
...
</variables>
...
</scope>

Please check back next week for the continuation of this article.


DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

blog comments powered by Disqus
WEB SERVICES ARTICLES

- Dealing with Loose Coupling in a Service-Ori...
- Loose Coupling in a Service-Oriented Archite...
- Safety, Idempotence, and the Resource-Orient...
- The Resource-Oriented Architecture in Action
- Features of the Resource-Oriented Architectu...
- The Resource-Oriented Architecture
- Getting Started with Flex
- Automated Billing and Faxing for the Web
- An Introduction to Web Services
- The Foundations of Web Services: From Novice...
- Web Services Reengineering: Finishing Touches
- Fault Handling with Web Services
- Flow and Web Services
- Process Lifecycles and Web Services
- Business Processes and Web Services

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials