[jboss-svn-commits] JBossWS SVN: r835 - in tags/jbossws-1.0.3.GA/docs/user-guide/project/en: . images modules modules/wsbpel

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Aug 25 18:19:53 EDT 2006


Author: alex.guizar at jboss.com
Date: 2006-08-25 18:19:51 -0400 (Fri, 25 Aug 2006)
New Revision: 835

Added:
   tags/jbossws-1.0.3.GA/docs/user-guide/project/en/images/wsbpel-hello.png
   tags/jbossws-1.0.3.GA/docs/user-guide/project/en/modules/wsbpel/
   tags/jbossws-1.0.3.GA/docs/user-guide/project/en/modules/wsbpel/wsbpel.xml
Modified:
   tags/jbossws-1.0.3.GA/docs/user-guide/project/en/master.template
Log:
JBWS-867

Added: tags/jbossws-1.0.3.GA/docs/user-guide/project/en/images/wsbpel-hello.png
===================================================================
(Binary files differ)


Property changes on: tags/jbossws-1.0.3.GA/docs/user-guide/project/en/images/wsbpel-hello.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: tags/jbossws-1.0.3.GA/docs/user-guide/project/en/master.template
===================================================================
--- tags/jbossws-1.0.3.GA/docs/user-guide/project/en/master.template	2006-08-25 19:59:02 UTC (rev 834)
+++ tags/jbossws-1.0.3.GA/docs/user-guide/project/en/master.template	2006-08-25 22:19:51 UTC (rev 835)
@@ -45,11 +45,11 @@
 <!ENTITY ch-wsaddressing           SYSTEM "modules/wsaddressing/wsaddressing.xml">
 <!ENTITY ch-wseventing             SYSTEM "modules/wseventing/wseventing.xml">
 <!ENTITY ch-wstransaction          SYSTEM "modules/wstransaction/wstransaction.xml">
+<!ENTITY ch-wsbpel                 SYSTEM "modules/wsbpel/wsbpel.xml">
 <!ENTITY ch-xmlregistry            SYSTEM "modules/xmlregistry/xmlregistry.xml">
 <!ENTITY appendix-a                SYSTEM "modules/appendix-a.xml">
 ]>
 
-
 <book lang="en">
 
   <bookinfo>
@@ -78,6 +78,7 @@
     <para>Web Service Lead - Thomas Diesler</para>
     <para>WS-Security, WSTools - Jason Greene</para>
     <para>WS-Eventing, Standards - Heiko Braun</para>
+    <para>WS-BPEL - Alejandro Guizar</para>
     
   </preface>
 
@@ -98,7 +99,8 @@
   &ch-wsaddressing;
   &ch-wseventing;
   &ch-wstransaction;
+  &ch-wsbpel;  
   &ch-xmlregistry;
   &appendix-a; 
   
-</book>
+</book>
\ No newline at end of file

