JBoss.orgCommunity Documentation
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.
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 button Test Connections is necessary to make sure whether all your settings are valid before deploying the process.
Now that we've seen how to work with jPDL perspective, let's pass on to the project testing.