From jbosstools-commits at lists.jboss.org Wed May 26 11:56:48 2010 Content-Type: multipart/mixed; boundary="===============7281587771834324816==" MIME-Version: 1.0 From: jbosstools-commits at lists.jboss.org To: jbosstools-commits at lists.jboss.org Subject: [jbosstools-commits] JBoss Tools SVN: r22330 - in trunk/jbpm/docs/reference/en-US: images/the_views and 1 other directory. Date: Wed, 26 May 2010 11:56:48 -0400 Message-ID: <201005261556.o4QFumkG014171@svn01.web.mwc.hst.phx2.redhat.com> --===============7281587771834324816== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: ochikvina Date: 2010-05-26 11:56:47 -0400 (Wed, 26 May 2010) New Revision: 22330 Added: trunk/jbpm/docs/reference/en-US/images/the_views/jbpm_1.png trunk/jbpm/docs/reference/en-US/images/the_views/jbpm_2.png trunk/jbpm/docs/reference/en-US/images/the_views/jbpm_3.png trunk/jbpm/docs/reference/en-US/tasks.xml Modified: trunk/jbpm/docs/reference/en-US/master.xml trunk/jbpm/docs/reference/en-US/the_views.xml Log:

https://jira.jboss.org/browse/TOOLSDOC-23 - Restructured jbpm guide.Adde= d reference chapter with wizards description to the guide.