Added: tags/jbossws-1.0.3.GA/docs/user-guide/project/en/modules/wsbpel/wsbpel.xml
===================================================================
--- tags/jbossws-1.0.3.GA/docs/user-guide/project/en/modules/wsbpel/wsbpel.xml	2006-08-25 19:59:02 UTC (rev 834)
+++ tags/jbossws-1.0.3.GA/docs/user-guide/project/en/modules/wsbpel/wsbpel.xml	2006-08-25 22:19:51 UTC (rev 835)
@@ -0,0 +1,179 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id$ -->
+
+<chapter id="wsbpel">
+
+  <title>WS-BPEL</title>
+
+  <para>This chapter is dedicated to show how to use <ulink 
+    url="http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=wsbpel">WS-BPEL</ulink> to 
+    specify business process behavior based on web services.</para>
+  
+  <section id="wsbpel.spec">
+  
+    <title>Specification</title>
+    
+    <para>Originally authored by a small charter of vendors in the software industry, WS-BPEL is 
+      under standardization at OASIS. The latest approved document as of August 22, 2006 is:</para>
+      
+    <para><ulink url="http://tinyurl.com/nw54b">Web Services Business Process Execution Language 
+      2.0 Committee Draft</ulink></para>
+      
+    <para>In the Java space, JSR-207 aims at defining metadata, interfaces and a runtime model 
+      that enable business processes to be easily and rapidly implemented using Java and deployed
+      in J2EE containers. The request submission is:</para>
+      
+    <para><ulink url="http://jcp.org/en/jsr/detail?id=207">JSR 207: Process Definition for Java
+      </ulink></para>
+      
+    <para>The provided foundation would support tasks commonly encountered when programming 
+      business processes such as parallel execution and asynchronous messaging.</para>
+      
+  </section>
+  
+  <section id="wsbpel.define">
+  
+    <title>Defining a business process</title>
+    
+    <para>Business processes model the stateful behavior of a participant in a business interaction.
+      In WS-BPEL, a process exports and imports functionality to/from participants using web
+      service interfaces exclusively.</para>
+      
+    <para>At its simplest, WS-BPEL can be used as a scripting language for web services. Consider
+      a trivial endpoint that receives a person name, composes a greeting phrase and then replies
+      with the greeting.</para>
+      
+    <para>The flow diagram below represents the processing logic.</para>
+      
+    <figure id="tutorial.hello.graph">
+      <title>Graphical representation of the Hello World process</title>
+      <mediaobject>
+        <imageobject><imagedata align="center" fileref="images/wsbpel-hello.png"/></imageobject>
+      </mediaobject>
+    </figure>      
+      
+    <para>The WSDL interface our endpoint presents to the world goes like this:</para>
+      
+    <programlisting>&lt;definitions targetNamespace=&quot;http://jbpm.org/examples/hello&quot;
+  xmlns=&quot;http://schemas.xmlsoap.org/wsdl/&quot;
+  xmlns:tns=&quot;http://jbpm.org/examples/hello&quot;
+  xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;
+
+  &lt;!-- <emphasis role="bold">carries the name of a person</emphasis> --&gt;
+  &lt;message name=&quot;nameMessage&quot;&gt;
+    &lt;part name=&quot;name&quot; type=&quot;xsd:string&quot;/&gt;
+  &lt;/message&gt;
+
+  &lt;!-- <emphasis role="bold">carries the greeting</emphasis> --&gt;
+  &lt;message name=&quot;greetingMessage&quot;&gt;
+    &lt;part name=&quot;greeting&quot; type=&quot;xsd:string&quot;/&gt;
+  &lt;/message&gt;
+
+  &lt;!-- <emphasis role="bold">describes the interface presented to callers</emphasis> --&gt;
+  &lt;portType name=&quot;helloPT&quot;&gt;
+    &lt;operation name=&quot;sayHello&quot;&gt;
+      &lt;input message=&quot;tns:nameMessage&quot;/&gt;
+      &lt;output message=&quot;tns:greetingMessage&quot;/&gt;
+    &lt;/operation&gt;
+  &lt;/portType&gt;
+
+&lt;/definitions&gt;</programlisting>
+
+    <para>You already know how to implement this in Java. Let's jump to the BPEL way. The document 
+      that defines our business process appears next. There are three major sections in it.</para>
+      
+    <itemizedlist>
+    
+      <listitem><para>The &lt;partnerLinks&gt; section lists the parties that interact with the
+        process in the course of greeting the world. The single partner link shown here
+        corresponds to the agent sending the person name (caller).</para></listitem>
+        
+      <listitem><para>The &lt;variables&gt; section defines the data items held by the process 
+        between message exchanges. The ability to mantain data effectively makes the backed endpoint 
+        stateful. The state includes received and sent messages as well as intermediate data used
+        in business logic.</para></listitem>
+        
+      <listitem><para>The rest of the document describes the normal behavior for handling a 
+        greeting request. BPEL also provides the means to perform activities in response to faults.
+        Our trivial endpoint does not require them, tough.</para></listitem>
+        
+    </itemizedlist>
+    
+    <programlisting>&lt;process name=&quot;helloWorld&quot; 
+  targetNamespace=&quot;http://jbpm.org/examples/hello&quot;
+  xmlns=&quot;http://schemas.xmlsoap.org/ws/2003/03/business-process/&quot;
+  xmlns:tns=&quot;http://jbpm.org/examples/hello&quot;
+  xmlns:bpel=&quot;http://schemas.xmlsoap.org/ws/2003/03/business-process/&quot;
+  xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
+  xsi:schemaLocation=&quot;http://schemas.xmlsoap.org/ws/2003/03/business-process/
+   http://schemas.xmlsoap.org/ws/2003/03/business-process/&quot;&gt;
+
+  &lt;partnerLinks&gt;
+    &lt;!-- <emphasis role="bold">establishes the relationship with the caller agent</emphasis> --&gt;
+    &lt;partnerLink name=&quot;caller&quot; partnerLinkType=&quot;tns:helloPLT&quot; 
+                 myRole=&quot;service&quot;/&gt;
+  &lt;/partnerLinks&gt;
+
+  &lt;variables&gt;
+    &lt;!-- <emphasis role="bold">holds the incoming message</emphasis> --&gt;
+    &lt;variable name=&quot;request&quot; messageType=&quot;tns:nameMessage&quot;/&gt;
+    &lt;!-- <emphasis role="bold">holds the outgoing message</emphasis> --&gt;
+    &lt;variable name=&quot;response&quot; messageType=&quot;tns:greetingMessage&quot;/&gt;
+  &lt;/variables&gt;
+
+  &lt;sequence&gt;
+  
+    &lt;!-- <emphasis role="bold">receive the name of a person</emphasis> --&gt;
+    &lt;receive partnerLink=&quot;caller&quot; portType=&quot;tns:helloPT&quot;
+             operation=&quot;sayHello&quot; variable=&quot;request&quot; 
+             createInstance=&quot;true&quot;/&gt;
+
+    &lt;!-- <emphasis role="bold">compose a greeting phrase</emphasis> --&gt;
+    &lt;assign&gt;
+      &lt;copy&gt;
+        &lt;from expression=&quot;concat('Hello, ',
+                          bpel:getVariableData('request', 'name'),
+                          '!')&quot;/&gt;
+        &lt;to variable=&quot;response&quot; part=&quot;greeting&quot;/&gt;
+      &lt;/copy&gt;
+    &lt;/assign&gt;
+    
+    &lt;!-- <emphasis role="bold">reply with the greeting</emphasis> --&gt;
+    &lt;reply partnerLink=&quot;caller&quot; portType=&quot;tns:helloPT&quot;
+           operation=&quot;sayHello&quot; variable=&quot;response&quot;/&gt;
+           
+  &lt;/sequence&gt;
+
+&lt;/process&gt;</programlisting>
+
+    <para>Notice the <literal>caller</literal> partner link references a <literal>partnerLinkType
+      </literal> artifact not introduced so far. Partner link types are WSDL extensibility elements
+      that represent the relationship between two services. WS-BPEL uses them as the glue between
+      the process and its partner services.</para>
+      
+    <para>In order for the process definition to be complete, we must add the partner link type to
+      the WSDL document presented earlier.</para>
+      
+    <programlisting>&lt;definitions targetNamespace=&quot;http://jbpm.org/examples/hello&quot;
+  ...
+  xmlns:plt=&quot;http://schemas.xmlsoap.org/ws/2003/05/partner-link/&quot;&gt;
+
+  &lt;!-- <emphasis role="bold">characterizes the relationship between the greeting process 
+       and its caller</emphasis> --&gt;
+  &lt;plt:partnerLinkType name=&quot;helloPLT&quot;&gt;
+    &lt;plt:role name=&quot;service&quot;&gt;
+      &lt;plt:portType name=&quot;tns:helloPT&quot;/&gt;
+    &lt;/plt:role&gt;
+  &lt;/plt:partnerLinkType&gt;
+    </programlisting>
+  
+  </section>
+  
+  <section id="wsbpel.deploy">
+  
+    <title>Deploying a business process</title>
+  
+  </section>
+
+</chapter>
\ No newline at end of file




More information about the jboss-svn-commits mailing list