Author: ochikvina
Date: 2007-12-22 06:58:37 -0500 (Sat, 22 Dec 2007)
New Revision: 5429
Modified:
trunk/jbpm/docs/reference/en/modules/Quick_Howto_Guide.xml
trunk/jbpm/docs/reference/en/modules/Test_Drive_Proc.xml
trunk/jbpm/docs/reference/en/modules/the_views.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-233 - updating according to Svetlana Mukhina
remarks
Modified: trunk/jbpm/docs/reference/en/modules/Quick_Howto_Guide.xml
===================================================================
--- trunk/jbpm/docs/reference/en/modules/Quick_Howto_Guide.xml 2007-12-22 11:58:01 UTC
(rev 5428)
+++ trunk/jbpm/docs/reference/en/modules/Quick_Howto_Guide.xml 2007-12-22 11:58:37 UTC
(rev 5429)
@@ -13,7 +13,8 @@
<title>Quick Howto Guide</title>
<para>This chapter contains additional information related to the
<property>JBoss jBPM</property>.</para>
- <section>
+
+ <section id="change_core_jbpm_inst">
<title>Change the Default Core jBPM Installation</title>
<para> You can change the default <property>jBPM</property>
installation by means of the
Modified: trunk/jbpm/docs/reference/en/modules/Test_Drive_Proc.xml
===================================================================
--- trunk/jbpm/docs/reference/en/modules/Test_Drive_Proc.xml 2007-12-22 11:58:01 UTC (rev
5428)
+++ trunk/jbpm/docs/reference/en/modules/Test_Drive_Proc.xml 2007-12-22 11:58:37 UTC (rev
5429)
@@ -11,25 +11,38 @@
</keywordset>
</chapterinfo>
<title>Test Driven Process Development</title>
-
+
<para> One of the most important advantages of JBoss jBPM's
lightweight approach to BPM
and workflow management is that developers can easily leverage their usual
programming
skills and techniques. One of these well-known techniques is Unit Testing and
Test Driven
Development. </para>
- <para>In this chapter we will show how developers, making use of the JBoss
jBPM GPD,
- can use a technique we have baptized <property>Test Driven Process
Development</property> to
- create process definitions and test their correctness. </para>
+ <para>In this chapter we will show how developers, making use of the JBoss jBPM
GPD, can use a
+ technique we have baptized <property>Test Driven Process
Development</property> to create
+ process definitions and test their correctness. </para>
<para> When creating the <emphasis>
<property>HellojBPM</property>
- </emphasis> project the create process project wizard has already put in
place all the
- library requirements we need to start writing jBPM unit tests. These are
contained in the
- jBPM Library container and the most important of it is the <emphasis>
+ </emphasis> project the Project Creation wizard has already put in place
all the library
+ requirements we need to start writing the jBPM unit tests. They are contained in
the jBPM
+ Library container and the most important of them is the <emphasis>
<property>.jar</property>
- </emphasis> file containing the core jBPM classes. It must be noted that it
is possible to
- change the location of the core jBPM installation by changing the preference
settings. More
- on this later in the book. </para>
+ </emphasis> file containing the core jBPM classes. While working on the
project you could
+ find them all in the Package Explorer.</para>
+ <figure>
+ <title>The jBPM Libraries</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/Test_Drive_Proc/test_driv_proc.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>It must be noted that it is possible to change the location of the core
jBPM installation
+ by changing the preference settings. More on this <link
linkend="change_core_jbpm_inst">see
+ later</link> in this book.</para>
+
<para> With that extra knowledge on the project settings, you can create your
first test. To do
this, we create the <emphasis>
<property>com.jbay</property>
@@ -37,59 +50,89 @@
<property>test/java</property>
</emphasis> source folder. Then we bring up the context menu on this
package and select <emphasis>
<property>New > Other...</property>
- </emphasis> and then <emphasis>
- <property>Java > JUnite > JUnite Test
Case</property></emphasis>.</para>
+ </emphasis></para>
<figure>
- <title>Create a Test</title>
+ <title>Call the JUnit Test Class Creation wizard</title>
<mediaobject>
<imageobject>
- <imagedata
fileref="images/Test_Drive_Proc/test_driv_proc_1.png"/>
+ <imagedata
fileref="images/Test_Drive_Proc/test_driv_proc_1a.png"/>
</imageobject>
</mediaobject>
</figure>
- <para>We call the test class <emphasis>
- <property>HelloTest</property>
- </emphasis>.</para>
+ <para> And then <emphasis>
+ <property>Java > JUnit > JUnit Test
Case</property>
+ </emphasis> to call the specialized JUnite Test class creation
wizard.</para>
+ <figure>
+ <title>Call the JUnit Test Class Creation wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/Test_Drive_Proc/test_driv_proc_1b.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The wizard looks as follows:</para>
+
<figure>
<title>Create Test Dialog</title>
<mediaobject>
<imageobject>
- <imagedata
fileref="images/Test_Drive_Proc/test_driv_proc_2.png"/>
+ <imagedata
fileref="images/Test_Drive_Proc/test_driv_proc_2a.png"/>
</imageobject>
</mediaobject>
</figure>
- <para> We write a simple test scenario as shown on the next figure.
Let's study the
- code of this testcase. </para>
+ <para>By default JUnite 3 version of testing framework is selected. Of course,
you can choose
+ new advanced JUnit 4 version. In this case you'll be prompted to add new
JUnit
+ Library to your build path. To add it automatically just click on the appropriate
link.</para>
<figure>
<title>A First Test Scenario</title>
<mediaobject>
<imageobject>
+ <imagedata
fileref="images/Test_Drive_Proc/test_driv_proc_2b.png"
scale="75"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Then, we call the test class <emphasis>
+ <property>HelloTest</property>
+ </emphasis> and press <emphasis>
+ <property>Finish</property></emphasis> button to
complete.</para>
+
+ <para> Next, we should write a simple test scenario as shown on the next
figure. Let's study the
+ code of this test case. </para>
+
+ <figure>
+ <title>A First Test Scenario</title>
+
+ <mediaobject>
+ <imageobject>
<imagedata
fileref="images/Test_Drive_Proc/test_driv_proc_3.png" scale="75"/>
</imageobject>
</mediaobject>
</figure>
-
- <para>In the first line of the method, a jBPM process archive object is
- created. We use a constructor accepting the filename of the archive. In our case
it is the
- <emphasis>
- <property>hello</property></emphasis> file we created
earlier and which lives in the
- <emphasis>
- <property>src/main/jpdl</property></emphasis> folder of
our project. After asserting that this object is really
- created, we extract a process definition object from it. This object is fed to
the
- constructor of a process instance object. We have a process instance object, but
this
- process is not yet started, so we can safely assert that its root token still
resides in the
- start node. After signalling the token will move to the next state and the
process will be
- in the
<emphasis><property>auction</property></emphasis> state. Finally
another signal will end the process. </para>
-
+ <para>In the first line of the method, a jBPM process archive object is
created. We use a
+ constructor accepting the filename of the archive. In our case it is the
<emphasis>
+ <property>hello</property>
+ </emphasis> file we created earlier and which lives in the
<emphasis>
+ <property>src/main/jpdl</property>
+ </emphasis> folder of our project. After asserting that this object is
really created, we
+ extract a process definition object from it. This object is fed to the
constructor of a
+ process instance object. We have a process instance object, but this process is
not yet
+ started, so we can safely assert that its root token still resides in the start
node. After
+ signalling the token will move to the next state and the process will be in the
<emphasis>
+ <property>auction</property>
+ </emphasis> state. Finally another signal will end the process.
</para>
+
+
<para> After writing this test we can check whether it works as expected by
running it .</para>
<figure>
@@ -112,7 +155,7 @@
</imageobject>
</mediaobject>
</figure>
-
+
<para> Of course, this simple scenario was not very interesting, but the
purpose of it was to
show how you can reuse your development skills in a very straightforward way when
doing
process development. To see how more interesting processes and process test
Modified: trunk/jbpm/docs/reference/en/modules/the_views.xml
===================================================================
--- trunk/jbpm/docs/reference/en/modules/the_views.xml 2007-12-22 11:58:01 UTC (rev 5428)
+++ trunk/jbpm/docs/reference/en/modules/the_views.xml 2007-12-22 11:58:37 UTC (rev 5429)
@@ -12,14 +12,26 @@
<para>Here, it will be explained how to work with views and editors provided by
JBDS.</para>
<para>The views are used for representation and navigation the resources you
are working on at
the moment. One of the advantages of all the views is that all modifications made
in the
- currant- active file are immediately displayed in them. Let’s get acquainted more
closely
+ currant-active file are immediately displayed in them. Let’s get acquainted more
closely
with those that the jPDL perspective provides. </para>
+ <figure>
+ <title>The jPDL Perspective Views and Editors</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views.png"
scale="75"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>As you can see in the picture above, the jPDL perspective contains a
complete set of
+ functionality that's necessary for working on the jBPM
project.</para>
+
<section id="the_outline_view">
<?dbhtml filename="the_outline_view.html"?>
<title>The Outline View</title>
- <para>To have a way to quickly see an outline of the process use the JBDS
Outline view that
- is presented as the classical tree. If it is not visible select
<emphasis>
+ <para>To have a way to quickly see an outline of the process use the
Outline view that is
+ presented as the classical tree. If it is not visible select
<emphasis>
<property>Window > Show view >
Outline</property>
</emphasis>.</para>
@@ -37,7 +49,7 @@
<?dbhtml filename="the_outline_view.html"?>
<title>The Overview</title>
<para>The main advantage of this view is that it gives visual
representation of the whole
- currant-developing process. Besides, Overview comes as a scrollable
thumbnail, which
+ currant-developing process. Besides, the Overview comes as a scrollable
thumbnail which
enables a better navigation of the process structure if it's too
large.</para>
<figure>
@@ -89,8 +101,12 @@
</mediaobject>
</figure>
- <para>In this case, it contains six tabs. The first one is the General. It
allows to specify
- a process name and add necessary description.</para>
+ <para>In this case, it contains six tabs. The first one is the
<emphasis>
+ <property>General</property></emphasis>. It allows to
specify
+ a process name and add necessary description. To illustrate let's
change the process
+ definition name to <emphasis>
+ <property>jbay</property>
+ </emphasis></para>
</section>
<section id="jbpm_gpd_editor">
@@ -103,7 +119,7 @@
<section id="the_diagram_mode">
<title>The Diagram mode</title>
<para> In this mode we define the process in the form of a diagram by
means of tools
- provided on the left-hens side of the jBPM GPD. </para>
+ provided on the left-hand side of the jBPM GPD. </para>
<figure>
<title>The Diagram mode</title>
@@ -128,7 +144,7 @@
<?dbhtml filename="the_source_view.html"?>
<title>The Source Mode</title>
<para>Now, that we have defined a simple process definition, we can
have a look at the
- XML that is being generated under the covers. To see this XML, click on
the Source
+ XML that is being generated under the covers. To see this XML click on
the Source
tab of the graphical process designer editor.</para>
<figure>
@@ -205,11 +221,13 @@
</mediaobject>
</figure>
- <para>The button <emphasis><property>Test
Connections</property></emphasis> is necessary to make sure whether all your
settings
- are valid before deploying the process.</para>
+ <para>The button <emphasis>
+ <property>Test Connections</property>
+ </emphasis> is necessary to make sure whether all your settings are
valid before
+ deploying the process.</para>
</section>
</section>
- <para></para>
+ <para>Now that we've seen how to work with jPDL perspective, let's
pass on to the project testing.</para>
</chapter>