Added: trunk/jbpm/docs/reference/en-US/images/the_views/jbpm_1.png =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: trunk/jbpm/docs/reference/en-US/images/the_views/jbpm_= 1.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/jbpm/docs/reference/en-US/images/the_views/jbpm_2.png =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: trunk/jbpm/docs/reference/en-US/images/the_views/jbpm_= 2.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/jbpm/docs/reference/en-US/images/the_views/jbpm_3.png =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: trunk/jbpm/docs/reference/en-US/images/the_views/jbpm_= 3.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/jbpm/docs/reference/en-US/master.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/jbpm/docs/reference/en-US/master.xml 2010-05-26 15:26:08 UTC (rev= 22329) +++ trunk/jbpm/docs/reference/en-US/master.xml 2010-05-26 15:56:47 UTC (rev= 22330) @@ -10,7 +10,7 @@ - + @@ -81,11 +81,15 @@ = &introduction; = - &jboss_jbpm_runtime_installation; = - &guided_tour_jboss_jbpmgpd; - &the_views; &Test_Drive_Proc; + = + + &tasks; + &the_views; = + = + = Added: trunk/jbpm/docs/reference/en-US/tasks.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/jbpm/docs/reference/en-US/tasks.xml (rev = 0) +++ trunk/jbpm/docs/reference/en-US/tasks.xml 2010-05-26 15:56:47 UTC (rev = 22330) @@ -0,0 +1,671 @@ + + + + + + jBPM + designer + process + JBoss Developer Studio + jBPM runtime + JBoss + Process + Definition + + + + Tasks +
+ + JBoss jBPM Runtime Installation + The main purpose of this chapter is to let you know how to launc= h the JBoss + jBPM (business process management). + The jBPM plugin (jBPM Designer) is already included in the JBoss Tools. + To make it work, you should only download the jBPM runtime (jbpm-jpdl-3.2.3 currently) and specify the directory = where you extracted the runtime + either when you create a jBPM project or by using the jBPM prefere= nce pages. + = + + Note: + Try to avoid using spaces in the names of installation folde= rs. It can provoke problems in + some situations with Sun-based VMs. + + = + Navigate to + Window > Preferences > JBoss jBPM > Runtime Loc= ations. + Here you can add, edit and remove JBoss jBPM installation = locations. Click + Add + button. In the dialog that appeared enter a name for a new= ly added jBPM runtime and + point to the correct location of this package on your harddrive. C= lick + OK + then click + OK + again. + = +
+ Adding jBPM Location + + + + + +
+ Now, when you have a runtime installed, we are going to demonstr= ate some powerful features of + the jBPM. +
+
+ + + A Guided Tour of JBoss jBPM GPD + In this chapter we suggest a step-by-step walk-through of cr= eating and configuring your + own simple process. Let's try to organize a new jBPM project.<= /para> + A wizard for creating a jBPM project is included in the GPD = plugin. We have opted to + create a project based on a template already containing a numb= er of advanced artifacts that + we will ignore for this section. In the future we will elabora= te this wizard and offer the + possibility to create an empty jBPM project as well as project= s based on templates taken + from the jBPM tutorial. +
+ + Creating a jBPM Project + This section will show you how to use the Creation wizar= d for creating a new jBPM + project with already included source folders. + At first you should select + File >New Project... + and then + JBoss jBPM > Process Project + in the New Project dialog: +
+ New Project Dialog + + + + + +
+ Clicking + Next + brings us to the wizard page where it's neces= sary to specify the + name and location for the project. We choose, for example,= + HellojBPM + as the name and accept the default location. <= /para> +
+ Process Name and Location + + + + + +
+ Thus, our project will be created in the workspace root = directory by default. If you + want to change the directory for your future project, dese= lect + Use default location + and click + Browse... + button to set needed location or simply type i= t. + On the next screen you'll be prompted to select the= core jBPM location that + we have defined in the previous chapter. +
+ Core jBPM Location Specifying + + + + + +
+ Clicking on + Finish + results in the project being generated. The wizard= creates four source + folders: one for the processes ( + src/main/jpdl + ), one for the java sources ( + src/main/java + ), one for the unit tests ( + src/test/java + ) and one for the resources such as the jbpm.pr= operties and the + hibernate.properties files ( + src/main/config + ). In addition a classpath container with all t= he core jBPM libraries is + added to the project +
+ Layout of the Process Project + + + + + +
+ Looking inside the different source folders will reveal = a number of other artifacts + that were generated, but we will leave these untouched for= the moment. Instead, we will + look at another wizard that enables us to create an empty = process definition. +
+
+ + Creating an Empty Process Definition + Now when the project is set up, we can use a Creation wi= zard to create an empty + process definition. Bring up the + New + wizard by clicking the + File > New > Other... + menu item. The wizard opens on the + Select Wizard + page. +
+ The Select Wizard Page + + + + + +
+ Selecting the + JBoss jBPM + category, then the + Process Definition + item and clicking on the + Next + button brings us to the + Create Process Definition + page. +
+ The Create New Process Defining Page + + + + + +
+ We choose + hello + as the name of the process archive file. Click on = the + Finish + button to end the wizard and open the process defi= nition editor. +
+ The Process Definition Editor + + + + + +
+ = + = + You can see in the Package Explorer that creating a proc= ess definition involves + creating a folder with the name of the process definition = and populating this folder + with two .xml files : + gpd.xml + , + processdefinition.xml = and a .jpg file: + processimage.jpg.<= /para> + The + gpd.xml + contains the graphical information used by the pro= cess definition editor. + The + processdefinition.xml + file contains the actual process definition in= fo. + The graphical view of the process is automatically saved i= n + processimage.jpg = + file. + At present, the GPD assumes that these three files are sib= lings. More + sophisticated configuration will be supported later. + = +
+ + A Minimal Process Definition + Now we are ready to create a very simple process def= inition consisting of a begin + state, an intermediate state and an end state. + To make the configuration of actions much easier it&= apos;s better to use the + >"jBPM jPDL 3" perspective. It provides the tabbed Properties Editor which allows to co= nfigure + all the relevant properties of the current selected it= em. + = +
+ + Adding the Nodes + At first select respectively + Start, + + State + and + End + on the tools palette and click on the = canvas to add these nodes to + the process definition. The result should look sim= ilar to this: +
+ A Simple Process With Three Nodes + + + + + +
+
+
+ + Adding Transitions + Then, we will connect the nodes with transitions= . To do that select the + Transition + tool in the tools palette and click on the= + Start + node, then move to the + State + node and click again to see the transition= being drawn. Perform the + same steps to create a transition from the + State + node to the + End + node. The result will look like: +
+ A Simple Process With Transitions + + + + + +
+ Now, when you've got background knowledge o= f simple project creation, + let's move to more advanced tools. +
+
+
+
+
+ + + Actions : The JBoss jBPM Integration Mechanism + = + In this chapter we will show how to do software integration= with JBoss + jBPM. The standard mechanism to implement this is t= o wrap the functionality you + want to integrate in a class that implements the + ActionHandler + interface. In order to demonstrate it let's specif= y Hello World action for our + process. + = +
+ Creating a Hello World Action + = + Each Hello World process should integrate one or more He= llo World actions, so this is + what we will be doing. We can integrate custom code at dif= ferent points in the process + definition. To do this we have to specify an action handle= r, represented by an + implementation of the + ActionHandler + interface, and attach this piece of code to a = particular event. These events + are amongst others, going over a transition, leaving or en= tering nodes, after and before + signalling. + = + To make things a little bit more concrete, let's c= reate a new class called + HelloActionHandler. + For that firstly we'll create a new package <= emphasis> + com.jbay.action + in the + src/java/main + folder of our project. Then, we should call New Cl= ass Creation wizard as + usual by right-clicking and navigating + New > Class. + + = +
+ Creating HelloActionHendler Class + = + + + + + +
+ = + Notice that two first gaps have been filled automaticall= y. Here, instead of + Package + option + Enclose type + option can be selected where a type in which to en= close a new class should + be specified. + = + In our case, we leave everything as it is, just type + HelloActionHandler + as a name of new class and add + org.jbpm.graph.ActionHendler + interface as it's shown in the picture above.= + = + Thus, our + HelloActionHandler + implements the + ActionHandler + interface including the + execute + method as shown in the next figure. Here, we add a= variable named + greeting + to the collection of process variables and put = a message in it : + "Hello from ActionHandler".= + = +
+ A Simple Hello Action + = + + + + + +
+ = + Now, as we have + HelloActionHandler + class defined, let's explore how we can handl= e it. +
+ = +
+ Integrating the Hello World Action + = + The main purpose of this chapter is to provide you with = the steps associating our + Hello World action with a particular event and test the co= rrectness of our actions as + well. + = + As good Testcity citizens we will first create a Unit T= est that proves the behaviour + we want to achieve by adding the + ActionHandler + to the process. So we implement another test.<= /para> + = + At first, let's return to the + code we already saw in the pr= evious chapter and add new test method + testActionHendler to i= t. + = +
+ Create the Hello Action Test + = + + + + + +
+ = + We assert + that no variable called + greeting + exist. Then we give the process a signal to mo= ve it to the auction state. We + want to associate the execution of the action with the eve= nt of going over the + transition from the start state to the auction state. So a= fter the signal, the process + should be in the auction state as in the previous scenario= . But moreover, the + greeting + variable should exist and contain the string <= emphasis>"Hello from + ActionHandler". That's what we as= sert in the last lines of the test + method. + = + = + = + Running the tests now results in a failure. The point i= s that we did not associate + the action with any particular event in the process defini= tion, so the process variable + did not get set. + = +
+ Test Results Before Integration + = + + + + + +
+ = + Let's do something about it and add an action to t= he first transition of our + sample process. To do this you can use the Actions tab in = the Properties Editor that is + under the graphical canvas. Bring up the popup menu of the= action element container and + chose New Action as it's shown on the figure below. The ot= her way to add an action + to the transition is simply to use the dropdown menu that = is available under the action + icon in the right upper corner of the Properties View. + = +
+ Adding an Action to a Transition + = + + + + + +
+ = + After adding the action a tabbed view with three pages w= ill appear. + = +
+ Configuration Dialog for an Action + = + + + + + +
+ = + The first of these three pages allows you to give the Ac= tion a name. The last page + contains some advanced attributes such as whether the Acti= on is asynchronous. The + Details page is the most important. It allows to choose an= d configure the actual action + handler implementation. + = +
+ The Details page of an Action Configuration Dialog<= /title> + = + <mediaobject> + <imageobject> + <imagedata fileref=3D"images/The_JBoss_jBPM_Int_Me= ch/jboss_jbpm_int_mech_7.png" scale=3D"80"/> + </imageobject> + </mediaobject> + </figure> + = + = + <para>Clicking on the <emphasis> + <property>Search...</property> + </emphasis> button brings us to a Choose Class dialog.</para> + = + = + <figure> + <title>The Choose Action Handler Dialog + = + + + + + +
+ = + = + We choose our previously created 'HelloActionHandl= er' class and + push the OK button. After the selecti= on of the action handler for + the action, we can run the test and observe it gives us a = green light. + = +
+ Test Results + = + + + + + +
+ = + There we are. The above objective has been achieved. +
+ = +
+ Integration Points + = + The different integration points in a process definitio= n are thoroughly documented in + the JBoss= jBPM User Guide. Instance nodes can contain many action + elements. Each of these will appear in the Action element = list of the Actions tab. But + each Action also has a properties view of itself. You can = navigate to this view by + selecting the added Action in the outline view. + = +
+
+
+ + = + Quick Howto Guide + = + This chapter contains additional information related to the = JBoss + jBPM. + = +
+ Change the Default Core jBPM Installation + = + You can change the default jBPM in= stallation by means of the + Eclipse preference mechanism. Open the Preferences dialog = by selecting + Window > Preferences + and select the + JBoss jBPM > Runtime Location + category. Using this page you can add multiple= jBPM + installation locations and change the default one. The def= ault installation is used for + the classpath settings when creating a new Process Project= . Changing the preferences has + no influence on already created projects. Getting rid of a= jBPM + installation that's being referenced by a project how= ever will cause the + classpath to contain errors. + = + = +
+ The jBPM Preferences Page + = + + + + + +
+
+ = +
+ Configuring Task Nodes + = + Here, we'll examine how you can configure the Task = nodes in jBPM jPDL GPD. + = + You can add Tasks to Task nodes and then configure them= in a similar manner as the + Action configuration mechanism. Let's consider the pr= ocess definition similar + to the previous one that contains three nodes: Start state= , Task node and End state. The + Properties view for selected Task nod= e includes several tabs. + = +
+ The Properties View of the selected Task Node</titl= e> + <mediaobject> + <imageobject> + <imagedata fileref=3D"images/Quick_Howto_Guide/qui= ck_howto_guide_2.png" + scale=3D"75"/> + </imageobject> + </mediaobject> + </figure> + = + <para>We should choose the Task tab and then bring up the cont= ext menu or click the button + in the top right corner of the view to add a Task to our T= ask node.</para> + = + <figure> + <title>Adding a Task to the Task Node + + + + + +
+ = + Every added Task has its own configuration possibilities= . You can access them through + the Properties view as well. + = +
+ The Task properties + + + + + +
+ = + The General page is a place where y= ou can specify the name of a + Task and its description. For instance, let it be + approve oder + with appropriate description that you can see = in the figure below. + = +
+ The Task General Page + + + + + +
+ = + Now, look at Details page. First, y= ou should specify the due date + that is a mandatory property for the Task. The due date is= the date on which the task + should be accomplished. Here you can also set a Task prior= ity as well as signalling, + notifying or blocking. The + Blocking + attribute indicates that the process will not = be able to continue if this + task is still unaccomplished. The + Generate Form... + button is for creating a simple task form that= can be rendered by the jBPM + console. + = +
+ The Task Details Page + + + + + +
+ = + For our example, we specify the due date as 2 business d= ays, choose the high priority + and also check the + Signalling + and + Notify + attributes. It means that the Task should be a= ccomplished in 2 business days + and the assignee will be notified by email when the task i= s assigned. To specify how the + Task should be assigned switch on to the Assignm= ent page. + = +
+ The Task Assignment Page + + + + + +
+ = + On the Reminder page you can specif= y whether the assignee will be reminded of the task + that awaits him. + = +
+ The Task Reminder Page + + + + + +
+ = + In our case, the assignee will be reminded by email afte= r two business hours and + continue to get reminding every business hour after that.<= /para> + In the next figure you can see our configuring generated= into XML. +
+ The Task Reminder Page + + + + + +
+ We hope, our guide will help you to get started with the= jPDL process language and jBPM + workflow on the whole. Besides, for additional information= you are welcome on JBoss forum. +
+
+ = +
\ No newline at end of file Modified: trunk/jbpm/docs/reference/en-US/the_views.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/jbpm/docs/reference/en-US/the_views.xml 2010-05-26 15:26:08 UTC (= rev 22329) +++ trunk/jbpm/docs/reference/en-US/the_views.xml 2010-05-26 15:56:47 UTC (= rev 22330) @@ -1,14 +1,151 @@ - - + jBPM + Reference +
+ Wizards +
+ Process Project Wizard + This wizard helps to create new jBPM project.It is availa= ble with clicking + File->New->Other->jBPM 3 Project in th= e menu bar. +
+ New Process Project Wizard + + + + + +
+ It consists of several pages: + + On the first page you can adjust the name o= f the project and the directory where it will be created. + If "Use default" option is c= hecked the output directory will be the workspace, + othervise the user should specify it by himself usi= ng Browse button. +
+ New Process Project Wizard + + + + + +
+
+ On the second page you should point the loc= ation of your jbpm runtime. + The last page is only available for unablin= g/disabling = + Generate simple process definition,action han= dling and Unit test. +
+ = +
+
+ New JBPM Action Wizard + This wizard is available by clicking = + File->New->Other->jBPM 3 Action Handler. + = +
+ New JBPM Action Wizard + + + + + +
+ It includes the next options to adjust: + = + + New JBPM Action Wizard. Options. = + + + + + = + + + Option = + Description + Default + + + + = + + Source folder + The path to the source folder relative = to the selected project + The source folder of the project select= ed in the Project field + = + = + + Package + Enter a package to contain an Action Ha= ndler. + Either type a valid package name or click = + Browse + to select a package via the dialog box. + <blank> + = + = + + Enclosing type + Select the enclosing type of your jBPM = action using + Browse + button. + <blank> + + + Modifiers + Select the modifiers that will be added= to the generated class. + Public + = + + Name + Type a name for a new Action Handler + <blank> + = + = + + Superclass + Type or click Brows= e + to select a superclass for an Action Handl= er + org.jbpm.graph.def.ActionHandler + = + = + + Interface + Type or click Add + to select an interface/interfaces for an A= ction Handler + org.jbpm.graph.def.ActionHandler + = = + + Which method stubs you would like to cr= eate? + Select the stubs that you would like to= be created automatically. + + Constructors from supercla= ss + Inherited abstract methods= + + + = + = + + Do you want to add comments? + Select Generate comments check box if you want comment mask = + to be generated before the class definiti= on. + + <blank> + = + + +
+
+ = + = +
+ = +
+ The views - Here, it will be explained how to work with views and editors pr= ovided by JBDS. The views are used for representation and navigation the resourc= es you are working on at the moment. One of the advantages of all the views is that all mod= ifications made in the @@ -238,4 +375,5 @@ perspective, let's pass on to the project testi= ng.
+
\ No newline at end of file --===============7281587771834324816==--