Author: jbarrez
Date: 2009-12-22 14:31:50 -0500 (Tue, 22 Dec 2009)
New Revision: 6025
Modified:
jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch03-Bpmn2.xml
Log:
Went over the BPMN 2.0 documentation and changed text where deemed necessary
Modified: jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch03-Bpmn2.xml
===================================================================
--- jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch03-Bpmn2.xml 2009-12-22
18:05:27 UTC (rev 6024)
+++ jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch03-Bpmn2.xml 2009-12-22
19:31:50 UTC (rev 6025)
@@ -8,12 +8,12 @@
<title>What is BPMN 2.0?</title>
<para>
- The Business Process Modeling Notation (BPMN) is a standard for a
- graphical notation of business processes models. The standard is
- maitained by the Object Management Group (OMG)
+ The Business Process Modeling Notation (BPMN) is a standard for the
+ graphical notation of business process models. The standard is
+ maitained by the Object Management Group (OMG).
</para>
<para>
- Basically, the BPMN spec defines how a task must look like, which constructs can
+ Basically, the BPMN specification defines how a task must look like, which constructs
can
be connected to each other, etc. in a meaning that cannot be
misinterpreted.
</para>
@@ -27,14 +27,14 @@
symbols.
</para>
<para>
- Version 2.0 of the BPMN specification, which is currently in beta phase and is
- scheduled to be finalized in June 2010, allows to add precise technical
+ Version 2.0 of the BPMN specification, which is currently in finalization phase and
is
+ scheduled to be finished soon, allows to add precise technical
details to the shapes and symbols available in BPMN and at the same
time specify what the execution semantics of BPMN 'elements' are. By
using an XML language to specify the executable semantics of a business
process, the BPMN specification has evolved into a language for
business processes that can be executed on any BPMN2 compliant process
- engine - while still having the powerful graphical notations.
+ engine - while still having the powerful graphical notation.
</para>
</section>
@@ -50,8 +50,8 @@
incorporate parts of the BPMN2 spec would be jBPM 4.3.
</para>
<para>
- The goal of this effort is to build a native BPMN2 runtime engine (or
- better said implementing 'BPMN2 exectuable') leveraging the Process
+ The goal of this effort is to build a <emphasis role="bold">native
BPMN2 runtime engine </emphasis>
+ (or better said implementing 'BPMN2 exectuable') leveraging the Process
Virtual Machine (PVM).
Do note that the primary focus of this release is native executability,
not the graphical notation - but we recognize its importance for
@@ -60,11 +60,10 @@
<para>
<emphasis role="bold">
- One of the goals of the BPMN2 implementation is to have an experience and usage
which
- is comparable to the that of JPDL. User who are already familiar with jBPM will
find that
+ Users who are already familiar with jBPM will find that
<itemizedlist>
<listitem>the configuration mechanism remains unchanged</listitem>
- <listitem>the API is the same of very similar to the existing
one</listitem>
+ <listitem>the API is the same or very similar to the existing
one</listitem>
<listitem>testing BPMN2 process still can be done with regular Java testing
frameworks</listitem>
<listitem>the database schema remains unchanged</listitem>
</itemizedlist>
@@ -81,7 +80,7 @@
<para>
One of the first questions that might, rightfully, come to mind is why
- BPMN2 is being implemented while there is jPDL. Both are languages that
+ BPMN2 is being implemented while there is jPDL. Both are languages
have as goal to define executable business processes. From a high-level
technical point of view, both languages are equivalent. The main
distinction is that BPMN2 is as vendor-neutral as you can have with
@@ -106,7 +105,7 @@
<listitem>BPMN2 is implementation-unaware. The downside of this is that
integrating with Java technology will always be easier with JPDL. So,
from a Java developer's perspective JPDL is simpler and feels more
- natural (some of the 'layers' of BPEL/WSDL are in BPMN as
well)</listitem>
+ natural (some of the 'layers' of BPEL/WSDL are in BPMN as
well).</listitem>
<listitem>A focus of JPDL is XML readability. BPMN2 processes will still
be
readable to a certain level, but tooling or a more detailed knowledge
of the spec will definitely be required to achieve the same level of
@@ -116,7 +115,7 @@
the language itself overly complicated.</listitem>
<listitem>BPMN2 contains a large set of constructs described in the
specification. However, the "binding" of interfaces to code is left
- open in the spec (comparable with XPDL), even is WDSL is considered the
+ open in the spec (comparable with XPDL), even if WDSL is often considered the
default. This means that a process portability can be lost when porting
the process to an engine that doesn't support the same binding
mechanism. Calling Java classes for example is already going to be such
@@ -161,7 +160,7 @@
model simple business processes.</listitem>
<listitem><emphasis role="bold">Advanced</emphasis>:
contains more powerful or
expressive constructs, but this comes with higher modeling and execution
semantics
- learning curve. 80% of the business processes are implementable with constructs
from this
+ learning curve. The majority of business processes are implementable with
constructs from this
and the previous category.</listitem>
<listitem><emphasis role="bold">Complex</emphasis>:
constructs in this category are
used in specific and/or rare cases, or their semantics are difficult to
understand.</listitem>
@@ -220,7 +219,7 @@
The root of an BPMN 2.0 XML process is the <emphasis
role="bold">definitions</emphasis>
elements. As the name states, the subelements will contain the actual definitions
of
the business process(es). Every <emphasis
role="bold">process</emphasis> child
- will be able to have an <emphasis role="bold">id</emphasis>
+ will be able to have an <emphasis role="bold">id</emphasis>
and
<emphasis role="bold">name</emphasis>. An empty business
process in BPMN 2.0
looks as follows. Also note that it is handy to have the BPMN2.xsd on the
classpath, to
enable XML completion.
@@ -233,7 +232,12 @@
expressionLanguage="http://www.w3.org/1999/XPath"
targetNamespace="http://jbpm.org/example/bpmn2">
- <process id="myBusinessProcess" name="My business
processs">
+ <process id="myBusinessProcess" name="My business
processs">
+
+ ...
+
+ </process>
+<definitions>
</programlisting>
If an id is defined for a process element, it will be used as business key for
that
process (ie. starting a process can be done by calling
executionService.startProcessInstanceByKey("myBusinessProcess"),
@@ -253,9 +257,9 @@
<para>
Together with activitites and gateways, events are used in practically every
business process.
Events allow process modelers to describe business processes in a very natural
way, such as
- <emphasis role="italic">'This process starts when I receive a
customer order'</emphasis>,
- <emphasis role="italic">'If the task is not finished in 2
days, terminate the process'</emphasis>
- or <emphasis role="italic">'When I receive a cancel e-mail
when the process is running,
+ <emphasis>'This process starts when I receive a customer
order'</emphasis>,
+ <emphasis>'If the task is not finished in 2 days, terminate the
process'</emphasis>
+ or <emphasis>'When I receive a cancel e-mail when the process is
running,
handle the e-mail using this sub-process'</emphasis>. Notice that
typical businesses
always work in a very event-driven way. People are not hard-coded sequential
creatures,
but they tend to react on things that happen in their environment (ie. events).
@@ -324,16 +328,16 @@
<para>
The corresponding executable XML for this process looks like this (omitting the
- <emphasis role="italic">definitions</emphasis> root
element for clarity)
+ <emphasis>definitions</emphasis> root element for clarity)
<programlisting>
<process id="noneStartEndEvent" name="BPMN2 Example
none start and end event">
- <startEvent id="start" />
+ <emphasis role="bold"><startEvent id="start"
/></emphasis>
<sequenceFlow id="flow1"
name="fromStartToEnd"
sourceRef="start" targetRef="end" />
- <endEvent id="end" name="End" />
+ <emphasis role="bold"><endEvent id="end"
name="End" /></emphasis>
</process>
</programlisting>
@@ -365,16 +369,16 @@
A terminate end event is defined as follows. An id is required, a name is
optional.
<programlisting>
<endEvent id="terminateEnd"
name="myTerminateEnd">
- <terminateEventDefinition/>
+ <emphasis
role="bold"><terminateEventDefinition/></emphasis>
</endEvent>
</programlisting>
</para>
<para>
- A terminate end event is depicted as a typical end event (circle with thick
border),
+ A terminate end event is depicted as an end event (circle with thick border),
with a full circle as icon inside. In the following example, completing the
'task1'
will end the process instance, while completing the 'task2' will only
end the path
- of execution which enters the end event.
+ of execution which enters the end event, leaving the task1 open.
<mediaobject><imageobject><imagedata align="center"
fileref="images/bpmn2.terminate.end.event.example.png"/></imageobject></mediaobject>
See the examples shipped with the jBPM distribution for the unit test and XML
counterpart
of this business process.
@@ -417,23 +421,22 @@
${}</emphasis>.
<programlisting>
<sequenceFlow id=....>
- <conditionExpression xsi:type="tFormalExpression">${amount
>= 500} />
+ <emphasis role="bold"><conditionExpression
xsi:type="tFormalExpression">${amount >= 500}
/></emphasis>
</sequenceFlow>
</programlisting>
Note that is currently is necessary to add the <emphasis
role="bold">
xsi:type="tFormalExpression"</emphasis> to the
<emphasis role="bold">
- conditionExpression</emphasis>. This is not 100% BPMN specification
compliant, but we'll
- work this out in a next release.
+ conditionExpression</emphasis>. This can change in a future release.
</para>
<para>
Activities (such as the user task) and gateways (such as the exclusive gateway)
can have a
default sequence flow. This default sequence flow is taken only when all the
other outgoing
sequence flow from an activity or gateway have a condition that evaluate to
false. A
- default sequence flow is graphically visualized as a sequence flow with a
'slash marker".
+ default sequence flow is graphically visualized as a sequence flow with a
'slash marker'.
<mediaobject><imageobject><imagedata align="center"
fileref="images/bpmn2.default.sequence.flow.png"/></imageobject></mediaobject>
The default sequence flow is specified by filling in the <emphasis
role="bold">'default'
- </emphasis> attribute of the activity or gateway.
+ attribute </emphasis> of the activity or gateway.
</para>
<para>
@@ -448,7 +451,7 @@
<para>
A gateway in BPMN is used to control the flow through the process. More
specifically,
- when a token (the BPMN 2.0 conceptual notion of an execution) arrives in a
gateway, they can be merged
+ when a token (the BPMN 2.0 conceptual notion of an execution) arrives in a
gateway, it can be merged
or split depending on the gateway type.
</para>
@@ -488,7 +491,7 @@
know which type of behaviour a certain gateway has (for example for a parallel
gateway if
we have joining of forking behaviour). However, the 'gatewayDirection'
attribute is used at parsing
time as a constraint check for the incoming/outgoing sequence flow. So using this
- attirbute will lower the chance on errors in reference for sequence flow, but is
not
+ attribute will lower the chance on errors when referencing sequence flow, but is
not
required.
</para>
@@ -506,7 +509,7 @@
<para>
The corresponding JPDL construct with the same semantics is the
- <emphasis role="bold"><decision></emphasis>
activity. The full technical name of the
+ <emphasis role="bold">decision</emphasis> activity. The
full technical name of the
exclusive gateway is the <emphasis role="bold">'exclusive
data-based gateway'</emphasis>,
but it is also often called the <emphasis role="bold">XOR
Gateway</emphasis>.
The XOR gateway is depicted as a diamond with a 'X' icon inside. An empty
diamond
@@ -531,21 +534,27 @@
<sequenceFlow id="flow1"
name="fromStartToExclusiveGateway"
sourceRef="start"
targetRef="decideBasedOnAmountGateway" />
- <exclusiveGateway id="decideBasedOnAmountGateway"
name="decideBasedOnAmount" />
+ <emphasis role="bold"><exclusiveGateway
id="decideBasedOnAmountGateway"
name="decideBasedOnAmount" /></emphasis>
<sequenceFlow id="flow2"
name="fromGatewayToEndNotEnough"
sourceRef="decideBasedOnAmountGateway"
targetRef="endNotEnough">
- <conditionExpression
xsi:type="tFormalExpression">${amount <
100}</conditionExpression>
+ <emphasis role="bold"><conditionExpression
xsi:type="tFormalExpression">
+ ${amount < 100}
+ </conditionExpression></emphasis>
</sequenceFlow>
<sequenceFlow id="flow3"
name="fromGatewayToEnEnough"
sourceRef="decideBasedOnAmountGateway"
targetRef="endEnough">
- <conditionExpression
xsi:type="tFormalExpression">${amount <= 500
&& amount >= 100}</conditionExpression>
+ <emphasis role="bold"><conditionExpression
xsi:type="tFormalExpression">
+ ${amount <= 500 && amount >= 100}
+ </conditionExpression></emphasis>
</sequenceFlow>
<sequenceFlow id="flow4"
name="fromGatewayToMoreThanEnough"
sourceRef="decideBasedOnAmountGateway"
targetRef="endMoreThanEnough">
- <conditionExpression
xsi:type="tFormalExpression">${amount >
500}</conditionExpression>
+ <emphasis role="bold"><conditionExpression
xsi:type="tFormalExpression">
+ ${amount > 500}
+ </conditionExpression></emphasis>
</sequenceFlow>
<endEvent id="endNotEnough" name="not
enough" />
@@ -556,7 +565,7 @@
</process>
</programlisting>
- This process needs a variable such that the expression can be evauluated at
runtime.
+ This process needs a variable such that the expression can be evaluated at
runtime.
Variables can be provided when starting the process instance (similar to JPDL):
<programlisting>
Map<String, Object> vars = new HashMap<String, Object>();
@@ -567,13 +576,12 @@
<para>
The exclusive gateway requires that all outgoing sequence flow have conditions
defined
- on them. An exception to this rule is the default sequence flow, as defined
above.
- The exclusive gateway also has a shortcut attribute to define such a default
sequence flow.
+ on them. An exception to this rule is the default sequence flow.
Use the <emphasis role="bold">default attribute</emphasis>
to reference an existing
<emphasis role="bold">id of a sequence flow</emphasis>.
This sequence flow will be taken
when the conditions on the other outgoing sequence flow all evaluate to false.
<programlisting>
-<exclusiveGateway id="decision"
name="decideBasedOnAmountAndBankType"
default="myFlow"/>
+<exclusiveGateway id="decision"
name="decideBasedOnAmountAndBankType" <emphasis
role="bold">default="myFlow"</emphasis>/>
<sequenceFlow id="myFlow"
name="fromGatewayToStandard"
sourceRef="decision"
targetRef="standard">
@@ -614,7 +622,7 @@
</para>
<para>
- The following diagrom shows how a parallel gateway can be used. After process
start,
+ The following diagram shows how a parallel gateway can be used. After process
start,
both the 'prepare shipment' and 'bill customer' user tasks will
be active.
The parallel gateway is depicted as a diamond shape with a plus icon inside, both
for the
splitting and joining behaviour.
@@ -629,8 +637,8 @@
sourceRef="Start"
targetRef="parallelGatewaySplit" />
- <parallelGateway id="parallelGatewaySplit"
name="Split"
- gatewayDirection="diverging"/>
+ <emphasis role="bold"><parallelGateway
id="parallelGatewaySplit" name="Split"
+ gatewayDirection="diverging"/></emphasis>
<sequenceFlow id="flow2a" name="Leg 1"
sourceRef="parallelGatewaySplit"
@@ -654,8 +662,8 @@
sourceRef="billCustomer"
targetRef="parallelGatewayJoin" />
- <parallelGateway id="parallelGatewayJoin"
name="Join"
- gatewayDirection="converging"/>
+ <emphasis role="bold"><parallelGateway
id="parallelGatewayJoin" name="Join"
+ gatewayDirection="converging"/></emphasis>
<sequenceFlow id="flow4"
sourceRef="parallelGatewayJoin"
@@ -675,8 +683,7 @@
<title>Tasks</title>
<para>
- A BPMN task is a so-called 'atomic' activity, meaning that it cannot be
broken into
- more detailed constructs. A task represents work that needs to be done by an
external
+ A task represents work that needs to be done by an external
entity, such as a human actor or an automated service.
</para>
@@ -686,7 +693,7 @@
type of work. When the process engine encounters a task in JPDL, it will create a
task in some human
actor's task list and it will behave as a wait state. In BPMN 2.0 however,
there are several
task types, some indicating a wait state (eg. the <emphasis
role="bold">User Task</emphasis>
- and some indicating an automatic activity (eg. the <emphasis
role="bold">Service Task</emphasis>.
+ and some indicating an automatic activity (eg. the <emphasis
role="bold">Service Task</emphasis>).
So take good care not to confuse the meaning of the task concept when switching
languages.
</para>
@@ -713,10 +720,11 @@
<para>
Defining a service task requires quite a few lines of XML (the BPEL influence is
certainly
- visible). Of course, in the near future, we expect that tooling will simplify
this area
+ visible here). Of course, in the near future, we expect that tooling will
simplify this area
a lot. A service task is defined as follows:
<programlisting>
-<serviceTask id="MyServiceTask" name="My service
task" implementation="Other"
operationRef="myOperation" />
+<serviceTask id="MyServiceTask" name="My service
task"
+ implementation="Other" operationRef="myOperation"
/>
</programlisting>
The service task has a required <emphasis
role="bold">id</emphasis> and an optional
<emphasis role="bold">name</emphasis>. The <emphasis
role="bold">implementation</emphasis>
@@ -729,7 +737,7 @@
The service task will invoke a certain operation that is referenced by the
<emphasis role="bold">operationRef</emphasis> attribute
using the id of an
<emphasis role="bold">operation</emphasis>. Such an
operation is part of an
- <emphasis role="bold">interface</emphasis> as shown below.
Every operations has
+ <emphasis role="bold">interface</emphasis> as shown below.
Every operation has
at least one <emphasis role="bold">input message</emphasis>
and at most one
<emphasis role="bold">output message</emphasis>.
<programlisting>
@@ -747,7 +755,7 @@
that must be called. The input/output message that represent the
parameters/return value of
the Java method are defined as follows:
<programlisting>
-<message id="inputMessag" name="input message"
structureRef="myItemDefinition1" />
+<message id="inputMessage" name="input
message" structureRef="myItemDefinition1" />
</programlisting>
Several elements in BPMN are so-called 'item-aware', including this
message construct.
This means that they are involved in storing or reading items during process
execution.
@@ -768,7 +776,7 @@
</itemDefinition>
</programlisting>
- Do note that this is not standard BPMN 2.0 as by the specification (hence the
'jbpm' prefix).
+ Do note that this is not fully standard BPMN 2.0 as by the specification (hence
the 'jbpm' prefix).
In fact, according to the specification, the ItemDefinition shouldn't contain
more
than a data structure definition. The actual mapping between input paramaters,
with a ceratin
data structure, is done in the <emphasis
role="bold">ioSpecification</emphasis> section
@@ -779,7 +787,7 @@
<para>
<emphasis role="bold">Important note: Interfaces, ItemDefinitions
and messages are
- defined outside the <process>.</emphasis> See the example
<emphasis role="bold">
+ defined outside a <process>.</emphasis> See the example
<emphasis role="bold">
ServiceTaskTest</emphasis> for a concrete process and unit test.
</para>
@@ -806,8 +814,8 @@
scriptLanguage</emphasis> and a <emphasis
role="bold">script</emphasis>.
Since we're using JSR-223 ('Scripting for the Java platform'),
changing the script language involves
<itemizedlist>
- <listitem>changing the scriptLanguage attribute to the JSR-223 compliant
name</listitem>
- <listitem>adding the ScriptEngine implementation of the specification to
the classpath</listitem>
+ <listitem>changing the <emphasis
role="bold">scriptLanguage</emphasis> attribute to the JSR-223
compliant name</listitem>
+ <listitem>adding the ScriptEngine implementation of the JSR specification
to the classpath</listitem>
</itemizedlist>
The XML above is visualized as follows (adding a none start and end event).
</para>
@@ -815,12 +823,13 @@
<mediaobject><imageobject><imagedata align="center"
fileref="images/bpmn2.script.task.png"/></imageobject></mediaobject>
<para>
- As shown in the example, process variables are usable inside the scripts. We can
now start
- a process instance, while also supplying some random input variables:
+ As shown in the example, process variables can be used inside the scripts. We can
now start
+ a process instance for this example process, while also supplying some random
input variables:
<programlisting>
Map<String, Object> variables = new HashMap<String,
Object>();
Integer[] values = { 11, 23, 56, 980, 67543, 8762524 };
-variables.put("input", values);
+variables.put("input", values);
+executionService.startProcessInstanceBykey("scriptTaskExample",
variables);
</programlisting>
In the output console, we can now see the script being executed:
<programlisting>
@@ -865,7 +874,7 @@
<para>
A <emphasis role="bold">receive task</emphasis> is a task
that waits for the arrival of
an external message. Besides the obvious use case involving webservices, the
specification
- is liberal in what to do in other environment. The web service use case is not
yet
+ is liberal in what to do in other environments. The web service use case is not
yet
implemented, but the receive task can already be used in a Java environment.
</para>
@@ -1008,7 +1017,7 @@
</programlisting>
The mechanism regarding task forms for BPMN 2.0 is complete equivalent to that of
JPDL.
The form itself is a <ulink
url="http://freemarker.org/">Freemarker</ulink> template file
- that needs to be incorporated in the deployment. For example, the
'verify_request' form
+ that needs to be incorporated in the deployment. For example, the
'verify_request.ftl' form
looks like as follows.
<programlisting>
<html>
@@ -1016,23 +1025,23 @@
<form action="${form.action}"
method="POST" enctype="multipart/form-data">
- <h3>Your employee, ${employee_name} would like to go on
vacation</h3>
- Number of days: ${number_of_days}<br/>
+ <h3>Your employee, <emphasis
role="bold">${employee_name}</emphasis> would like to go on
vacation</h3>
+ Number of days: <emphasis
role="bold">${number_of_days}<</emphasis>br/>
<hr>
In case you reject, please provide a reason:<br/>
- <input type="textarea"
name="reason"/><br/>
+ <emphasis role="bold"><input
type="textarea"
name="reason"/><br/></emphasis>
- <input type="submit"
name="verificationResult" value="OK">
- <input type="submit"
name="verificationResult" value="Not OK">
+ <emphasis role="bold"><input type="submit"
name="verificationResult" value="OK">
+ <input type="submit"
name="verificationResult" value="Not
OK"></emphasis>
</form>
</body>
</html>
</programlisting>
Note that <emphasis role="bold">process variables can be
- used using the ${my_process_variable} construct.</emphasis> Also note that
named
+ accessed using the ${my_process_variable} construct.</emphasis> Also note
that named
input controls (eg. input field, submit button) can be used to
<emphasis role="bold">define new process
variables</emphasis>.
For example, the text input of the following field will be stored as the process
@@ -1048,7 +1057,7 @@
<sequenceFlow id="flow3"
name="fromVerifyRequestToEnd"
sourceRef="verifyRequest"
targetRef="theEnd">
<conditionExpression xsi:type="tFormalExpression">
- ${verificationResult == 'OK'}
+ <emphasis role="bold">${verificationResult ==
'OK'}</emphasis>
</conditionExpression>
</sequenceFlow>
</programlisting>