2c2
<   <title>Process Modelling</title>
---
>   <title>Process Modeling</title>
10c10
<     behaviour.  A process definition has exactly one start state.</para>
---
>     behavior.  A process definition has exactly one start state.</para>
29c29
<     behaviour for the continuation of the graph execution.  A node that does not propagate 
---
>     behavior for the continuation of the graph execution.  A node that does not propagate 
52c52
<       <mediaobject><imageobject><imagedata align="center" fileref="images/auction.process.graph.gif"/></imageobject></mediaobject>
---
>       <mediaobject><imageobject><imagedata  fileref="images/auction.process.graph.png"/></imageobject></mediaobject>
56c56
< <programlisting>&lt;process-definition&gt;
---
> <programlisting language="xml">&lt;process-definition&gt;
100c100
<     graph and its executional model, refer to <xref linkend="graphorientedprogramming" />.
---
>     graph and its execution model, refer to <xref linkend="graphorientedprogramming" />.
103c103
<     an execution arrives in the node at runtime.  jBPM has a set of preimplemented node types 
---
>     an execution arrives in the node at runtime.  jBPM has a set of   node types 
105c105
<     node behaviour.</para>
---
>     node behavior.</para>
115,117c115,117
<         <listitem><emphasis role="bold">1. not propagate the execution.</emphasis>  In that 
<         case the node behaves as a wait state.</listitem>
<         <listitem><emphasis role="bold">2. propagate the execution over one of the leaving 
---
>         <listitem><para><emphasis role="bold">1. not propagate the execution.</emphasis>  In that 
>         case the node behaves as a wait state.</para></listitem>
>         <listitem><para><emphasis role="bold">2. propagate the execution over one of the leaving 
122,123c122,123
<         automatically without waiting.</listitem>
<         <listitem><emphasis role="bold">3. create new paths of execution.</emphasis> A node can
---
>         automatically without waiting.</para></listitem>
>         <listitem><para><emphasis role="bold">3. create new paths of execution.</emphasis> A node can
126,127c126,127
<         this kind of behaviour is the fork node.</listitem>
<         <listitem><emphasis role="bold">4. end paths of execution.</emphasis> A node can decide
---
>         this kind of behavior is the fork node.</para></listitem>
>         <listitem><para><emphasis role="bold">4. end paths of execution.</emphasis> A node can decide
129,130c129,130
<         is finished.</listitem>
<         <listitem><emphasis role="bold">5. more general, a node can modify the whole runtime 
---
>         is finished.</para></listitem>
>         <listitem><para><emphasis role="bold">5. more general, a node can modify the whole runtime 
134c134
<         transitions.</listitem>
---
>         transitions.</para></listitem>
136,139c136,139
<       <para>jBPM contains --as any workflow and BPM engine-- a set of preimplemented node types
<       that have a specific documented configuration and behaviour.  But the unique thing about 
<       jBPM and the <link linkend="graphorientedprogramming">Graph Oriented Programming foundation</link>
<       is that we open up the model for developers.  Developers can write their own node behaviour
---
>       <para>jBPM contains --as any workflow and BPM engine-- a set of pre-implemented node types
>       that have a specific documented configuration and behavior.  But the unique thing about 
>       jBPM and the Graph Oriented Programming foundation<footnote><para><xref linkend="graphorientedprogramming"/>.</para></footnote>
>       is that we open up the model for developers.  Developers can write their own node behavior
144c144
<       Their process language is closed and the executional model is hidden in the runtime 
---
>       Their process language is closed and the execution model is hidden in the runtime 
146c146
<       has shown that any process language is not powerfull enough.  We have decided for a simple 
---
>       has shown that any process language is not powerful enough.  We have decided for a simple 
164c164
<       no task instances will be created in any task list.  This can be usefull if the process 
---
>       no task instances will be created in any task list.  This can be useful if the process 
182c182
<       the order as specified in the xml.  The first transition for which the conditions resolves to 
---
>       the order as specified in the xml.  The first transition for which the condition resolves to 
188c188
<       <para>Next aproach is the 'handler' element on the decision, that element can be used to specify
---
>       <para>Next approach is the 'handler' element on the decision, that element can be used to specify
202c202
<       default fork behaviour is to create a child token for each transition that leaves the fork,
---
>       default fork behavior is to create a child token for each transition that leaves the fork,
218c218
<       The nodetype node expects one subelement action.  The action is executed when the execution
---
>       The nodetype node expects one sub-element action.  The action is executed when the execution
220c220
<       it is also <link linkend="noderesponsibilities">responsible for propagating the execution</link>.
---
>       it is also responsible for propagating the execution<footnote><para><xref linkend="noderesponsibilities"/>.</para></footnote>.
238c238
<       of the transition name.  If more then one transition has the same name, the first transition with 
---
>       of the transition name.  If more than one transition has the same name, the first transition with 
262,263c262,263
<     <link linkend="nodetypenode">node</link> has the <link linkend="noderesponsibilities">responsibility 
<     of propagating the execution</link>.</para>
---
>     node<footnote><para><xref linkend="nodetypenode"/>.</para></footnote> has the responsibility 
>     of propagating the execution<footnote><para><xref linkend="noderesponsibilities"/>.</para></footnote>.</para>
271c271
<       <mediaobject><imageobject><imagedata align="center" fileref="images/database.update.example.gif"/></imageobject></mediaobject>
---
>       <mediaobject><imageobject><imagedata  fileref="images/database.update.example.png"/></imageobject></mediaobject>
274c274
<     <programlisting>public class RemoveEmployeeUpdate implements ActionHandler {
---
>     <programlisting language="java">public class RemoveEmployeeUpdate implements ActionHandler {
289,291c289
< <programlisting>&lt;process-definition name="yearly evaluation"&gt;
< 
<   ...
---
> <programlisting language="xml">&lt;process-definition name="yearly evaluation"&gt;
299d296
<   ...
324c321
<       will fire events during graph execution.  This occurs when jbpm calculats the 
---
>       will fire events during graph execution.  This occurs when jbpm calculates the 
352,356c349,353
<         <listitem>executionContext</listitem>
<         <listitem>token</listitem>
<         <listitem>node</listitem>
<         <listitem>task</listitem>
<         <listitem>taskInstance</listitem>
---
>         <listitem><para>executionContext</para></listitem>
>         <listitem><para>token</para></listitem>
>         <listitem><para>node</para></listitem>
>         <listitem><para>task</para></listitem>
>         <listitem><para>taskInstance</para></listitem>
359c356
< <programlisting>&lt;process-definition&gt;
---
> <programlisting language="xml">&lt;process-definition&gt;
368c365
<       <para>To customize the default behaviour of loading and storing variables into the script, the 
---
>       <para>To customize the default behavior of loading and storing variables into the script, the 
370c367
<       the script expression also has to be put in a subelement of script: <literal>expression</literal>.  
---
>       the script expression also has to be put in a sub-element of script: <literal>expression</literal>.  
373c370
< <programlisting>&lt;process-definition&gt;
---
> <programlisting language="xml">&lt;process-definition&gt;
426c423
<     time.  This can be convenient to check wether a process execution is e.g. in the start-up phase.
---
>     time.  This can be convenient to check whether a process execution is e.g. in the start-up phase.
455c452
<       Both the process definintion and the superstate are node collections.  To refer to nodes in 
---
>       Both the process definition and the superstate are node collections.  To refer to nodes in 
460,461c457
<       <programlisting>&lt;process-definition&gt;
<   ...
---
>       <programlisting language="xml">&lt;process-definition&gt;
468d463
<   ...
473,474c468
<       <programlisting>&lt;process-definition&gt;
<   ...
---
>       <programlisting language="xml">&lt;process-definition&gt;
483d476
<   ...
500c493
<     element parent hierarchy is serached for an appropriate <literal>exception-handler</literal>.
---
>     element parent hierarchy is searched for an appropriate <literal>exception-handler</literal>.
520c513
<   <section id="processcomposition">
---
>   <section id="modelling_processcomposition">
526c519
<     path of execution of the super process will wait till the sub process instance has ended.
---
>     path of execution of the super process will wait until the sub process instance has ended.
531c524
<     <programlisting>&lt;process-definition name=&quot;hire&quot;&gt;
---
>     <programlisting language="xml">&lt;process-definition name=&quot;hire&quot;&gt;
561c554
<     <para>In general, When a subprocess is started, all <literal>variable</literal>s with 
---
>     <para>In general, When a sub-process is started, all <literal>variable</literal>s with 
571c564
<     <title>Custom node behaviour</title>
---
>     <title>Custom node behavior</title>
575c568
<     at an example that will update an ERP-system.  We'll read an amout from the ERP-system, add 
---
>     at an example that will update an ERP-system.  We'll read an amount from the ERP-system, add 
583c576
<       <mediaobject><imageobject><imagedata align="center" fileref="images/update.erp.example.gif"/></imageobject></mediaobject>
---
>       <mediaobject><imageobject><imagedata  fileref="images/update.erp.example.png"/></imageobject></mediaobject>
586c579
<     <programlisting>public class AmountUpdate implements ActionHandler {
---
>     <programlisting language="java">public class AmountUpdate implements ActionHandler {
605c598
<     Join node implementation in the jbpm source code :-).</para>
---
>     Join node implementation in the jbpm source code.</para>
617c610
<     we use hibernate's second level cache to avoid loading of definition information 
---
>     we use Hibernate's second level cache to avoid loading of definition information 
629c622
<     in the process graph.  During waitstates, the tokens can be persisted 
---
>     in the process graph.  During wait states, the tokens can be persisted 
637c630
<       <mediaobject><imageobject><imagedata align="center" fileref="images/graph.execution.gif"/></imageobject></mediaobject>
---
>       <mediaobject><imageobject><imagedata  fileref="images/graph.execution.png"/></imageobject></mediaobject>
653c646
<     has its own behaviour that is implementated in the execute method.  Each node 
---
>     has its own behaviour that is implemented in the execute method.  Each node 
658,662c651,655
<       <listitem>Token.signal(Transition)</listitem>
<       <listitem>--> Node.leave(ExecutionContext,Transition)</listitem>
<       <listitem>--> Transition.take(ExecutionContext)</listitem>
<       <listitem>--> Node.enter(ExecutionContext)</listitem>
<       <listitem>--> Node.execute(ExecutionContext)</listitem>
---
>       <listitem><para>Token.signal(Transition)</para></listitem>
>       <listitem><para>--> Node.leave(ExecutionContext,Transition)</para></listitem>
>       <listitem><para>--> Transition.take(ExecutionContext)</para></listitem>
>       <listitem><para>--> Node.enter(ExecutionContext)</para></listitem>
>       <listitem><para>--> Node.execute(ExecutionContext)</para></listitem>
683c676
<     <para>The jPDL feature that we describe here from a modelling perspective is 
---
>     <para>The jPDL feature that we describe here from a modeling perspective is 
690c683
<     <para>In some scenarios where in-process calculations take a lot of time, this behaviour 
---
>     <para>In some scenarios where in-process calculations take a lot of time, this behavior 
698c691
<     sent over the asynschronous messaging system and the thread is returned to the client 
---
>     sent over the asynchronous messaging system and the thread is returned to the client 
717c710
<     <para>As a process modeller, you should not really be concerned with all this asynchronous 
---
>     <para>As a process modeler, you should not really be concerned with all this asynchronous 
725,726c718
<     <programlisting>...
< &lt;start-state&gt;
---
>     <programlisting language="xml">&lt;start-state&gt;
746c738
<     <programlisting>...start a transaction...
---
>     <programlisting language="java">//start a transaction
