[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><definitions targetNamespace="http://jbpm.org/examples/hello"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://jbpm.org/examples/hello"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <!-- <emphasis role="bold">carries the name of a person</emphasis> -->
+ <message name="nameMessage">
+ <part name="name" type="xsd:string"/>
+ </message>
+
+ <!-- <emphasis role="bold">carries the greeting</emphasis> -->
+ <message name="greetingMessage">
+ <part name="greeting" type="xsd:string"/>
+ </message>
+
+ <!-- <emphasis role="bold">describes the interface presented to callers</emphasis> -->
+ <portType name="helloPT">
+ <operation name="sayHello">
+ <input message="tns:nameMessage"/>
+ <output message="tns:greetingMessage"/>
+ </operation>
+ </portType>
+
+</definitions></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 <partnerLinks> 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 <variables> 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><process name="helloWorld"
+ targetNamespace="http://jbpm.org/examples/hello"
+ xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
+ xmlns:tns="http://jbpm.org/examples/hello"
+ xmlns:bpel="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://schemas.xmlsoap.org/ws/2003/03/business-process/
+ http://schemas.xmlsoap.org/ws/2003/03/business-process/">
+
+ <partnerLinks>
+ <!-- <emphasis role="bold">establishes the relationship with the caller agent</emphasis> -->
+ <partnerLink name="caller" partnerLinkType="tns:helloPLT"
+ myRole="service"/>
+ </partnerLinks>
+
+ <variables>
+ <!-- <emphasis role="bold">holds the incoming message</emphasis> -->
+ <variable name="request" messageType="tns:nameMessage"/>
+ <!-- <emphasis role="bold">holds the outgoing message</emphasis> -->
+ <variable name="response" messageType="tns:greetingMessage"/>
+ </variables>
+
+ <sequence>
+
+ <!-- <emphasis role="bold">receive the name of a person</emphasis> -->
+ <receive partnerLink="caller" portType="tns:helloPT"
+ operation="sayHello" variable="request"
+ createInstance="true"/>
+
+ <!-- <emphasis role="bold">compose a greeting phrase</emphasis> -->
+ <assign>
+ <copy>
+ <from expression="concat('Hello, ',
+ bpel:getVariableData('request', 'name'),
+ '!')"/>
+ <to variable="response" part="greeting"/>
+ </copy>
+ </assign>
+
+ <!-- <emphasis role="bold">reply with the greeting</emphasis> -->
+ <reply partnerLink="caller" portType="tns:helloPT"
+ operation="sayHello" variable="response"/>
+
+ </sequence>
+
+</process></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><definitions targetNamespace="http://jbpm.org/examples/hello"
+ ...
+ xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
+
+ <!-- <emphasis role="bold">characterizes the relationship between the greeting process
+ and its caller</emphasis> -->
+ <plt:partnerLinkType name="helloPLT">
+ <plt:role name="service">
+ <plt:portType name="tns:helloPT"/>
+ </plt:role>
+ </plt:partnerLinkType>
+ </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