JBoss.orgCommunity Documentation
This wizard helps to create new jBPM project.It is available with clicking File->New->Other->jBPM 3 Project in the menu bar.
It consists of several pages:
On the first page you can adjust the name of the project and the directory where it will be created.
If "Use default" option is checked the output directory will be the workspace, othervise the user should specify it by himself using Browse button.
On the second page you should point the location of your jbpm runtime.
The last page is only available for unabling/disabling Generate simple process definition,action handling and Unit test.If you unable the option all the mentioned code will be generated automatically.
This wizard is available by clicking File->New->Other->jBPM 3 Action Handler.
It includes the next options to adjust:
Table 3.1. 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 selected in the Project field |
Package | Enter a package to contain an Action Handler. 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 Browse to select a superclass for an Action Handler | org.jbpm.graph.def.ActionHandler |
Interface | Type or click Add to select an interface/interfaces for an Action Handler | org.jbpm.graph.def.ActionHandler |
Which method stubs you would like to create? | Select the stubs that you would like to be created automatically. |
|
Do you want to add comments? | Select Generate comments check box if you want comment mask to be generated before the class definition. | <blank> |
Here, it will be explained how to work with views and editors provided by JBDS.
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 current active file are immediately displayed in them. Let’s get acquainted more closely with those that the jPDL perspective provides.
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.
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 Window > Show view > Outline.
The main advantage of this view is that it gives visual representation of the whole current developing process. Besides, the Overview comes as a scrollable thumbnail which enables a better navigation of the process structure if it's too large.
Here, we dwell on the JBDS Properties view.
Notice if it's not visible you can access it by navigating Window > Show view > Properties.
The view shows the relevant properties of the selected item in the tabbed form. Every item has its own set of properties, which can be directly editable in the Properties view or by brining up the context menu.
For example, on the picture above the Properties view displays all the properties for a selected transition. Its name has been changed to to_auction. We've done it directly in active General tab of the view. The same way let's change the name for the second transition to to_end.
If no one item is selected, the view represents the properties of the whole process definition.
In this case, it contains six tabs. The first one is the General. It allows to specify a process name and add necessary description. To illustrate let's change the process definition name to jbay.
The jBPM GPD editor includes four modes: Diagram, Deployment, Design and Source, which are available as switchable tabs at the bottom of the editor. Let's dwell on each of them.
In this mode we define the process in the form of a diagram by means of tools provided on the left-hand side of the jBPM GPD.
Besides, some properties can be directly edited in the Diagram mode of the graphical editor. One example of this is the name property of nodes. You can edit this directly by selecting the node of which you want to change the name and then click once inside this node. This enables an editor in the node. We change the name of the node to auction.
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 tab of the graphical process designer editor.
The Source mode enables to easily manipulate our XML. That is manually inserting and editing necessary elements or attributes. In addition, here you can take advantage of content assist.
A template is added to better render the jBPM task forms in the Visual editor. Now the jBPM Graphical Process designer can create facelets that are associated with tasks and are rendered in the jBPM console.
One more way to edit your file is to use Design mode. You can see it in the next picture:
As you can see above, this mode looks like a table in the first column of which the process structure is performed. Here, you can also insert, remove and edit elements or attributes, moreover add comments and instructions. Their values can be directly edited in the second column of the Design mode table.
For instance, let’s add a comment on the second transition. For that, you should bring up the context menu for it and choose Add Before > Comment.
Then, we can put the text This transition leads to the end state in the right column as its value.
Finally, to adjust the deployment settings of the project you should switch on to the tab that opens the Deployment mode. On the picture below the Deployment mode is performed with default settings. Here, you can easily modify them or, if the settings won't match your needs, to reset defaults.
The Test Connections button can be used to check whether all your settings are valid before deploying the process.
To deploy the process on the server you should click the Delpoy Process Archive button.
However, prior to testing the connection and deploying the process on the server you need to make sure the server is configured to support jBPM functionality and is running.
Please, also note that if authentication for deployment is required you may use the process deployer that is available at /gpd-deployer/upload.
Now that we've seen how to work with jPDL perspective, let's pass on to the project testing.