Web Services
  Home arrow Web Services arrow Page 5 - Flow and Web Services
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
WEB SERVICES

Flow and Web Services
By: Sams Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2006-08-24

    Table of Contents:
  • Flow and Web Services
  • XPath Extension Functions
  • Flows
  • Link Semantics
  • Putting Together the Flow Sample

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Flow and Web Services - Putting Together the Flow Sample


    (Page 5 of 5 )

    Having said all that, let's get back to SkatesTown's flow as outlined in Figure 12.5. Listing 12.2 shows how this flow is expressed using the BPEL flow activity. The definition of a flow activity always starts with the specification of its links. Activities of a flow become the source and/or target of these links by referencing them via the standard activity elements source and target. The transition condition is an optional attribute of the activity's source element:

    Listing 12.2 Flow Activity

    <flow>
    <links>
    <link name="validPurchaseOrder"/>
    <link name="invalidPurchaseOrder"/>
    <link name="inLocalStock_initiateDelivery"/>
    <link name="inLocalStock_createInvoice"/>
    <link name="notInLocalStock"/>
    <link name="stockReplenished_initiateDelivery"/> 
    <link name="stockReplenished_createInvoice"/>
    </links>
    <invoke partnerLink="local"
    portType="skt:skatestownPortType" operation="validatePurchaseOrder" inputVariable="poSubmissionRequest" outputVariable=
    "validatePurchaseOrderResponse"> <source linkName="validPurchaseOrder"
    transitionCondition= "bpws:getVariableData
    ('validatePurchaseOrderResponse','valid')=true"/> <source linkName="invalidPurchaseOrder"
    transitionCondition= "bpws:getVariableData
    ('validatePurchaseOrderResponse','valid')=false"/> </invoke> <throw faultName="pos:invalidPO"> <target linkName="invalidPurchaseOrder"/> </throw> <invoke partnerLink="local"
    portType="skt:skatestownPortType" operation="checkLocalStock" inputVariable="poSubmissionRequest" outputVariable="checkLocalStockResponse"> <target linkName="validPurchaseOrder"/> <source linkName="inLocalStock_createInvoice"
    transitionCondition= "bpws:getVariableData
    ('checkLocalStockResponse','available')=true"/> <source
    linkName="inLocalStock_initiateDelivery"
    transitionCondition= "bpws:getVariableData
    ('checkLocalStockResponse','available')=true"/> <source linkName="notInLocalStock"
    transitionCondition= "bpws:getVariableData
    ('checkLocalStockResponse','available')=false"/> </invoke> <sequence name="replenishStock"> <target linkName="notInLocalStock"/> <source
    linkName="stockReplenished_initiateDelivery"/> <source
    linkName="stockReplenished_createInvoice"/> ... </sequence> <invoke partnerLink="local"
    portType="skt:skatestownPortType" operation="initiateDelivery" inputVariable="poSubmissionRequest"> <target
    linkName="inLocalStock_initiateDelivery"/> <target
    linkName="stockReplenished_initiateDelivery"/> </invoke> <invoke partnerLink="local"
    portType="skt:skatestownPortType" operation="createInvoice" inputVariable="poSubmissionRequest" outputVariable="poSubmissionResponse"> <target linkName="inLocalStock_createInvoice"/> <target
    linkName="stockReplenished_createInvoice"/> </invoke> </flow>

    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.

       · This article is an excerpt from the book "Building Web Services with Java: Making...
     

    Buy this book now. This article 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: 0672326418). Check it out today at your favorite bookstore. Buy this book now.

    WEB SERVICES ARTICLES

    - 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
    - Orchestrating Web Services
    - Notifications and Resources in the WS-Resour...







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek