[jboss-svn-commits] JBL Code SVN: r34737 - labs/jbossesb/branches/JBESB_4_9_CP/product/docs/Services_Guide/en-US.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Sun Aug 15 23:58:23 EDT 2010
Author: dlesage
Date: 2010-08-15 23:58:23 -0400 (Sun, 15 Aug 2010)
New Revision: 34737
Modified:
labs/jbossesb/branches/JBESB_4_9_CP/product/docs/Services_Guide/en-US/Service_Orchestration.xml
Log:
JBESB 3460
Modified: labs/jbossesb/branches/JBESB_4_9_CP/product/docs/Services_Guide/en-US/Service_Orchestration.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_9_CP/product/docs/Services_Guide/en-US/Service_Orchestration.xml 2010-08-16 03:51:02 UTC (rev 34736)
+++ labs/jbossesb/branches/JBESB_4_9_CP/product/docs/Services_Guide/en-US/Service_Orchestration.xml 2010-08-16 03:58:23 UTC (rev 34737)
@@ -19,23 +19,30 @@
Orchestration with the <application>Business Process Manager</application>.
</para>
- <para>
- The term, <firstterm>service orchestration</firstterm>, refers to the
- arrangement of business processes. Traditionally, the
- <firstterm>Business Process Execution Language</firstterm> (BPEL)
- has been used to execute SOAP-based web services. Red Hat recommends
- using jBPM to orchestrate processes, regardless of their end-point
- type, within the <application>JBoss Enterprise SOA
- Platform</application>.
- </para>
-
+
+ <variablelist>
+ <varlistentry>
+ <term>Service Orchestration </term>
+ <listitem>
+ <para>
+ The term, service orchestration, refers to the arrangement
+ of business processes. Traditionally, the
+ Business Process Execution Language (BPEL)
+ has been used to execute SOAP-based web services. Red Hat recommends
+ using jBPM to orchestrate all processes.
+ </para>
+
+ </listitem>
+
+ </varlistentry>
+ </variablelist>
</section>
<section>
<title>
Orchestrating Web Services
</title>
-
+ <!--
<para>
Read the <emphasis>Message Action Guide</emphasis> to gain an
understanding of how the <application>JBoss Enterprise Service
@@ -44,8 +51,8 @@
<emphasis>Guide</emphasis> also provides information about how
to configure the main components of this.
</para>
+-->
-
<note>
<para>
JBoss and the JBoss Enterprise Service Bus team also have a special
@@ -54,9 +61,7 @@
who built the award-winning <application>ActiveBPEL</application>
WS-BPEL Engine.
</para>
- </note>
-
- <note>
+
<para>
The JBoss Enterprise Service
Bus software includes <!-- the <filename>webservice_bpel</filename>
@@ -93,16 +98,18 @@
Orchestration Diagram
</title>
+<para>
+ An orchestration diagram is a flow-chart that must be used to plan
+ and desploy service orchestration processes. Utilise the jBPM
+ Integrated Development Environment to create these diagrams.
+</para>
+
+
<para>
- A flow chart-like design tool must be used to plan and deploy
- Service Orchestration processes. The <application>jBPM
- Integrated Development Environment</application> (IDE) can be
- utilised for this purpose. The following shows an example of just such
- a flow-chart, representing a simplified ordering process. (This
+ The following example orchestration diagram
+ represents a simplified ordering process. (This
example is taken from the
- <filename>bpm_orchestration4</filename> Quick Start which ships
- with the <application>JBoss Enterprise Service
- Bus</application>.)
+ <filename>bpm_orchestration4</filename> Quick Start.)
</para>
<figure id="Orchestration_diagram">
@@ -120,11 +127,11 @@
The classnames of the <xref linkend="Orchestration_diagram"/>
nodes are JBoss ESB Services. They are called <classname>Intake
Order</classname>, <classname>Calculate Discount</classname> and
- <classname>Ship It</classname>. The regular type of
- <systemitem>Node</systemitem> was used for them, which is why
+ <classname>Ship It</classname>. They are regular
+ <systemitem>nodes</systemitem>, which is why
they are labeled with <emphasis><<Node>></emphasis>.
- Each of these nodes has the
- <classname>EsbActionHandler</classname> attached to itself. This
+ Each of these nodes is attached to the
+ <classname>EsbActionHandler</classname>. This
means that the <application>Business Process
Manager</application> node will send a request to the service
and then it will remain in a "wait" state, until the Enterprise
@@ -142,310 +149,372 @@
case, someone is required to review the order before the Order
Process can occur.)
</para>
- <para>
- To create the diagram in <xref
- linkend="Orchestration_diagram"/>, select <guimenu>File > New
- > Other</guimenu> and, from the
- <systemitem>Selection</systemitem> wizard, choose
- <guilabel>JBoss jBPM Process Definition</guilabel>. The wizard
- will direct one to save the process definition. Red Hat
- recommends that a single directory be used for each process
- definition, as this makes the most sense from an organisational
- point of view. This is because one will usually end up with
- multiple files associated with each process design.
- </para>
-
+
+
+ <procedure>
+ <title>Steps to Create an Orchestration Diagram</title>
+ <step>
+ <para>Select <guimenu>File > New
+ > Other</guimenu></para>
+ </step>
+ <step>
+ <para> From the
+ <systemitem>Selection</systemitem> wizard, choose
+ <guilabel>JBoss jBPM Process Definition</guilabel>.</para>
<figure id="process_defintion">
- <title>Select the New JBoss jBPM Process Definition
- </title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/so/processdefinition.png" />
- </imageobject>
- </mediaobject>
+ <title>Select the New JBoss jBPM Process Definition
+ </title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/so/processdefinition.png" />
+ </imageobject>
+ </mediaobject>
</figure>
-
- <para>
- After creating a new process definition, start to
- "drag-and-drop" items from the <application>jBPM Integrated
- Development Environment</application>'s menu palette into the
- <guilabel>Process Design</guilabel> view. One can switch between
- the design and source modes if need be, in order to check the
- XML elements being added, or in order to add those XML fragments
- that are needed for the integration. (Recently, a new type of
- node called <firstterm>ESB Service</firstterm> was added.)
- </para>
-
-
- <figure id="menu_palette">
- <title>jBPM IDE menu palette.
- </title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/so/menu_palette.png" />
- </imageobject>
- </mediaobject>
- </figure>
-
-
-
- <para>
- Before building the order process diagram depicted in <xref
- linkend="Orchestration_diagram"/>, create and test the three
- services. These are ordinary ESB services and they are defined
- in the <filename>jboss-esb.xml</filename> file. Study the
- <filename>jboss-esb.xml</filename> file in the
- <filename>bpm_orchestration4</filename> Quick Start to learn
- more about them but the only essential things to know in
- relation to Service Orchestration are the names and categories
- of the services themselves. These are as shown in the following
- sample <filename>jboss-esb.xml</filename> file fragment:
- </para>
+
+
+ </step>
+ <step>
+ <para>Save the process definition. (Red Hat
+ recommends that a single directory be used for each process
+ definition, as this makes the most sense from an organisational
+ point of view. This is because one will usually end up with
+ multiple files associated with each process design.)</para>
+ </step>
+ <step>
+ <para>Start to
+ "drag-and-drop" items from the <application>jBPM Integrated
+ Development Environment</application>'s menu palette into the
+ <guilabel>Process Design</guilabel> view. One can switch between
+ the design and source modes if need be, in order to check the
+ XML elements being added, or in order to add those XML fragments
+ that are needed for the integration. (Recently, a new type of
+ node called <firstterm>ESB Service</firstterm> was added.)</para>
+
- <programlisting language="XML">
- <xi:include href="extras//so/jbossesb-properties_service_orchestration_fragment.xmlt" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude">
- </xi:include>
- </programlisting>
- <para>
- Reference these services by using the
- <classname>EsbActionHandler</classname> or
- <classname>EsbNotifier</classname> action handlers. (The
- <classname>EsbActionHandler</classname> should be used when the
- <application>Business Process Manager</application> expects a
- response, whilst the <classname>EsbNotifier</classname> is to be
- utilised when none is needed.)
- </para>
- <para>
- Now that the <abbrev>ESB</abbrev> services are known, drag the
- <systemitem>Start</systemitem> state node into the design view.
- A new process instance will begin at this node. Next, drag in a
- <systemitem>node</systemitem> (or ESB Service, if one is
- available.) Name this node <systemitem>Intake
- Order</systemitem>. It is possible to connect the
- <systemitem>Start</systemitem> and the <systemitem>Intake
- Order</systemitem> nodes by selecting
- <guimenuitem>Transition</guimenuitem> from the menu and then
- clicking on them both. (An arrow connecting them should appear.
- It will be pointing towards the first <systemitem>Intake
- Order</systemitem>.)
- </para>
-
- <para>
- Now add the Service and Category names to the Intake Node.
- Select the <guilabel>Source</guilabel> view. The source code of
- the <systemitem>Intake Order</systemitem> node should look like
- this:
- </para>
-
-<programlisting language="XML" role="XML"><xi:include href="extras/so/intake.xmlt" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></programlisting>
+ <figure id="menu_palette">
+ <title>jBPM IDE menu palette.
+ </title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/so/menu_palette.png" />
+ </imageobject>
+ </mediaobject>
+ </figure>
- <para>
- Next, add the <classname>EsbHandlerAction</classname> class
- reference, then the sub-element configurations for the Service
- Category and Name, the
- <systemitem>BPM_Orchestration4</systemitem> and the
- <systemitem>IntakeService</systemitem>, as per this example
- code:
- </para>
+ </step>
+<step>
+ <para>
+ Before building the order process diagram depicted in <xref
+ linkend="Orchestration_diagram"/>, create and test the three
+ services. These are ordinary ESB services and they are defined
+ in the <filename>jboss-esb.xml</filename> file. Study the
+ <filename>jboss-esb.xml</filename> file in the
+ <filename>bpm_orchestration4</filename> Quick Start to learn
+ more about them but the only essential things to know in
+ relation to Service Orchestration are the names and categories
+ of the services themselves. These are as shown in the following
+ sample <filename>jboss-esb.xml</filename> file fragment:
+ </para>
+
+ <programlisting language="XML">
+ <xi:include href="extras//so/jbossesb-properties_service_orchestration_fragment.xmlt" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude">
+ </xi:include>
+ </programlisting>
+
+ <para>
+ Reference these services by using the
+ <classname>EsbActionHandler</classname> or
+ <classname>EsbNotifier</classname> action handlers. (The
+ <classname>EsbActionHandler</classname> should be used when the
+ <application>Business Process Manager</application> expects a
+ response, whilst the <classname>EsbNotifier</classname> is to be
+ utilised when none is needed.)
+ </para>
+</step>
+<step><para>
+ Now that the <abbrev>ESB</abbrev> services are known, drag the
+ <systemitem>Start</systemitem> state node into the design view.
+ A new process instance will begin at this node.
+</para></step>
+<step><para>
+ Drag in a
+ <systemitem>node</systemitem> (or ESB Service, if one is
+ available.)
+</para></step>
+<step><para>
+ Name this node <systemitem>Intake
+ Order</systemitem>.
+</para></step>
+<step><para>
+ Name this node <systemitem>Intake
+ Order</systemitem>.
+</para></step>
+<step><para>
+ It is possible to connect the
+ <systemitem>Start</systemitem> and the <systemitem>Intake
+ Order</systemitem> nodes by selecting
+ <guimenuitem>Transition</guimenuitem> from the menu and then
+ clicking on them both. (An arrow connecting them should appear.
+ It will be pointing towards the first <systemitem>Intake
+ Order</systemitem>.)</para>
+</step>
+<step><para>
+ Add the Service and Category names to the Intake Node.
+ Select the <guilabel>Source</guilabel> view. The source code of
+ the <systemitem>Intake Order</systemitem> node should look like
+ this:
+</para>
+
+<programlisting language="XML" role="XML"><xi:include href="extras/so/intake.xmlt" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></programlisting>
+</step>
+
+<step>
+<para>
+ Add the <classname>EsbHandlerAction</classname> class
+ reference, then the sub-element configurations for the Service
+ Category and Name, the
+ <systemitem>BPM_Orchestration4</systemitem> and the
+ <systemitem>IntakeService</systemitem>, as per this example
+ code:
+</para>
+
<programlisting language="XML" role="XML"><xi:include href="extras/so/intakeorder.xmlt" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></programlisting>
- <para>
- Having done that, send some <application>Business Process
- Manager</application> context variables along with the service
- call. In this example, there is a variable named
- <property>entireOrderAsXML</property>, which is to be set in the
- default position on the body of the Enterprise Service Bus
- message. To do this, simply add the following code:
- </para>
+</step>
+<step><para>
+ Having done that, send some <application>Business Process
+ Manager</application> context variables along with the service
+ call. In this example, there is a variable named
+ <property>entireOrderAsXML</property>, which is to be set in the
+ default position on the body of the Enterprise Service Bus
+ message. To do this, simply add the following code:
+</para>
+
<programlisting language="XML" role="XML"><xi:include href="extras/so/setvariable.xmlt" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></programlisting>
-
- <para>
- This will cause the XML-based contents of the
- <property>entireOrderAsXML</property> variable to end up in the
- body of the Enterprise Service Bus message. This, in turn, means
- that the <classname>IntakeService</classname> can now access the
- message and can process it, by letting it flow through each
- action in the <systemitem>Pipeline</systemitem>. When the last
- action is reached, the <property>replyTo</property> property is
- checked and the Enterprise Service Bus message is sent to the
- <classname>JBpmCallBack</classname> service. The latter makes a
- call back into the <application>Business Process
- Manager</application>, signaling the transition from the
- <systemitem>Intake Order</systemitem> node to the next one
- (<systemitem>Review Order</systemitem>.) This time, one will
- want to send some variables from the Enterprise Service Bus
- message to the <application>Business Process
- Manager</application>. Note that entire objects can be sent, as
- long both contexts can load the object's class. In order to
- retain the ability to "map back" to the <application>Business
- Process Manager</application>, add an
- <property>esbToEsbVars</property> element.
- </para>
-
-
-<programlisting language="XML" role="XML"><xi:include href="extras/so/combined.xmlt" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></programlisting>
-
- <para>
- When this service returns, the following variables will be
- stored in the <application>Business Process
- Manager</application> context:
- </para>
-
- <itemizedlist>
- <listitem><para><systemitem>entireOrderAsXML</systemitem>,</para></listitem>
- <listitem><para> <systemitem>entireOrderAsObject</systemitem> and</para></listitem>
- <listitem><para> <systemitem>entireCustomerAsObject</systemitem>. </para></listitem>
-
- </itemizedlist>
- <para>
- In addition, for demonstration purposes, there are also some
- flattened variables:
- </para>
+<para>
+ This will cause the XML-based contents of the
+ <property>entireOrderAsXML</property> variable to end up in the
+ body of the Enterprise Service Bus message. This, in turn, means
+ that the <classname>IntakeService</classname> can now access the
+ message and can process it, by letting it flow through each
+ action in the <systemitem>Pipeline</systemitem>. When the last
+ action is reached, the <property>replyTo</property> property is
+ checked and the Enterprise Service Bus message is sent to the
+ <classname>JBpmCallBack</classname> service. The latter makes a
+ call back into the <application>Business Process
+ Manager</application>, signaling the transition from the
+ <systemitem>Intake Order</systemitem> node to the next one
+ (<systemitem>Review Order</systemitem>.)
- <itemizedlist>
- <listitem><para> <systemitem>order_orderid</systemitem>,</para></listitem>
- <listitem><para> <systemitem>order_totalAmount</systemitem>,</para></listitem>
- <listitem><para> <systemitem>order_priority</systemitem>,</para></listitem>
- <listitem><para> <systemitem>customer_firstName</systemitem>,</para></listitem>
- <listitem><para> <systemitem>customer_lastName</systemitem> and</para></listitem>
- <listitem><para> <systemitem>customer_status</systemitem>.</para></listitem>
-
- </itemizedlist>
+</para>
+</step>
-
- <figure id="The_Order_process">
- <title>The Order Process Has Reached the “Review Order” Node</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/so/order.png" />
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>
- A human will be required to review the order process. Therefore,
- add a <systemitem>Task Node</systemitem> and the task
- <systemitem>Order Review</systemitem>. These need to be
- performed by someone with the <property>actor_id</property>
- <code>user</code>. The XML fragment should look like this:
- </para>
-
-<programlisting language="XML" role="XML"><xi:include href="extras/so/orderprocess.xmlt" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></programlisting>
-
- <para>
- Create an XHTML data-form. Do this so that these variables can
- display in a form in the <guilabel>jbpm-console</guilabel> (see
- the <filename>Review_Order.xhtml</filename> file in the
- <emphasis>bpm_orchestration4</emphasis> Quick Start [JBESB-QS]
- for more information about this.) "Tie" this data-form to the
- <property>TaskNode</property> via the
- <filename>forms.xml</filename> file:
- </para>
-
+<step>
+ <para>
+ This time, one will
+ want to send some variables from the Enterprise Service Bus
+ message to the <application>Business Process
+ Manager</application>. Note that entire objects can be sent, as
+ long both contexts can load the object's class. In order to
+ retain the ability to "map back" to the <application>Business
+ Process Manager</application>, add an
+ <property>esbToEsbVars</property> element.
+ </para>
+
+
+ <programlisting language="XML" role="XML"><xi:include href="extras/so/combined.xmlt" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></programlisting>
+
+ <para>
+ When this service returns, the following variables will be
+ stored in the <application>Business Process
+ Manager</application> context:
+ </para>
+
+ <itemizedlist>
+ <listitem><para><systemitem>entireOrderAsXML</systemitem>,</para></listitem>
+ <listitem><para> <systemitem>entireOrderAsObject</systemitem> and</para></listitem>
+ <listitem><para> <systemitem>entireCustomerAsObject</systemitem>. </para></listitem>
+
+ </itemizedlist>
+
+ <para>
+ In addition, for demonstration purposes, there are also some
+ flattened variables:
+ </para>
+
+ <itemizedlist>
+ <listitem><para> <systemitem>order_orderid</systemitem>,</para></listitem>
+ <listitem><para> <systemitem>order_totalAmount</systemitem>,</para></listitem>
+ <listitem><para> <systemitem>order_priority</systemitem>,</para></listitem>
+ <listitem><para> <systemitem>customer_firstName</systemitem>,</para></listitem>
+ <listitem><para> <systemitem>customer_lastName</systemitem> and</para></listitem>
+ <listitem><para> <systemitem>customer_status</systemitem>.</para></listitem>
+
+ </itemizedlist>
+
+
+ <figure id="The_Order_process">
+ <title>The Order Process Has Reached the “Review Order” Node</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/so/order.png" />
+ </imageobject>
+ </mediaobject>
+ </figure>
+</step>
+<step>
+ <para>
+ A human will be required to review the order process. Therefore,
+ add a <systemitem>Task Node</systemitem> and the task
+ <systemitem>Order Review</systemitem>. These need to be
+ performed by someone with the <property>actor_id</property>
+ <code>user</code>. The XML fragment should look like this:
+ </para>
+
+ <programlisting language="XML" role="XML"><xi:include href="extras/so/orderprocess.xmlt" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></programlisting>
+</step>
+
+<step>
+ <para>
+ Create an XHTML data-form. Do this so that these variables can
+ display in a form in the <guilabel>jbpm-console</guilabel> (see
+ the <filename>Review_Order.xhtml</filename> file in the
+ <emphasis>bpm_orchestration4</emphasis> Quick Start [JBESB-QS]
+ for more information about this.)
+ </para>
+</step>
+<step><para>
+ "Tie" this data-form to the
+ <property>TaskNode</property> via the
+ <filename>forms.xml</filename> file:
+</para>
+
<programlisting language="XML" role="XML"><xi:include href="extras/so/createxhtml.xmlt" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></programlisting>
+</step>
+<step>
+ <para>
+ Note that, in this case, the same form is applied to two task
+ nodes. The variables are referenced in the <guilabel>Review
+ Order</guilabel> form as shown in the following sample code.
+ (This, in turn, references the variables that are set in the
+ <application>Business Process Manager</application> context.)
+ </para>
+
+ <programlisting language="XML" role="XML"><xi:include href="extras/so/revieworderform.xmlt" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></programlisting>
+</step>
- <para>
- Note that, in this case, the same form is applied to two task
- nodes. The variables are referenced in the <guilabel>Review
- Order</guilabel> form as shown in the following sample code.
- (This, in turn, references the variables that are set in the
- <application>Business Process Manager</application> context.)
- </para>
-
-<programlisting language="XML" role="XML"><xi:include href="extras/so/revieworderform.xmlt" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></programlisting>
+<step>
+ <para>
+ When the process reaches the <systemitem>Review
+ Node</systemitem>, (depicted in <xref
+ linkend="The_Order_process" />), the user can log into the
+ <guilabel>jbpm-console</guilabel> and click on "Tasks” to see a
+ list of items, (as shown in <xref linkend="task_list_for_user"
+ />.)
+ </para>
+</step>
+<step><para>
+ He or she can examine the task by clicking on it. A form
+ will appear, (as seen in <xref
+ linkend="The_Order_Review_form"/>.)
+</para>
+</step>
+<step><para>
+ He or she can then update
+ some of the values and conclude by clicking <guibutton>Save and
+ Close</guibutton>, at which point the process will move on to
+ the next node.
+</para>
- <para>
- When the process reaches the <systemitem>Review
- Node</systemitem>, (depicted in <xref
- linkend="The_Order_process" />), the user can log into the
- <guilabel>jbpm-console</guilabel> and click on "Tasks” to see a
- list of items, (as shown in <xref linkend="task_list_for_user"
- />.) He or she can examine the task by clicking on it. A form
- will appear, (as seen in <xref
- linkend="The_Order_Review_form"/>.) He or she can then update
- some of the values and conclude by clicking <guibutton>Save and
- Close</guibutton>, at which point the process will move on to
- the next node.
- </para>
-
- <figure id="task_list_for_user">
- <title>The Task List for User "User"</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/so/task_list_for_user.png" />
- </imageobject>
- </mediaobject>
- </figure>
-
- <figure id="The_Order_Review_form">
- <title>The "Order Review" form</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/so/orderreview.png" />
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>
- The next one is the <systemitem>Calculate Discount</systemitem>
- node. This is, once again, an ESB service node, the
- configuration file for which looks like this:
- </para>
-
-<programlisting language="XML" role="XML"><xi:include href="extras/so/calculatediscount.xmlt" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></programlisting>
-
- <para>
- The service receives both the <classname>customer</classname>
- and the <classname>orderHeader</classname> objects, as well as
- the <classname>entireOrderAsXML</classname> data. It then
- computes a discount. The response maps the
- <classname>body.order_orderDiscount</classname> value onto a
- <application>Business Process Manager</application> context
- variable called <property>order_-discount</property>. The
- process is then signaled, which tells it to move to the
- <systemitem>Review Discount</systemitem> node:
- </para>
-
- <figure id="The_Discount_Review_form">
- <title>The "Discount Review" Form</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/so/The_Discount_Review_form.png" />
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>
- Here, the user is asked to review the discount, which is set to
- a value of 8.5 (see <xref linkend="The_Discount_Review_form"
- />.) When he or she clicks <guibutton>Save and
- Close</guibutton>, the process moves to the <systemitem>Ship
- It</systemitem> node, which is, once again, an ESB service. To
- circumvent the Order process before the <systemitem>Ship
- It</systemitem> service completes, use the
- <classname>EsbNotifier</classname> action handler by attaching
- it to the outgoing transition:
- </para>
-
-<programlisting language="XML" role="XML"><xi:include href="extras/so/shipit.xmlt" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></programlisting>
+<figure id="task_list_for_user">
+ <title>The Task List for User "User"</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/so/task_list_for_user.png" />
+ </imageobject>
+ </mediaobject>
+</figure>
- <para>
- After notifying the <classname>ShippingService</classname>, the
- order process moves to the "end" state and terminates. (The
- <classname>ShippingService</classname> itself may still be
- finishing.) <application>JBoss Rules</application> is used in
- the <filename>bpm_orchestration4</filename> file to determine
- whether this order should be shipped via the "normal" or
- "express" method.
- </para>
-
- </section>
+<figure id="The_Order_Review_form">
+ <title>The "Order Review" form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/so/orderreview.png" />
+ </imageobject>
+ </mediaobject>
+</figure>
+</step>
+<step>
+ <para>
+ The next one is the <systemitem>Calculate Discount</systemitem>
+ node. This is, once again, an ESB service node, the
+ configuration file for which looks like this:
+ </para>
+
+ <programlisting language="XML" role="XML"><xi:include href="extras/so/calculatediscount.xmlt" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></programlisting>
+
+ <para>
+ The service receives both the <classname>customer</classname>
+ and the <classname>orderHeader</classname> objects, as well as
+ the <classname>entireOrderAsXML</classname> data. It then
+ computes a discount. The response maps the
+ <classname>body.order_orderDiscount</classname> value onto a
+ <application>Business Process Manager</application> context
+ variable called <property>order_-discount</property>. The
+ process is then signaled, which tells it to move to the
+ <systemitem>Review Discount</systemitem> node:
+ </para>
+
+ <figure id="The_Discount_Review_form">
+ <title>The "Discount Review" Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/so/The_Discount_Review_form.png" />
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+</step>
+
+
+<step>
+ <para>
+ Review the discount, which is set to
+ a value of 8.5 (see <xref linkend="The_Discount_Review_form"
+ />.) Click on <guibutton>Save and
+ Close</guibutton>, and the process moves to the <systemitem>Ship
+ It</systemitem> node, which is, once again, an ESB service. To
+ circumvent the Order process before the <systemitem>Ship
+ It</systemitem> service completes, use the
+ <classname>EsbNotifier</classname> action handler by attaching
+ it to the outgoing transition:
+ </para>
+
+ <programlisting language="XML" role="XML"><xi:include href="extras/so/shipit.xmlt" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></programlisting>
+
+ <para>
+ After notifying the <classname>ShippingService</classname>, the
+ order process moves to the "end" state and terminates. (The
+ <classname>ShippingService</classname> itself may still be
+ finishing.) <application>JBoss Rules</application> is used in
+ the <filename>bpm_orchestration4</filename> file to determine
+ whether this order should be shipped via the "normal" or
+ "express" method.
+ </para>
+</step>
+
+ </procedure>
+
+ </section>
+
+
+
<section>
<title>
@@ -457,15 +526,28 @@
of the process definition was running. This was in order to
explain the process flow. However, now that the
<filename>processdefinition.xml</filename> file has been
- created, it can be deployed to the <application>Business Process
- Manager</application>, by using any one of the following: the
- integrated development environment, <application>ant</application> or the
- <guilabel>jbpm-console</guilabel>. (The integrated development
- environment will be used in the following example.)
- </para>
-
+ created, deploy it to the <application>Business Process
+ Manager</application>, using any of the following:
+ </para>
+<itemizedlist>
+ <listitem>
+<para>
+ the integrated development environment (used in the following
+ example)
+</para>
+ </listitem>
+<listitem>
+<para>
+ant
+</para>
+</listitem>
+<listitem>
+<para>
+or the <guilabel>jbpm-console</guilabel>.
+</para>
+</listitem>
+</itemizedlist>
-
<para>
The following files will be deployed:
</para>
@@ -504,32 +586,42 @@
archives to deploy classes.
</para>
</warning>
-
- <para>
- Create a new process instance once the process definition is
+
+
+ <procedure>
+ <title>Instantiating a Deployment</title>
+ <step>
+ <para>Create a new process instance once the process definition is
deployed. (Note that
<command>StartProcessInstanceCommand</command> can be used. The
allows one to create a process instance with some pre-set
initial values.) Study this code sample:
- </para>
+ </para>
<programlisting language="XML" role="XML"><xi:include href="extras/so/procdef.xmlt" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></programlisting>
- <para>
- The new process instance is now invoked and using a script. The
- jBPM key is set to the value of
- <property>OrderId</property> from an incoming order
- XML file. This same XML is
- subsequently put into a <application>Business Process
- Manager</application> context, through use of the
- the <classname>esbToBpmVars</classname> mapping. In the
- <filename>bpm_orchestration4</filename> Quick Start, the
- XML came from the <literal>Seam DVD
- Store</literal> and the <filename>SampleOrder.xml</filename>
- looks like this:
- </para>
+ <para>
+ The new process instance is now invoked and using a script. The
+ jBPM key is set to the value of
+ <property>OrderId</property> from an incoming order
+ XML file. This same XML is
+ subsequently put into a <application>Business Process
+ Manager</application> context, through use of the
+ the <classname>esbToBpmVars</classname> mapping. In the
+ <filename>bpm_orchestration4</filename> Quick Start, the
+ XML came from the <literal>Seam DVD
+ Store</literal> and the <filename>SampleOrder.xml</filename>
+ looks like this:
+ </para>
-<programlisting language="XML" role="XML"><xi:include href="extras/so/sampleorder.xmlt" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></programlisting>
+ <programlisting language="XML" role="XML"><xi:include href="extras/so/sampleorder.xmlt" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></programlisting>
+
+
+ </step>
+ </procedure>
+
+
+
<note>
<para>
More information about the jboss-svn-commits
mailing list