From jbosstools-commits at lists.jboss.org Wed Feb 17 15:35:13 2010
Content-Type: multipart/mixed; boundary="===============6474507894247521325=="
MIME-Version: 1.0
From: jbosstools-commits at lists.jboss.org
To: jbosstools-commits at lists.jboss.org
Subject: [jbosstools-commits] JBoss Tools SVN: r20340 - in trunk/drools/docs:
reference/en and 1 other directory.
Date: Wed, 17 Feb 2010 15:35:13 -0500
Message-ID: <201002172035.o1HKZDQ5030692@svn01.web.mwc.hst.phx2.redhat.com>
--===============6474507894247521325==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ochikvina
Date: 2010-02-17 15:35:12 -0500 (Wed, 17 Feb 2010)
New Revision: 20340
Modified:
trunk/drools/docs/guvnor_ref/en/master_output.xml
trunk/drools/docs/reference/en/master_output.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-1104 - Updated versions,correcte=
d master_output file
Modified: trunk/drools/docs/guvnor_ref/en/master_output.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/drools/docs/guvnor_ref/en/master_output.xml 2010-02-17 19:58:04 U=
TC (rev 20339)
+++ trunk/drools/docs/guvnor_ref/en/master_output.xml 2010-02-17 20:35:12 U=
TC (rev 20340)
@@ -19,1059 +19,1059 @@
=
=
-]>
- =
-
- Eclipse Guvnor Tools Reference Guide
- =
-
-
-
-
- =
-
-
- =
- =
-
- JohnGrahamjgraham(a)redhat.com =
- OlgaChikvina=
=
- =
- April 2008
-
- 2009
- JBoss by Red Hat
-
-
- Version: 5.1.0.trunk
-
-
-
-
- PDF versio=
n
-
-
-
-
- =
- =
- =
- =
-
-
- Introduction
-
- The purpose of this document is to describe briefly the function=
ality present in the
- Eclipse Guvnor Tools (E=
GT) for Drools 5. While not intended as a
- comprehensive reference, there should be enough detail included fo=
r early adopters using
- these tools.
-
- The Guvnor repository is =
not intended as a Source Code Management
- (SCM) solution, and the EGT=
are not intended to be Eclipse =E2=80=9Cteam
- provider=E2=80=9D extensions or replacements. Rather, the Guvnor r=
epository is a location where
- certain artifacts (such as rules and SOA policy definitions) are c=
ontrolled (=E2=80=9Cgoverned=E2=80=9D) by
- policies defined by the deployment environment. The purpose of the=
EGT
- is then to enable access to resources held by the Guvnor repositor=
y, so
- they can be used in development. Thus, limited capabilities for re=
ading, writing, adding,
- and removing Guvnor repository resources are provided in the
- EGT.
-
-
- Guvnor Tools Key Features
-
- The following table lists all valuable features of the Guvnor
- Tools.
-
- Key Functionality of Guvnor Tools
-
-
-
-
-
-
-
-
- Feature
- Benefit
- Chapter
-
-
-
-
-
-
-
- Guvnor Repositories View
-
-
- The purpose of the view is to enable acc=
ess to Guvnor repository
- resources in a standard tree format
-
-
- Guv=
nor Repositories View
-
-
-
-
-
- Guvnor Connection Wizard
-
-
- The wizard helps to create a connection =
to a Guvnor
- repository.
-
-
- Guvnor Con=
nection Wizard
-
-
-
-
-
- Guvnor Resource History View
-
-
- This view shows revisions of specific re=
sources available in the
- repository.
-
-
- Guvnor R=
esource History View
-
-
-
-
-
- Resources from Guvnor Wizard
-
-
- The wizard helps to get local copies of =
Guvnor repository
- resources.
-
-
- Import=
ing Guvnor Repository
- Resources
-
-
-
-
-
- A number of actions for working with fil=
es
-
-
- The Guvnor actions (available through th=
e
- Guvnor
- context menu on files) are pro=
vided for working with
- files, both those associated with Guvnor r=
epository master copies
- and those not associated.
-
-
- Actions for Local Gu=
vnor Resources
-
-
-
-
-
-
-
-
-
- How to start with Guvnor Tools
-
- Guvnor Tools is a par=
t of the JBoss Tools
- project. Thus to get started with =
Guvnor Tools, you should have the following:
-
-
-
- Eclipse 3.4.x with Jboss Tools bundle of Eclipse plu=
gins installed. How to
- install JBoss Tools onto Eclipse you can find in the <=
ulink url=3D"../../GettingStartedGuide/html_single/index.html#JBossToolsIns=
tall">"JBoss Tools
- Installation" section.
-
-
-
- JBoss Server 4.2 or higher with Guvnor repository de=
ployed. Thus, you should
- download Guvnor CR1 a=
nd extract it to the deploy directory of the
- server.
-
-
-
- Now refer to the "F=
unctionality
- Overview" section to find out what you can do with =
Guvnor and
- Eclipse synchronisation tool.
-
-
-
- Other relevant resources on the topic
-
-
-
- Guvnor wiki page
-
- =
-
- Drools on JBoss.org
-
-
-
-
- JBoss Tools=
Home Page
-
-
-
-
-
- The latest
- JBossTools/JBDS documentation builds
-
-
-
-
-
- JBossTools=
/JBDS
- release documentation
-
-
-
-
-
-
- =
-
-
-
-
- JBoss Tools
- Eclipse Guvnor Tools
-
-
-
- Functionality Overview
-
- This chapter will introduce you to the Guvnor Repository Exploring
- perspective and give an overview on all functionali=
ty the Guvnor Tools provides.
-
-
- Guvnor Perspective
-
- The Guvnor Repository Exploring =
perspective contains two views
- supplied by EGT =E2=80=
=93 Repository Explorer and
- Version History, th=
at will be the center of most interaction
- with Guvnor, and Eclipse standard views such as Properties and
- Resource Navigator =
that are also useful.
-
- While each of these views can be opened and positioned indep=
endently within an Eclipse
- workbench, the Guvnor perspective<=
/property> provides a convenient method of
- getting a suggested layout. In the Eclipse workbench menu, cho=
ose
- Window > Open Perspective &=
gt; Other
- to get the perspective list:
-
-
- Enabling the Guvnor Repository Perspective
-
-
-
-
-
-
-
- And then choose
- Guvnor Repository Exploring. This opens the
- Guvnor perspective.=
-
-
-
- Guvnor Connection Wizard
-
- After opening the Guvnor perspec=
tive, the first task is to make a
- connection to a Guvnor repository. This is handled by the Guvnor Connection
- wizard. This wizard appears in a number of plac=
es within the
- EGT (as detailed be=
low), but in this section we will cover only
- the two most basic entry points.
-
- The Guvnor Connection wizard can be started in the following
- ways:
-
-
-
- using the Eclipse menu
- File > New > Oth=
er > Guvnor > Guvnor
- repository location
-
-
-
- New Guvnor Repository Location
-
-
-
-
-
-
-
-
-
- in the Guvnor Repositori=
es view using the drop-down menu
-
-
- Adding New Guvnor Connection
-
-
-
-
-
-
-
-
-
- using the menu button =
- (
-
-
-
- )
-
-
-
-
- Choosing either of these will start the Guvnor Connection
- wizard.
- =
-
- Guvnor Connection Wizard
-
-
-
-
-
-
-
- Default values appear in the
- Location,
-
- Port, an=
d
- Repository
- fields (See the =E2=80=9CGuvnor Preferences=E2=80=9D section below for details=
about how to
- change these default values.) Of course, any of these fields c=
an be edited by typing in
- the corresponding text box. Drag-and-drop or paste into the
- Location
- field of a typical Guvnor repository URL such as:<=
/para>
-
-
-
- http://localhost:8080/drools-g=
uvnor/org.drools.guvnor.Guvnor/webdav
-
-
-
- Results in the URL being parsed into the respective fields a=
s well. The authentication
- information (user name and password) can optionally be stored =
in the Eclipse
- workbench's key-ring file based on the selection of
- Save user name and password.
-
-
- Note:
- If the authentication information is not stored in the k=
ey-ring, then the
- EGT uses a sess=
ion authentication, what means that the
- credentials supplied are used only for the lifetime of the=
Eclipse workbench
- instance.
-
-
- If authentication information is not stored in the key-ring =
or the authentication
- information (key-ring or session) is not valid, the EGT will prompt
- for authentication information when it has to access the Guvno=
r repository.
-
- If authentication fails, the EGT=
will retry once and then issue
- an authentication failure error.
-
-
- Tip:
- If an authentication failure error occurs, you can retry=
the same operation and
- supply different authentication information.
-
-
- Note that the EGT cal=
ls the Guvnor repository at various times,
- such as when determining if resource updates are available. Th=
us if you use session
- authentication, the authentication dialog will appear at diffe=
rent times during the
- Eclipse workbench session, depending on what actions you take.=
For ease of use, we
- recommend saving the authentication information in the Eclipse=
key-ring.
-
-
- Note:
- The Eclipse key-ring file is distinct from key-ring file=
s found in some platforms
- such as Mac OS X and many forms of Linux. Thus, sometimes =
if you access a Guvnor
- repository outside the EGT, the key-ring files might become
- unsynchronized and you will be unexpectedly prompted for a=
uthentication in Eclipse.
- This is nuisance, but your usual credentials should apply =
in this case.
-
-
-
-
- Guvnor Repositories View
-
- The Guvnor Repositories view contains tree structures for Guvnor
- repository contents. =
-
-
- Guvnor Repositories View
-
-
-
-
-
-
-
- You can perform the following actions under the resources in the
- Guvnor Repositories view:
-
-
-
- create a new Guvnor repository connection. How to do=
this is describe above in the "Guvnor =
Connection Wizard" section.
-
-
-
- remove a Guvnor repository connection. Use the Delet=
e button =
- (
-
-
-
- ) in the tool-bar or the
- Delete option in t=
he context menu to remove a repository connection.
-
-
-
- refresh Guvnor repository resorces. Use the
- Refresh context me=
nu item to reload a tree content for the selected node.
-
-
-
- make use of "drill-into" functionality. It's represe=
nted by a number of tool-bar/context menu items such as Go Home
- (
-
-
-
- ), Go Back
- (
-
-
-
- ) and
- Go Into
- (
-
-
-
- ).
-
-
-
- Drill-down is useful when working with deeply nested tree st=
ructures and when you wish to concentrate on only branch of the tree. For e=
xample, drilling into the
- "defaultPackage" n=
ode changes the tree view to:
-
-
- Going Into the "defaultPackage"
-
-
-
-
-
-
-
- Clicking on the Go Home button (
-
-
-
- ) or selecting
- Go Home in the con=
text menu returns the tree to the top-level structure shown in the previou=
s picture above.
-
-
- There are a number of operations that can be performed on Guvnor re=
pository files. Selecting a file in
-the Guvnor repository causes the Eclipse Prope=
rties view to update with details about that file:
-
-
-
- Guvnor Repository Files Properties
-
-
-
-
-
-
-
-
-
-
-
- Local Copies of Guvnor Files
-
- As mentioned in the "Introduc=
tion", the main purpose
- of the EGT is to allow =
development using resources held in a Guvnor
- repository. There are two method of getting local copies of Gu=
vnor repository
- resources:
-
-
-
- Drag-and-drop from the G=
uvnor Repositories view
-
-
- Using the Im=
port from Guvnor
- wizard, as described further in this docume=
nt
-
-
-
- When local copies of Guvnor repository files are created, th=
e EGT
- sets an association between the local copy and the master file=
in the repository. This
- information is kept in the (normally) hidden
- .guvnorinfo
- folder in the local project and, like all metadata=
, should not be changed by
- end users.
-
-
- .guvnorinfo metadata
-
-
- =
imagedata>
-
-
-
-
- The association allows for operations such as update and commit in
- synchronization with the master copy held in the Guvnor reposi=
tory.
-
- The EGT decorates loc=
al resources associated with Guvnor
- repository master copies. This decoration appears in Eclipse v=
iews conforming to the
- Eclipse Common Navigator framework, such as the Eclipse Resource
- Navigator and the Java Package Explorer. On the image
- above you can see the
- Dummy rule.drl file with the decoration in the Resource=
Navigator. The Guvnor icon decorator is on the top right of the=
file image, and the Guvnor
- revision details are appended to the file name. (The presence/=
location of these can be
- changed the =
Guvnor
- Preferences.)
-
- Here we see that, Dumm=
y role.drl is associated with a Guvnor repository
- resource and the local copy is based on revision 0, with a 02-10-2008, 4:21:53 date/time
- stamp. The file Sample.d=
rl, however, is not associated with a Guvnor reposito=
ry
- file. Further details about the association can be found in th=
e standard Eclipse
- properties page, accessed via the Properties option in the context menu:
-
-
- Association Details
-
-
-
-
-
-
-
- The EGT contributes a=
property page to the standard Eclipse
- properties dialog, the contents of which are shown above. It d=
isplays the specific Guvnor
- repository, the location within the repository, the version (d=
ate/time stamp) and
- the revision number.
-
-
-
- Actions for Local Guvnor Resources
-
- The EGT provides a nu=
mber of actions (available through the
- Guvnor context menu on files) for working with files, both those associated w=
ith
- Guvnor repository master copies and those not associated. The =
actions are:
-
-
-
-
- Update
-
-
-
-
- Add
-
-
-
-
- Commit
-
-
-
-
- Show History
-
-
-
-
- Compare with Ve=
rsion
-
-
-
-
- Switch to Version<=
/link>
-
-
-
-
- Delete
-
-
-
-
- Disconnect
-
-
-
-
- Each of these actions is described below.
-
-
- Update Action
-
- The
- Update
- action is available for one or more Guvnor res=
ources that are not in
- synchronization with the Guvnor repository master copies. =
These resources would not
- be in synchronization because either/both =
-
-
- There are local changes to these
- resources
- The master copies have been changed in the Guvnor reposi=
tory
-
-
- Performing the
- Update
- action replaces the local file contents with t=
he current contents from
- the Guvnor repository master copies (equivalent to
- Switch to version<=
/link>
- for the latest version).
-
-
-
- Add Action
-
- The
- Add
- action is available for one or more local file=
s that are not associated
- with a Guvnor repository master copy. Choosing the
- Add
- action launches the Add to Guvnor wizard:
-
-
- Add to Guvnor Wizard
-
-
-
-
-
-
-
- The first page of the wizard asks for the selection of t=
he target Guvnor
- repository and gives the choice to create a new Guvnor rep=
ository connection (in
- which case the second page is the same as the Guvnor Connection wizard). Once the t=
arget Guvnor repository is chosen,
- the wizard then asks for the folder location to add the se=
lection files:
-
-
- Selecting a Target Folder
-
-
-
-
-
-
-
- Here the
- "defaultPackage" folder is selected as the destination
- location.
-
-
- Note:
- Note that the
- "snapshot" folder in the Guvnor repository is read-only for
- EGT, and he=
nce not visible as a candidate location in
- this wizard. The Guvnor repository web administration =
tools must be used to add
- snapshot content.
-
-
- Clicking on
- Finish
- adds the selected files to the Guvnor reposito=
ry and creates an
- association between the local and Guvnor repository files.=
-
-
- Note:
- Note that the wizard will not allow for overwrite of=
existing Guvnor
- repository files. Another target location must be chos=
en.
-
-
-
-
- Commit Action
-
- The
- Commit
- action is enabled for one or more Guvnor repos=
itory associated files
- that have local changes. The
- Commit
- action will write the local changes back to th=
e associated Guvnor
- repository files and update the association for the new re=
vision created.
-
- If a local change is based on an older revision of a fil=
e that is currently in the
- Guvnor repository (for example, someone else changed the s=
ame file), then the
- Commit
- action will
- Add to Guvnor Wizard
-
-
-
-
-
- ask whether you wish to overwrite the current version in the
- Guvnor repository with the local content. When such confli=
cts occur, however, you
- should use the Eclipse Guvnor version tools, along with Ec=
lipse standard tools, to
- determine the differences and merge content based on the c=
urrent version in the
- Guvnor repository.
-
-
-
- Show History Action
-
- The
- Show History
- action is enable for one Guvnor repository ass=
ociated file and causes
- the Guvnor Resource =
History view to be
- populated with revision history for the selected file.
-
-
-
- Compare with Version Action
-
- The
- Compare with Version
- action is enabled for one Guvnor repository as=
sociated file. This action
- first opens a wizard asking for the version for comparison=
(with the local file
- contents):
-
-
- Compare with Version Wizard
-
-
-
-
-
-
-
- Once the revision is selected, the action opens the Ecli=
pse Compare
- editor (read-only):
-
- Eclipse Compare Editor
-
-
-
-
-
-
-
- This editor uses Eclipse-standard comparison techniques =
to show the differences in
- the two versions. In cases where there are no differences,=
the editor will not open,
- rather a dialog saying that there are no differences will =
appear.
-
- Alert Dialog
-
-
-
-
-
-
-
-
-
- Switch to Version Action
-
- The
- Switch to Version
- action is enabled for one Guvnor repository as=
sociated file.
- First the
- Switch to Version
- action prompts for selection of version:
-
-
- Select Version Window
-
-
-
-
-
-
-
- Once the version is selected, the
- Switch to Version
- action replaces the local file contents with t=
hose from the revision
- selected.
-
-
-
- Delete Action
-
- The
- Delete
- action is enabled for one or more Guvnor repos=
itory associated files.
- After confirmation via a dialog, the
- Delete
- action removes the files in the Guvnor reposit=
ory and deletes local
- metadata for the Guvnor repository association.
-
-
- Comfirm Delete Dialog
-
-
-
-
-
-
-
-
-
- Disconnect Action
-
- The
- Disconnect
- action is enabled for one or more Guvnor repos=
itory associated files,
- and removes local metadata for the Guvnor repository assoc=
iation.
-
-
-
-
- Guvnor Resource History View
-
- The Guvnor Resource History view=
should details about revision
- history for selected files, both local and those in Guvnor rep=
ositories. The initial
- state of this view is shown on the figure below.
-
-
- Initial State of the Guvnor Resource History View
-
-
-
-
-
-
-
- The Guvnor Resource History view=
is populated by
- Show History
- actions in either the local
- Guvnor context menu or in the context menu for
- a Guvnor repository file in the Guvnor
- Repositories view. Once this action is performed, t=
he Guvnor
- Resource History view updates to show the revis=
ion history:
-
-
- IGuvnor Resource History View
-
-
-
-
-
-
-
- Here we see that the file
- test.txt
- has three revisions. Double clicking on a revision=
row (or the context menu
- Open (Read only))=
emphasis> opens an Eclipse read-only editor
- with the revision contents.
-
-
- Eclipse Read-only Editor with the Revision Contents
-
-
-
-
-
-
-
- Note:
- You can also use the
- Save As...
- option when a file is open in a read-only edit=
or to save a local
- writable copy of the contents. Doing so, however, will not=
associate the file
- created with its Guvnor source.
-
-
-
-
-
- Importing Guvnor Repository Resources
-
- In addition to the single file drag-and-drop from the Guvnor Repositories
- view, the EGT also includes a wizard for copying one
- or more files from a Guvnor repository to the local workspace =
(and setting the
- association with the Guvnor repository). This wizard is availa=
ble from the
- File > Import > Guvnor &=
gt; Resource from
- Guvnor
- and the
- File > New > Other > =
Guvnor > Resource from
- Guvnor
- menu items.
-
- Note:
-
- Note that the wizard is identical but appears in both lo=
cations to accommodate
- users who tend to view this functionality as being in eith=
er category.
-
-
- The first page of the wizard asks for the selection of the s=
ource Guvnor repository
- and gives the choice to create a new Guvnor repository connect=
ion (in which case the
- second page is the same as the Guvnor Connection wizard).
-
-
- Resource from Guvnor Wizard
-
-
-
-
-
-
- =
- Once the source Guvnor repository is chosen, the wizard prom=
pts for resource selection:
-
-
- Resource Selection
-
-
-
-
-
-
- =
- Finally, the target location in the local workspace should b=
e chosen:
-
- Choosing the Target Location
-
-
-
-
-
-
- =
- On completion the wizard copies the selected files from the =
Guvnor repository to the local workspace.
- If a file with the same name already exists in the destination=
, the wizard uses the Eclipse standard
- "prompt for rename" dialog:
-
-
- Prompt for Rename Dialog
-
-
-
-
-
-
-
-
-
- =
-
-
-
-
- JBoss Tools
- Eclipse Guvnor Tools
-
-
-
- Guvnor Preferences
-
- The EGT provides a prefer=
ence page in the
- Guvnor
- category:
-
-
- Resource Selection
-
-
-
-
-
-
-
- The preferences cover two categories:
-
- Guvnor repository connections
- =
- Local Guvnor
- repository resource decorations.
-
-
-
- Guvnor Repository Connection Preferences
- There are two preferences that can be set for Guvnor reposit=
ory connections, that are
- used when creating new connections:
-
-
-
- The first is a default Guvnor repository URL templat=
e, which can make it
- easier to create multiple similar connections by simpl=
y changing part of the
- field, such as the host name.
-
-
- The second is whether saving of authentication infor=
mation in the Eclipse
- platform key-ring should be enabled by default.
-
-
-
- As with the Guvnor repository URL template, actually whether=
to save a specific
- instance of authentication information in the Eclipse platform=
key-ring can be
- determined when actually creating the connection. That is, bot=
h of these preferences are
- simply convenience values set to reasonable defaults.
-
-
-
- Local Guvnor Repository Resource Decoration Preferences
-
- The second category of preferences provided by the EGT deals with how the decoration of
- local resources associated with Guvnor repository resources is=
presented. Since the
- Guvnor repository is not a substitute for a SCM, and since SCM=
tools in Eclipse tend to
- decorate local resources, it is useful to be able to control j=
ust how the EGT decorate
- its local resources to avoid messy conflicts with SCM packages=
.
- =
- In the
- File Decoration
- section of the preference page, you can choose the location (T=
op right, Top left, Bottom right,
- Bottom left) of the decoration icon, or you can choose not to=
display it. In
- the
- Text sec=
tion, you can format the Guvnor metadata that is appended to the file
- names:
-
-
- Whether to show an indicator (>) when the local f=
ile has changes not committed back to the
- Guvnor repository
-
-
- Whether to show the revision number
-
-
- Whether to show the date/time stamp
-
- =
- =
- Any changes to these preferences take effect immediately upo=
n clicking the
- Apply and th=
en
- Ok butto=
ns.
-
-
-
- =
-
-
-
-
- JBoss Tools
- Eclipse Guvnor Tools
-
-
-
- Conclusion
-
- As stated at the beginning of this document, the key goal of the=
EGT
- is to provide a way of interacting with Guvnor repository resource=
s in a local Eclipse
- workspace. While clearly there is a lot more that could be done, a=
nd no doubt there will be
- aspects of the current tooling that require revision going forward=
, we feel that the current
- state of the EGT is suffici=
ent for the major use cases.
-
- If you have some questions, comments or suggestions on the topic=
, please feel free to ask in the
- Jboss Tools Forum.
-
-
-
-
+]>
+ =
+
+ Eclipse Guvnor Tools Reference Guide
+ =
+
+
+
+
+ =
+
+
+ =
+ =
+
+ JohnGrahamjgraham(a)redhat.com =
+ OlgaChikvina=
=
+ =
+
+ 2009
+ 2010
+ JBoss by Red Hat
+
+
+ Version: 5.1.0.trunk
+
+
+
+
+ PDF versio=
n
+
+
+
+
+ =
+ =
+ =
+ =
+
+
+ Introduction
+
+ The purpose of this document is to describe briefly the function=
ality present in the
+ Eclipse Guvnor Tools (E=
GT) for Drools 5. While not intended as a
+ comprehensive reference, there should be enough detail included fo=
r early adopters using
+ these tools.
+
+ The Guvnor repository is =
not intended as a Source Code Management
+ (SCM) solution, and the EGT=
are not intended to be Eclipse =E2=80=9Cteam
+ provider=E2=80=9D extensions or replacements. Rather, the Guvnor r=
epository is a location where
+ certain artifacts (such as rules and SOA policy definitions) are c=
ontrolled (=E2=80=9Cgoverned=E2=80=9D) by
+ policies defined by the deployment environment. The purpose of the=
EGT
+ is then to enable access to resources held by the Guvnor repositor=
y, so
+ they can be used in development. Thus, limited capabilities for re=
ading, writing, adding,
+ and removing Guvnor repository resources are provided in the
+ EGT.
+
+
+ Guvnor Tools Key Features
+
+ The following table lists all valuable features of the Guvnor
+ Tools.
+
+ Key Functionality of Guvnor Tools
+
+
+
+
+
+
+
+
+ Feature
+ Benefit
+ Chapter
+
+
+
+
+
+
+
+ Guvnor Repositories View
+
+
+ The purpose of the view is to enable acc=
ess to Guvnor repository
+ resources in a standard tree format
+
+
+ Guv=
nor Repositories View
+
+
+
+
+
+ Guvnor Connection Wizard
+
+
+ The wizard helps to create a connection =
to a Guvnor
+ repository.
+
+
+ Guvnor Con=
nection Wizard
+
+
+
+
+
+ Guvnor Resource History View
+
+
+ This view shows revisions of specific re=
sources available in the
+ repository.
+
+
+ Guvnor R=
esource History View
+
+
+
+
+
+ Resources from Guvnor Wizard
+
+
+ The wizard helps to get local copies of =
Guvnor repository
+ resources.
+
+
+ Import=
ing Guvnor Repository
+ Resources
+
+
+
+
+
+ A number of actions for working with fil=
es
+
+
+ The Guvnor actions (available through th=
e
+ Guvnor
+ context menu on files) are pro=
vided for working with
+ files, both those associated with Guvnor r=
epository master copies
+ and those not associated.
+
+
+ Actions for Local Gu=
vnor Resources
+
+
+
+
+
+
+
+
+
+ How to start with Guvnor Tools
+
+ Guvnor Tools is a par=
t of the JBoss Tools
+ project. Thus to get started with =
Guvnor Tools, you should have the following:
+
+
+
+ Eclipse 3.4.x with Jboss Tools bundle of Eclipse plu=
gins installed. How to
+ install JBoss Tools onto Eclipse you can find in the <=
ulink url=3D"../../GettingStartedGuide/html_single/index.html#JBossToolsIns=
tall">"JBoss Tools
+ Installation" section.
+
+
+
+ JBoss Server 4.2 or higher with Guvnor repository de=
ployed. Thus, you should
+ download Guvnor CR1 a=
nd extract it to the deploy directory of the
+ server.
+
+
+
+ Now refer to the "F=
unctionality
+ Overview" section to find out what you can do with =
Guvnor and
+ Eclipse synchronisation tool.
+
+
+
+ Other relevant resources on the topic
+
+
+
+ Guvnor wiki page
+
+ =
+
+ Drools on JBoss.org
+
+
+
+
+ JBoss Tools=
Home Page
+
+
+
+
+
+ The latest
+ JBossTools/JBDS documentation builds
+
+
+
+
+
+ JBossTools=
/JBDS
+ release documentation
+
+
+
+
+
+
+ =
+
+
+
+
+ JBoss Tools
+ Eclipse Guvnor Tools
+
+
+
+ Functionality Overview
+
+ This chapter will introduce you to the Guvnor Repository Exploring
+ perspective and give an overview on all functionali=
ty the Guvnor Tools provides.
+
+
+ Guvnor Perspective
+
+ The Guvnor Repository Exploring =
perspective contains two views
+ supplied by EGT =E2=80=
=93 Repository Explorer and
+ Version History, th=
at will be the center of most interaction
+ with Guvnor, and Eclipse standard views such as Properties and
+ Resource Navigator =
that are also useful.
+
+ While each of these views can be opened and positioned indep=
endently within an Eclipse
+ workbench, the Guvnor perspective<=
/property> provides a convenient method of
+ getting a suggested layout. In the Eclipse workbench menu, cho=
ose
+ Window > Open Perspective &=
gt; Other
+ to get the perspective list:
+
+
+ Enabling the Guvnor Repository Perspective
+
+
+
+
+
+
+
+ And then choose
+ Guvnor Repository Exploring. This opens the
+ Guvnor perspective.=
+
+
+
+ Guvnor Connection Wizard
+
+ After opening the Guvnor perspec=
tive, the first task is to make a
+ connection to a Guvnor repository. This is handled by the Guvnor Connection
+ wizard. This wizard appears in a number of plac=
es within the
+ EGT (as detailed be=
low), but in this section we will cover only
+ the two most basic entry points.
+
+ The Guvnor Connection wizard can be started in the following
+ ways:
+
+
+
+ using the Eclipse menu
+ File > New > Oth=
er > Guvnor > Guvnor
+ repository location
+
+
+
+ New Guvnor Repository Location
+
+
+
+
+
+
+
+
+
+ in the Guvnor Repositori=
es view using the drop-down menu
+
+
+ Adding New Guvnor Connection
+
+
+
+
+
+
+
+
+
+ using the menu button =
+ (
+
+
+
+ )
+
+
+
+
+ Choosing either of these will start the Guvnor Connection
+ wizard.
+ =
+
+ Guvnor Connection Wizard
+
+
+
+
+
+
+
+ Default values appear in the
+ Location,
+
+ Port, an=
d
+ Repository
+ fields (See the =E2=80=9CGuvnor Preferences=E2=80=9D section below for details=
about how to
+ change these default values.) Of course, any of these fields c=
an be edited by typing in
+ the corresponding text box. Drag-and-drop or paste into the
+ Location
+ field of a typical Guvnor repository URL such as:<=
/para>
+
+
+
+ http://localhost:8080/drools-g=
uvnor/org.drools.guvnor.Guvnor/webdav
+
+
+
+ Results in the URL being parsed into the respective fields a=
s well. The authentication
+ information (user name and password) can optionally be stored =
in the Eclipse
+ workbench's key-ring file based on the selection of
+ Save user name and password.
+
+
+ Note:
+ If the authentication information is not stored in the k=
ey-ring, then the
+ EGT uses a sess=
ion authentication, what means that the
+ credentials supplied are used only for the lifetime of the=
Eclipse workbench
+ instance.
+
+
+ If authentication information is not stored in the key-ring =
or the authentication
+ information (key-ring or session) is not valid, the EGT will prompt
+ for authentication information when it has to access the Guvno=
r repository.
+
+ If authentication fails, the EGT=
will retry once and then issue
+ an authentication failure error.
+
+
+ Tip:
+ If an authentication failure error occurs, you can retry=
the same operation and
+ supply different authentication information.
+
+
+ Note that the EGT cal=
ls the Guvnor repository at various times,
+ such as when determining if resource updates are available. Th=
us if you use session
+ authentication, the authentication dialog will appear at diffe=
rent times during the
+ Eclipse workbench session, depending on what actions you take.=
For ease of use, we
+ recommend saving the authentication information in the Eclipse=
key-ring.
+
+
+ Note:
+ The Eclipse key-ring file is distinct from key-ring file=
s found in some platforms
+ such as Mac OS X and many forms of Linux. Thus, sometimes =
if you access a Guvnor
+ repository outside the EGT, the key-ring files might become
+ unsynchronized and you will be unexpectedly prompted for a=
uthentication in Eclipse.
+ This is nuisance, but your usual credentials should apply =
in this case.
+
+
+
+
+ Guvnor Repositories View
+
+ The Guvnor Repositories view contains tree structures for Guvnor
+ repository contents. =
+
+
+ Guvnor Repositories View
+
+
+
+
+
+
+
+ You can perform the following actions under the resources in the
+ Guvnor Repositories view:
+
+
+
+ create a new Guvnor repository connection. How to do=
this is describe above in the "Guvnor =
Connection Wizard" section.
+
+
+
+ remove a Guvnor repository connection. Use the Delet=
e button =
+ (
+
+
+
+ ) in the tool-bar or the
+ Delete option in t=
he context menu to remove a repository connection.
+
+
+
+ refresh Guvnor repository resorces. Use the
+ Refresh context me=
nu item to reload a tree content for the selected node.
+
+
+
+ make use of "drill-into" functionality. It's represe=
nted by a number of tool-bar/context menu items such as Go Home
+ (
+
+
+
+ ), Go Back
+ (
+
+
+
+ ) and
+ Go Into
+ (
+
+
+
+ ).
+
+
+
+ Drill-down is useful when working with deeply nested tree st=
ructures and when you wish to concentrate on only branch of the tree. For e=
xample, drilling into the
+ "defaultPackage" n=
ode changes the tree view to:
+
+
+ Going Into the "defaultPackage"
+
+
+
+
+
+
+
+ Clicking on the Go Home button (
+
+
+
+ ) or selecting
+ Go Home in the con=
text menu returns the tree to the top-level structure shown in the previou=
s picture above.
+
+
+ There are a number of operations that can be performed on Guvnor re=
pository files. Selecting a file in
+the Guvnor repository causes the Eclipse Prope=
rties view to update with details about that file:
+
+
+
+ Guvnor Repository Files Properties
+
+
+
+
+
+
+
+
+
+
+
+ Local Copies of Guvnor Files
+
+ As mentioned in the "Introduc=
tion", the main purpose
+ of the EGT is to allow =
development using resources held in a Guvnor
+ repository. There are two method of getting local copies of Gu=
vnor repository
+ resources:
+
+
+
+ Drag-and-drop from the G=
uvnor Repositories view
+
+
+ Using the Im=
port from Guvnor
+ wizard, as described further in this docume=
nt
+
+
+
+ When local copies of Guvnor repository files are created, th=
e EGT
+ sets an association between the local copy and the master file=
in the repository. This
+ information is kept in the (normally) hidden
+ .guvnorinfo
+ folder in the local project and, like all metadata=
, should not be changed by
+ end users.
+
+
+ .guvnorinfo metadata
+
+
+ =
imagedata>
+
+
+
+
+ The association allows for operations such as update and commit in
+ synchronization with the master copy held in the Guvnor reposi=
tory.
+
+ The EGT decorates loc=
al resources associated with Guvnor
+ repository master copies. This decoration appears in Eclipse v=
iews conforming to the
+ Eclipse Common Navigator framework, such as the Eclipse Resource
+ Navigator and the Java Package Explorer. On the image
+ above you can see the
+ Dummy rule.drl file with the decoration in the Resource=
Navigator. The Guvnor icon decorator is on the top right of the=
file image, and the Guvnor
+ revision details are appended to the file name. (The presence/=
location of these can be
+ changed the =
Guvnor
+ Preferences.)
+
+ Here we see that, Dumm=
y role.drl is associated with a Guvnor repository
+ resource and the local copy is based on revision 0, with a 02-10-2008, 4:21:53 date/time
+ stamp. The file Sample.d=
rl, however, is not associated with a Guvnor reposito=
ry
+ file. Further details about the association can be found in th=
e standard Eclipse
+ properties page, accessed via the Properties option in the context menu:
+
+
+ Association Details
+
+
+
+
+
+
+
+ The EGT contributes a=
property page to the standard Eclipse
+ properties dialog, the contents of which are shown above. It d=
isplays the specific Guvnor
+ repository, the location within the repository, the version (d=
ate/time stamp) and
+ the revision number.
+
+
+
+ Actions for Local Guvnor Resources
+
+ The EGT provides a nu=
mber of actions (available through the
+ Guvnor context menu on files) for working with files, both those associated w=
ith
+ Guvnor repository master copies and those not associated. The =
actions are:
+
+
+
+
+ Update
+
+
+
+
+ Add
+
+
+
+
+ Commit
+
+
+
+
+ Show History
+
+
+
+
+ Compare with Ve=
rsion
+
+
+
+
+ Switch to Version<=
/link>
+
+
+
+
+ Delete
+
+
+
+
+ Disconnect
+
+
+
+
+ Each of these actions is described below.
+
+
+ Update Action
+
+ The
+ Update
+ action is available for one or more Guvnor res=
ources that are not in
+ synchronization with the Guvnor repository master copies. =
These resources would not
+ be in synchronization because either/both =
+
+
+ There are local changes to these
+ resources
+ The master copies have been changed in the Guvnor reposi=
tory
+
+
+ Performing the
+ Update
+ action replaces the local file contents with t=
he current contents from
+ the Guvnor repository master copies (equivalent to
+ Switch to version<=
/link>
+ for the latest version).
+
+
+
+ Add Action
+
+ The
+ Add
+ action is available for one or more local file=
s that are not associated
+ with a Guvnor repository master copy. Choosing the
+ Add
+ action launches the Add to Guvnor wizard:
+
+
+ Add to Guvnor Wizard
+
+
+
+
+
+
+
+ The first page of the wizard asks for the selection of t=
he target Guvnor
+ repository and gives the choice to create a new Guvnor rep=
ository connection (in
+ which case the second page is the same as the Guvnor Connection wizard). Once the t=
arget Guvnor repository is chosen,
+ the wizard then asks for the folder location to add the se=
lection files:
+
+
+ Selecting a Target Folder
+
+
+
+
+
+
+
+ Here the
+ "defaultPackage" folder is selected as the destination
+ location.
+
+
+ Note:
+ Note that the
+ "snapshot" folder in the Guvnor repository is read-only for
+ EGT, and he=
nce not visible as a candidate location in
+ this wizard. The Guvnor repository web administration =
tools must be used to add
+ snapshot content.
+
+
+ Clicking on
+ Finish
+ adds the selected files to the Guvnor reposito=
ry and creates an
+ association between the local and Guvnor repository files.=
+
+
+ Note:
+ Note that the wizard will not allow for overwrite of=
existing Guvnor
+ repository files. Another target location must be chos=
en.
+
+
+
+
+ Commit Action
+
+ The
+ Commit
+ action is enabled for one or more Guvnor repos=
itory associated files
+ that have local changes. The
+ Commit
+ action will write the local changes back to th=
e associated Guvnor
+ repository files and update the association for the new re=
vision created.
+
+ If a local change is based on an older revision of a fil=
e that is currently in the
+ Guvnor repository (for example, someone else changed the s=
ame file), then the
+ Commit
+ action will
+ Add to Guvnor Wizard
+
+
+
+
+
+ ask whether you wish to overwrite the current version in the
+ Guvnor repository with the local content. When such confli=
cts occur, however, you
+ should use the Eclipse Guvnor version tools, along with Ec=
lipse standard tools, to
+ determine the differences and merge content based on the c=
urrent version in the
+ Guvnor repository.
+
+
+
+ Show History Action
+
+ The
+ Show History
+ action is enable for one Guvnor repository ass=
ociated file and causes
+ the Guvnor Resource =
History view to be
+ populated with revision history for the selected file.
+
+
+
+ Compare with Version Action
+
+ The
+ Compare with Version
+ action is enabled for one Guvnor repository as=
sociated file. This action
+ first opens a wizard asking for the version for comparison=
(with the local file
+ contents):
+
+
+ Compare with Version Wizard
+
+
+
+
+
+
+
+ Once the revision is selected, the action opens the Ecli=
pse Compare
+ editor (read-only):
+
+ Eclipse Compare Editor
+
+
+
+
+
+
+
+ This editor uses Eclipse-standard comparison techniques =
to show the differences in
+ the two versions. In cases where there are no differences,=
the editor will not open,
+ rather a dialog saying that there are no differences will =
appear.
+
+ Alert Dialog
+
+
+
+
+
+
+
+
+
+ Switch to Version Action
+
+ The
+ Switch to Version
+ action is enabled for one Guvnor repository as=
sociated file.
+ First the
+ Switch to Version
+ action prompts for selection of version:
+
+
+ Select Version Window
+
+
+
+
+
+
+
+ Once the version is selected, the
+ Switch to Version
+ action replaces the local file contents with t=
hose from the revision
+ selected.
+
+
+
+ Delete Action
+
+ The
+ Delete
+ action is enabled for one or more Guvnor repos=
itory associated files.
+ After confirmation via a dialog, the
+ Delete
+ action removes the files in the Guvnor reposit=
ory and deletes local
+ metadata for the Guvnor repository association.
+
+
+ Comfirm Delete Dialog
+
+
+
+
+
+
+
+
+
+ Disconnect Action
+
+ The
+ Disconnect
+ action is enabled for one or more Guvnor repos=
itory associated files,
+ and removes local metadata for the Guvnor repository assoc=
iation.
+
+
+
+
+ Guvnor Resource History View
+
+ The Guvnor Resource History view=
should details about revision
+ history for selected files, both local and those in Guvnor rep=
ositories. The initial
+ state of this view is shown on the figure below.
+
+
+ Initial State of the Guvnor Resource History View
+
+
+
+
+
+
+
+ The Guvnor Resource History view=
is populated by
+ Show History
+ actions in either the local
+ Guvnor context menu or in the context menu for
+ a Guvnor repository file in the Guvnor
+ Repositories view. Once this action is performed, t=
he Guvnor
+ Resource History view updates to show the revis=
ion history:
+
+
+ IGuvnor Resource History View
+
+
+
+
+
+
+
+ Here we see that the file
+ test.txt
+ has three revisions. Double clicking on a revision=
row (or the context menu
+ Open (Read only))=
emphasis> opens an Eclipse read-only editor
+ with the revision contents.
+
+
+ Eclipse Read-only Editor with the Revision Contents
+
+
+
+
+
+
+
+ Note:
+ You can also use the
+ Save As...
+ option when a file is open in a read-only edit=
or to save a local
+ writable copy of the contents. Doing so, however, will not=
associate the file
+ created with its Guvnor source.
+
+
+
+
+
+ Importing Guvnor Repository Resources
+
+ In addition to the single file drag-and-drop from the Guvnor Repositories
+ view, the EGT also includes a wizard for copying one
+ or more files from a Guvnor repository to the local workspace =
(and setting the
+ association with the Guvnor repository). This wizard is availa=
ble from the
+ File > Import > Guvnor &=
gt; Resource from
+ Guvnor
+ and the
+ File > New > Other > =
Guvnor > Resource from
+ Guvnor
+ menu items.
+
+ Note:
+
+ Note that the wizard is identical but appears in both lo=
cations to accommodate
+ users who tend to view this functionality as being in eith=
er category.
+
+
+ The first page of the wizard asks for the selection of the s=
ource Guvnor repository
+ and gives the choice to create a new Guvnor repository connect=
ion (in which case the
+ second page is the same as the Guvnor Connection wizard).
+
+
+ Resource from Guvnor Wizard
+
+
+
+
+
+
+ =
+ Once the source Guvnor repository is chosen, the wizard prom=
pts for resource selection:
+
+
+ Resource Selection
+
+
+
+
+
+
+ =
+ Finally, the target location in the local workspace should b=
e chosen:
+
+ Choosing the Target Location
+
+
+
+
+
+
+ =
+ On completion the wizard copies the selected files from the =
Guvnor repository to the local workspace.
+ If a file with the same name already exists in the destination=
, the wizard uses the Eclipse standard
+ "prompt for rename" dialog:
+
+
+ Prompt for Rename Dialog
+
+
+
+
+
+
+
+
+
+ =
+
+
+
+
+ JBoss Tools
+ Eclipse Guvnor Tools
+
+
+
+ Guvnor Preferences
+
+ The EGT provides a prefer=
ence page in the
+ Guvnor
+ category:
+
+
+ Resource Selection
+
+
+
+
+
+
+
+ The preferences cover two categories:
+
+ Guvnor repository connections
+ =
+ Local Guvnor
+ repository resource decorations.
+
+
+
+ Guvnor Repository Connection Preferences
+ There are two preferences that can be set for Guvnor reposit=
ory connections, that are
+ used when creating new connections:
+
+
+
+ The first is a default Guvnor repository URL templat=
e, which can make it
+ easier to create multiple similar connections by simpl=
y changing part of the
+ field, such as the host name.
+
+
+ The second is whether saving of authentication infor=
mation in the Eclipse
+ platform key-ring should be enabled by default.
+
+
+
+ As with the Guvnor repository URL template, actually whether=
to save a specific
+ instance of authentication information in the Eclipse platform=
key-ring can be
+ determined when actually creating the connection. That is, bot=
h of these preferences are
+ simply convenience values set to reasonable defaults.
+
+
+
+ Local Guvnor Repository Resource Decoration Preferences
+
+ The second category of preferences provided by the EGT deals with how the decoration of
+ local resources associated with Guvnor repository resources is=
presented. Since the
+ Guvnor repository is not a substitute for a SCM, and since SCM=
tools in Eclipse tend to
+ decorate local resources, it is useful to be able to control j=
ust how the EGT decorate
+ its local resources to avoid messy conflicts with SCM packages=
.
+ =
+ In the
+ File Decoration
+ section of the preference page, you can choose the location (T=
op right, Top left, Bottom right,
+ Bottom left) of the decoration icon, or you can choose not to=
display it. In
+ the
+ Text sec=
tion, you can format the Guvnor metadata that is appended to the file
+ names:
+
+
+ Whether to show an indicator (>) when the local f=
ile has changes not committed back to the
+ Guvnor repository
+
+
+ Whether to show the revision number
+
+
+ Whether to show the date/time stamp
+
+ =
+ =
+ Any changes to these preferences take effect immediately upo=
n clicking the
+ Apply and th=
en
+ Ok butto=
ns.
+
+
+
+ =
+
+
+
+
+ JBoss Tools
+ Eclipse Guvnor Tools
+
+
+
+ Conclusion
+
+ As stated at the beginning of this document, the key goal of the=
EGT
+ is to provide a way of interacting with Guvnor repository resource=
s in a local Eclipse
+ workspace. While clearly there is a lot more that could be done, a=
nd no doubt there will be
+ aspects of the current tooling that require revision going forward=
, we feel that the current
+ state of the EGT is suffici=
ent for the major use cases.
+
+ If you have some questions, comments or suggestions on the topic=
, please feel free to ask in the
+ Jboss Tools Forum.
+
+
+
+
Modified: trunk/drools/docs/reference/en/master_output.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/drools/docs/reference/en/master_output.xml 2010-02-17 19:58:04 UT=
C (rev 20339)
+++ trunk/drools/docs/reference/en/master_output.xml 2010-02-17 20:35:12 UT=
C (rev 20340)
@@ -21,761 +21,1107 @@
=
=
-]>
- =
-
- Drools Tools Reference Guide
-
-
-
-
- =
-
-
- =
- =
-
- OlgaChikvina=
=
- =
- April 2008
-
- 2007
- 2009
- JBoss by Red Hat
-
-
- Version: 5.1.0.trunk
-
-
-
-
- PDF version
-
-
-
-
- =
- =
- =
- =
-
- Introduction
-
-
- What is Drools?
-
- Drools is a business =
rule management system (BRMS) with a forward
- chaining inference based rules engine, more correctly known as=
a production rule system,
- using an enhanced implementation of the Rete algorithm.
-
- In this guide we are going to get you familiar with Drools =
Eclipse plugin which
- provides development tools for creating, executing and debuggi=
ng Drools processes and
- rules from within Eclipse.
-
-
- Note:
- It is assumed that you has some familiarity with rule en=
gines and Drools in
- particular. If no, we suggest that you look carefully thro=
ugh the Drools Documentation.
-
-
- Drools Tools come bun=
dled with JBoss Tools
- set of Eclipse plugins. How to install JBoss Tools you can find in
- the Getting Started Guide.
-
-
-
- Drools Tools Key Features
-
- The following table lists all valuable features of the Drools
- Tools.
-
- Key Functionality of Drools Tools
-
-
-
-
-
-
-
-
- Feature
- Benefit
- Chapter
-
-
-
-
-
-
-
- Wizard for creating a new Drools Project=
-
-
- The wizard allows to create a sample pro=
ject to easy get started
- with Drools
-
-
- Creati=
ng a Sample Drools
- Project
-
-
-
-
-
- Wizards for creation new Drools resource=
s
-
-
- A set of wizards are provided with the D=
rools Eclipse tools to
- quickly create a new Rule resource, a new =
Domain Specific language,
- Decision Table and Business rule
-
-
- Creating a New=
Rule
-
-
-
-
-
-
- The Rule editor
-
-
- An editor that is aware of DRL syntax an=
d provides content
- assistance and synchronizing with the Outl=
ine view
-
-
- The Rule=
Editor
-
-
-
-
-
- The Domain Specific Language editor
-
-
- The editor allows to create and manage m=
appings from users
- language to the rule language
-
-
-
-
-
-
-
-
- The Guided editor
-
-
- This guided editor for rules allows you =
to build rules in a GUI
- driven fashion based on your object model<=
/para>
-
-
-
-
-
-
-
-
- The Rule Flow graphical editor
-
-
- The editor is meant for editing visual g=
raphs which represent a
- process (a rule flow)
-
-
-
-
-
-
-
-
-
-
-
-
- Other relevant resources on the topic
-
-
-
- Drools on JBoss.org
-
-
-
-
- JBoss Tools=
Home Page
-
-
-
-
-
- The latest
- JBossTools/JBDS documentation builds
-
-
-
-
- All JBoss Tools/JBDS documentation you can find on the
- docume=
ntation release
- page.
-
-
-
-
-
-
- =
-
-
-
- JBoss Tools
- Drools Tools
-
-
-
- Creating a New Drools Project
-
- In this chapter we are going to show you how to setup an executa=
ble sample Drools project
- to start using rules immediately.
-
-
-
-
- Creating a Sample Drools Project
-
- First, we suggest that you use D=
rools perspective which is aimed
- at work with Drools specific resources.
-
- To create a new Drools project follow to
- File > New > Drools Proj=
ect. This will open
- New Drools Project wizard like on the figure below.
-
- On the first page type the project name and click
- Next.
-
-
- Creating a New Drools Project
-
-
-
-
-
-
-
- Next you have a choice to add some default artifacts to it l=
ike sample rules, decision
- tables or ruleflows and Java classes for them. Let's select fi=
rst two check
- boxes and press
- Next. =
para>
-
-
- Selecting Drools Project Elements
-
-
-
-
-
-
-
- Next page asks you to specify a Drools runtime. If you have =
not yet set it up, you
- should do this now by clicking the
- Configure Workspace Settings=
property>
- link.
-
-
- Configuring Drools Runtime
-
-
-
-
-
-
-
- You should see the Preferences w=
indow where you can configure the
- workspace settings for Drools runtimes. To create a new runtim=
e, press the
- Add
- button. The appeared dialog prompts you to enter a
- name for a new runtime and a path to the Drools runtime on you=
r file system.
-
-
- Note:
- A Drools runtime is a collection of jars on your file sy=
stem that represent one
- specific release of the Drools project jars. While creatin=
g a new runtime, you must
- either point to the release of your choice, or you can sim=
ply create a new runtime
- on your file system from the jars included in the Drools E=
clipse plugin.
-
-
-
- Adding a New Drools Runtime
-
-
-
-
-
-
- =
- Let's simply create a new Drools 5 runtime from the jars emb=
edded in the
- Drools Eclipse plugin. Thus, you should press
- Create a new Drools 5 runtime<=
/property>
- button and select the folder where you want this r=
untime to be created and
- hit
- OK.
-
- You will see the newly created runtime show up in your list =
of Drools runtimes. Check
- it and press
- OK.
-
-
- Selecting a Drools Runtime
-
-
-
-
-
-
-
- Now press
- Finish
- to complete the project creation.
-
-
- Completing the Drools Project Creation
-
-
-
-
-
-
-
- This will setup a basic structure, classpath and sample rule=
s and test case to get you
- started.
-
-
-
-
- Drools Project Structure Overview
-
- Now let's look at the structure of the organized project. In=
the
- Package Explorer yo=
u should see the following:
-
-
- Drools Project in the Package Explorer
-
-
-
-
-
-
-
- The newly created project contains an example rule file
- Sample.drl
- in the
- src/main/rules
- directory and an example java file
- DroolsTest.java
- that can be used to execute the rules in a Drools =
engine in the folder
- src/main/java
- , in the
- com.sample
- package. All the others jar's that are necessary d=
uring execution
- are also added to the classpath in a custom classpath containe=
r called Drools
- Library.
-
-
- Tip:
- Rules do not have to be kept in Java projects at all, th=
is is just a convenience
- for people who are already using eclipse as their Java IDE=
.
-
-
-
-
-
- Creating a New Rule
-
- Now we are going to add a new Rule resource to the project.<=
/para>
-
- You can either create an empty text
- .drl
- file or make use of the special New Rule Resource
- wizard to do it.
-
- To open the wizard follow to
- File > New > Rule Resour=
ce
- or use the menu with the JBoss Drools icon on the =
toolbar.
-
-
- Opening the New Rule Resource Wizard
-
-
-
-
-
-
-
- On the wizard page first select
- /rules
- as a top level directory to store your rules and t=
ype the rule name. Next
- it's mandatory to specify the rule package name. It defines a =
namespace that
- groups rules together.
-
-
- New Rule Resource Wizard
-
-
-
-
-
-
-
- As a result the wizard generates a rule skeleton to get you =
started.
-
-
- New Rule
-
-
-
-
-
-
-
-
-
-
-
- =
-
-
-
- JBoss Tools
- Drools Tools
-
-
-
- Debugging rules
- =
- This chapter describes how to debug rules during the execution of y=
our Drools application.
-
-
- Creating Breakpoints
- =
- At first, we'll focus on how to add
- breakpoints in the consequences of your rules.
- =
- Whenever such a breakpoint is uncounted
- during the execution of the rules, the execution is halted. It's possib=
le then inspect the
- variables known at that point and use any of the default debugging acti=
ons to decide what
- should happen next (step over, continue, etc). To inspect
- the content of the working memory and agenda the Debug views can be use=
d.
-
- You can add/remove rule breakpoints in
- .drl
- files in two ways, similar to adding breakpoints to Java fi=
les:
-
-
-
- Double-click the ruler in the Rule e=
ditor at the line
- where you want to add a breakpoint.
-
- Tip:
- Note that rule breakpoints can only be created in the consequen=
ce of a
- rule. Double-clicking on a line where no breakpoint is allowed will =
do
- nothing.
-
- A breakpoint can be removed by double-clicking the ruler once mo=
re.
-
-
-
- Right-click the ruler. Select
- Toggle Breakpoint
- action in the appeared popup menu. Clicking the action wi=
ll add a
- breakpoint at the selected line or remove it if there is one already.=
-
-
-
-
- Adding Breakpoints
-
-
- =
imagedata>
-
-
-
-
- The Debug perspective conta=
ins a Breakpoints
- view which can be used to see all defined breakpoints, get =
their
- properties, enable/disable or remove them, etc. You can switch to it by=
navigating to
- Window > Perspective > Others > D=
ebug.
-
-
-
- Debugging
-
- Drools breakpoints are only enabled if you debug your application =
as a Drools
- Application. To do this you should perform one of the actions:
-
-
-
- Select the main class of your application. Right click it and se=
lect
- Debug As > Drools Application.
-
-
-
- Debugging Drools Application
-
-
- =
imagedata>
-
-
-
-
-
-
- Alternatively, you can also go to
- Debug As > Debug Configuration
- to open a new dialog for creating, managing and running d=
ebug
- configurations.
-
- Select the
- Drools Application
- item in the left tree and click the
- New launch configuration
- button (leftmost icon in the toolbar above the tree). Thi=
s will
- create a new configuration and already fill in some of the properties=
(like the
- Project and Main class) based on main class you selected in the begin=
ning. All
- properties shown here are the same as any standard Java program.
-
-
-
-
- New Debug Configuration
-
-
- =
imagedata>
-
-
-
-
-
- Tip:
- Remember to change the name of your debug configuration to someth=
ing meaningful.
-
- =
- Next
- click the
- Debug
- button on the bottom to start debugging your application. <=
/para>
-
- After enabling the debugging, the application starts executing and=
will halt if
- any breakpoint is encountered. This can be a Drools rule breakpoint, or=
any other
- standard Java breakpoint. Whenever a Drools rule breakpoint is encounte=
red, the
- corresponding
- .drl file is opened =
and the active line is highlighted. The Variables view
- also contains all rule parameters and their value. You can then use the=
default Java
- debug actions to decide what to do next (resume, terminate, step over, =
etc.). The debug
- views can also be used to determine the contents of the working memory =
and agenda at
- that time as well (you don't have to select a working memory now, the c=
urrent executing
- working memory is automatically shown).
- =
- =
-
-
-
- =
-
-
-
- JBoss Tools
- Drools Tools
-
-
-
- Editors
-
-
- The Rule Editor
-
- The Rule editor works=
on files that have a
- .drl
- (or
- .rule
- in the case of spreading rules across multiple rul=
e files) extension.
-
-
- New Rule
-
-
-
-
-
-
-
- The editor follows the pattern of a normal text editor in ec=
lipse, with all the normal
- features of a text editor:
-
-
-
-
- Content =
Assist
-
-
-
-
-
- Code Foldi=
ng
-
-
-
-
-
-
-
- Synch=
ronization with Outline
- View
-
-
-
-
-
- Content Assist
-
- While working in the Rule ed=
itor you can get a content
- assistance the usual way by pressing
- Ctrl + Space.=
emphasis>
-
- Content Assist shows all possible keywords for the curre=
nt cursor position.
-
-
- Content Assist Demonstration
-
-
-
-
-
-
-
- Content Assist inside of the
- Message
- suggests all available fields.
-
-
- Content Assist Demonstration
-
-
-
-
-
-
-
-
-
-
- Code Folding
-
- Code folding is also available in the Rule editor. To
- hide/show sections of the file use the icons with minus/pl=
us on the left vertical
- line of the editor.
-
-
- Code Folding
-
-
-
-
-
-
-
-
-
-
-
-
- Synchronization with Outline View
-
- The Rule editor w=
orks in synchronization with the
- Outline view wh=
ich shows the structure of the rules,
- imports in the file and also globals and functions if the =
file has them.
-
-
- Synchronization with Outline View
-
-
-
-
-
-
-
- The view is updated on save. It provides a quick way of =
navigating around rules by
- names in a file which may have hundreds of rules. The item=
s are sorted
- alphabetically by default.
-
-
-
- The Rete Tree View
-
- The Rete Tree view shows you the current Rete Network for
- your
- .drl
- file. Just click on the
- Rete Tree tab
- at the bottom of the Rule editor.
-
-
- Rete Tree
-
-
-
-
-
-
-
- Afterwards you can generate the current Rete Network vis=
ualization. You can push
- and pull the nodes to arrange your optimal network overvie=
w.
- If you got hundreds of nodes, select some of them with a=
frame. Then you can pull
- groups of them.
-
-
- Selecting the nodes in the Rete Tree with Frame
-
-
-
-
-
-
-
- You can zoom in and out the Rete tree in case not all no=
des are shown in the
- current view. For this use the combo box or "+" and "-" ic=
ons on the toolbar.
-
-
- Rete Tree Zooming
-
-
-
-
-
-
-
-
- Note:
-
- The Rete Tree view works only in Drools Rule Projects,
- where the Drools Builder is set in the project propert=
ies.
-
- We hope, this guide helped you to get started with the J=
Boss BPMN Convert module. Besides, for additional information you are welco=
me on JBoss forum.
-
- =
-
- =
-
-
- =
- =
-
+]>
+ =
+
+ Drools Tools Reference Guide
+
+
+
+
+ =
+
+
+ =
+ =
+
+ OlgaChikvina=
=
+ =
+
+ 2007
+ 2008
+ 2009
+ 2010
+ JBoss by Red Hat
+
+
+ Version: 5.1.0.trunk
+
+
+
+
+ PDF version
+
+
+
+
+ =
+ =
+ =
+ =
+
+ Introduction
+
+
+ What is Drools?
+
+ Drools is a business =
rule management system (BRMS) with a forward
+ chaining inference based rules engine, more correctly known as=
a production rule system,
+ using an enhanced implementation of the Rete algorithm.
+
+ In this guide we are going to get you familiar with Drools =
Eclipse plugin which
+ provides development tools for creating, executing and debuggi=
ng Drools processes and
+ rules from within Eclipse.
+
+
+ Note:
+ It is assumed that you has some familiarity with rule en=
gines and Drools in
+ particular. If no, we suggest that you look carefully thro=
ugh the Drools Documentation.
+
+
+ Drools Tools come bun=
dled with JBoss Tools
+ set of Eclipse plugins. How to install JBoss Tools you can find in
+ the Getting Started Guide.
+
+
+
+ Drools Tools Key Features
+
+ The following table lists all valuable features of the Drools
+ Tools.
+
+ Key Functionality of Drools Tools
+
+
+
+
+
+
+
+
+ Feature
+ Benefit
+ Chapter
+
+
+
+
+
+
+
+ Wizard for creating a new Drools Project=
+
+
+ The wizard allows to create a sample pro=
ject to easy get started
+ with Drools
+
+
+ Creati=
ng a Sample Drools
+ Project
+
+
+
+
+
+ Wizards for creation new Drools resource=
s
+
+
+ A set of wizards are provided with the D=
rools Eclipse tools to
+ quickly create a new Rule resource, a new =
Domain Specific language,
+ Decision Table and Business rule
+
+
+ Creating a New=
Rule
+
+
+
+
+
+
+ The Rule editor
+
+
+ An editor that is aware of DRL syntax an=
d provides content
+ assistance and synchronizing with the Outl=
ine view
+
+
+ The Rule=
Editor
+
+
+
+
+
+ The Domain Specific Language editor
+
+
+ The editor allows to create and manage m=
appings from users
+ language to the rule language
+
+
+ The Domain Specific Language=
Editor
+
+
+
+
+
+ The Guided editor
+
+
+ This guided editor for rules allows you =
to build rules in a GUI
+ driven fashion based on your object model<=
/para>
+
+
+
+
+
+
+
+
+ The Rule Flow graphical editor
+
+
+ The editor is meant for editing visual g=
raphs which represent a
+ process (a rule flow)
+
+
+ The Rule Flow Graphical=
Editor
+
+
+
+
+
+
+
+
+
+ Other relevant resources on the topic
+
+
+
+ Drools on JBoss.org
+
+
+
+
+ JBoss Tools=
Home Page
+
+
+
+
+
+ The latest
+ JBossTools/JBDS documentation builds
+
+
+
+
+ All JBoss Tools/JBDS documentation you can find on the
+ docume=
ntation release
+ page.
+
+
+
+
+
+
+ =
+
+
+
+ JBoss Tools
+ Drools Tools
+
+
+
+ Creating a New Drools Project
+
+ In this chapter we are going to show you how to setup an executa=
ble sample Drools project
+ to start using rules immediately.
+
+
+
+
+ Creating a Sample Drools Project
+
+ First, we suggest that you use D=
rools perspective which is aimed
+ at work with Drools specific resources.
+
+ To create a new Drools project follow to
+ File > New > Drools Proj=
ect. This will open
+ New Drools Project wizard like on the figure below.
+
+ On the first page type the project name and click
+ Next.
+
+
+ Creating a New Drools Project
+
+
+
+
+
+
+
+ Next you have a choice to add some default artifacts to it l=
ike sample rules, decision
+ tables or ruleflows and Java classes for them. Let's select fi=
rst two check
+ boxes and press
+ Next. =
para>
+
+
+ Selecting Drools Project Elements
+
+
+
+
+
+
+
+ Next page asks you to specify a Drools runtime. If you have =
not yet set it up, you
+ should do this now by clicking the
+ Configure Workspace Settings=
property>
+ link.
+
+
+ Configuring Drools Runtime
+
+
+
+
+
+
+
+ You should see the Preferences w=
indow where you can configure the
+ workspace settings for Drools runtimes. To create a new runtim=
e, press the
+ Add
+ button. The appeared dialog prompts you to enter a
+ name for a new runtime and a path to the Drools runtime on you=
r file system.
+
+
+ Note:
+ A Drools runtime is a collection of jars on your file sy=
stem that represent one
+ specific release of the Drools project jars. While creatin=
g a new runtime, you must
+ either point to the release of your choice, or you can sim=
ply create a new runtime
+ on your file system from the jars included in the Drools E=
clipse plugin.
+
+
+
+ Adding a New Drools Runtime
+
+
+
+
+
+
+ =
+ Let's simply create a new Drools 5 runtime from the jars emb=
edded in the
+ Drools Eclipse plugin. Thus, you should press
+ Create a new Drools 5 runtime<=
/property>
+ button and select the folder where you want this r=
untime to be created and
+ hit
+ OK.
+
+ You will see the newly created runtime show up in your list =
of Drools runtimes. Check
+ it and press
+ OK.
+
+
+ Selecting a Drools Runtime
+
+
+
+
+
+
+
+ Now press
+ Finish
+ to complete the project creation.
+
+
+ Completing the Drools Project Creation
+
+
+
+
+
+
+
+ This will setup a basic structure, classpath and sample rule=
s and test case to get you
+ started.
+
+
+
+
+ Drools Project Structure Overview
+
+ Now let's look at the structure of the organized project. In=
the
+ Package Explorer yo=
u should see the following:
+
+
+ Drools Project in the Package Explorer
+
+
+
+
+
+
+
+ The newly created project contains an example rule file
+ Sample.drl
+ in the
+ src/main/rules
+ directory and an example java file
+ DroolsTest.java
+ that can be used to execute the rules in a Drools =
engine in the folder
+ src/main/java
+ , in the
+ com.sample
+ package. All the others jar's that are necessary d=
uring execution
+ are also added to the classpath in a custom classpath containe=
r called Drools
+ Library.
+
+
+ Tip:
+ Rules do not have to be kept in Java projects at all, th=
is is just a convenience
+ for people who are already using eclipse as their Java IDE=
.
+
+
+
+
+
+ Creating a New Rule
+
+ Now we are going to add a new Rule resource to the project.<=
/para>
+
+ You can either create an empty text
+ .drl
+ file or make use of the special New Rule Resource
+ wizard to do it.
+
+ To open the wizard follow to
+ File > New > Rule Resour=
ce
+ or use the menu with the JBoss Drools icon on the =
toolbar.
+
+
+ Opening the New Rule Resource Wizard
+
+
+
+
+
+
+
+ On the wizard page first select
+ /rules
+ as a top level directory to store your rules and t=
ype the rule name. Next
+ it's mandatory to specify the rule package name. It defines a =
namespace that
+ groups rules together.
+
+
+ New Rule Resource Wizard
+
+
+
+
+
+
+
+ As a result the wizard generates a rule skeleton to get you =
started.
+
+
+ New Rule
+
+
+
+
+
+
+
+
+
+
+
+ =
+
+
+
+ JBoss Tools
+ Drools Tools
+
+
+
+ Debugging rules
+ =
+ This chapter describes how to debug rules during the execution of y=
our Drools application.
+
+
+ Creating Breakpoints
+ =
+ At first, we'll focus on how to add
+ breakpoints in the consequences of your rules.
+ =
+ Whenever such a breakpoint is uncounted
+ during the execution of the rules, the execution is halted. It's possib=
le then inspect the
+ variables known at that point and use any of the default debugging acti=
ons to decide what
+ should happen next (step over, continue, etc). To inspect
+ the content of the working memory and agenda the Debug views can be use=
d.
+
+ You can add/remove rule breakpoints in
+ .drl
+ files in two ways, similar to adding breakpoints to Java fi=
les:
+
+
+
+ Double-click the ruler in the Rule e=
ditor at the line
+ where you want to add a breakpoint.
+
+ Tip:
+ Note that rule breakpoints can only be created in the consequen=
ce of a
+ rule. Double-clicking on a line where no breakpoint is allowed will =
do
+ nothing.
+
+ A breakpoint can be removed by double-clicking the ruler once mo=
re.
+
+
+
+ Right-click the ruler. Select
+ Toggle Breakpoint
+ action in the appeared popup menu. Clicking the action wi=
ll add a
+ breakpoint at the selected line or remove it if there is one already.=
+
+
+
+
+ Adding Breakpoints
+
+
+ =
imagedata>
+
+
+
+
+ The Debug perspective conta=
ins a Breakpoints
+ view which can be used to see all defined breakpoints, get =
their
+ properties, enable/disable or remove them, etc. You can switch to it by=
navigating to
+ Window > Perspective > Others > D=
ebug.
+
+
+
+ Debugging
+
+ Drools breakpoints are only enabled if you debug your application =
as a Drools
+ Application. To do this you should perform one of the actions:
+
+
+
+ Select the main class of your application. Right click it and se=
lect
+ Debug As > Drools Application.
+
+
+
+ Debugging Drools Application
+
+
+ =
imagedata>
+
+
+
+
+
+
+ Alternatively, you can also go to
+ Debug As > Debug Configuration
+ to open a new dialog for creating, managing and running d=
ebug
+ configurations.
+
+ Select the
+ Drools Application
+ item in the left tree and click the
+ New launch configuration
+ button (leftmost icon in the toolbar above the tree). Thi=
s will
+ create a new configuration and already fill in some of the properties=
(like the
+ Project and Main class) based on main class you selected in the begin=
ning. All
+ properties shown here are the same as any standard Java program.
+
+
+
+
+ New Debug Configuration
+
+
+ =
imagedata>
+
+
+
+
+
+ Tip:
+ Remember to change the name of your debug configuration to someth=
ing meaningful.
+
+ =
+ Next
+ click the
+ Debug
+ button on the bottom to start debugging your application. <=
/para>
+
+ After enabling the debugging, the application starts executing and=
will halt if
+ any breakpoint is encountered. This can be a Drools rule breakpoint, or=
any other
+ standard Java breakpoint. Whenever a Drools rule breakpoint is encounte=
red, the
+ corresponding
+ .drl file is opened =
and the active line is highlighted. The Variables view
+ also contains all rule parameters and their value. You can then use the=
default Java
+ debug actions to decide what to do next (resume, terminate, step over, =
etc.). The debug
+ views can also be used to determine the contents of the working memory =
and agenda at
+ that time as well (you don't have to select a working memory now, the c=
urrent executing
+ working memory is automatically shown).
+ =
+ =
+
+
+
+ =
+
+
+
+ JBoss Tools
+ Drools Tools
+
+
+
+ Editors
+
+ DSL Editor
+ A domain-specific language is a set of custom rules,
+ that is created specifically to solve problems in a particular=
domain =
+ and is not intended to be able to solve problems outside it.
+ A DSL's configuration is stored in plain text. =
+
+ In Drools this configuration is presented by .dsl
+ files that can be created by right click on th=
e project->New->Other->Drools->Domain Specific Language.
+ DSL Editor is a default editor for .d=
sl file=
s:
+
+ DSL Editor
+
+
+
+
+
+
+ In the table below all the components of the DSL Editor page are descri=
bed:
+
+ DSL Editor Components. =
+
+
+
+ =
+
+
+ Components =
+ Description
+
+
+
+
+ Description
+ User's comments on a certain language message mapping<=
/diffmk:wrapper>
+ =
+
+ Table of language message mappings
+ The table is divided into 4 rows:
+
+ Language Expression :expression you want to use as a rule
+ Rule Language Mapping :the implementation of the rules.This means=
that to this language expression the rule will be compiled =
+ by the rule engine compiler.
+ Object :name of the object
+ Scope :indicates where the expression is
+ targeted: is it for the "condition" part o=
f the rule ,"consequence" part, etc.
+
+ By clicking on some row's header you can sort the=
lines in the table according to the clicked row.
+ By double clicking on the line <=
link diffmk:change=3D"added" linkend=3D"edit_wizard">Edit language mapping Wizard will be open. =
+
+ =
+
+ Expression
+ Shows the language expression of the selected table li=
ne(language message mapping).
+ =
+ =
+
+ Mapping
+ Shows the rule of language mapping for the selected ta=
ble line(language message mapping).
+ =
+
+ Object
+ Shows the object for the selected table line(language =
message mapping)
+ =
+
+
+ Sort By
+ Using this option you can change the type of lines sor=
ting =
+ in the table of language message mappings.To d=
o this select from the drop down lins the method
+ of sorting you want and click =
Sort bu=
tton.
+
+
+ Buttons
+
+ Edit :by clicking the button users can edit
+ selected in the table of language message =
mappings lines.For more information look
+ Edit =
language mapping Wizardsection.
+ Remove :if you click the button the selected mapping line will be=
deleted.
+ Add :with this button you can add new mapping lines to the table.=
For more information look =
+ Add la=
nguage mapping Wizardsection.
+ Sort : please, for more information go here
+ Copy :with this button you can add new mapping lines to the table
+ in which all the information will be copie=
d from the selected mapping line.
+
+
+ =
+
+
+
+
+ Edit language mapping Wizard
+ This wizard can be opened by double clicking some line =
+ in the table of language message mappings or by clicking t=
he Editbutton.
+ On the picture below you can see all the options,Edit language mapp=
ing Wizard allow to change.
+ Their names as well as the meaning of the options are correspond to=
the rows of the table.
+
+ Edit language mapping Wizard
+
+
+
+
+
+
+ To change the mapping a user should edit the otions he want and fin=
ally click Ok.
+
+
+ Add language mapping Wizard
+ This wizard is equal to Edit la=
nguage mapping Wizard.
+ It can be opened by clicking the Add button.
+
+ The only difference is that instead of editing the information you =
should enter new one.
+
+ Add language mapping Wizard
+
+
+
+
+
+
+ =
+
+
+ Flow Editor
+ Drools tools also provide some functionality to define the order in =
+ which rules should be executed.Ruleflow file allows you to spe=
cify =
+ the order in which rule sets should be evaluated using a flow =
chart.
+ So you can define which rule sets should be evaluated in seque=
nce or in parallel as well as
+ specify conditions under which rule sets should be evaluated.<=
/diffmk:wrapper>
+ Ruleflows can be set only by using the graphical flow editor which is p=
art of the Drools plugin for Eclipse.
+ Once you have set up a Drools project,you can start adding rul=
eflows.
+ Add a ruleflow file(.rf) by clicking on the project and select=
ing "New -> Other...->Flow File": =
+
+ RuleFlow file creation
+
+
+
+
+
+
+ By default these ruleflow files (.rf) are opened in the graphical Flow =
editor.
+ You can see it on the picture below.
+
+ Flow Editor
+
+
+
+
+
+
+ The Flow editor consists of a palette=
, a canv=
as
+ and an outline view. To add new elements to the canva=
s, select the =
+ element you would like to create in the palette and then add i=
t to the canvas by clicking on the preferred location.
+
+
+ Adding an element to the canvas
+
+
+
+
+
+
+ Clicking on the Select option in the palette and
+ then on the element in your ruleflow allows you to =
+ view and set the properties of that element in the properies v=
iew.
+
+ Properties view
+
+
+
+
+
+
+ Outline View is useful for big complex schemata where not all nodes are=
seen at one time.
+ So using your Outline view you can easly navigate between parts of=
a schema.
+
+ Outline view usage
+
+
+
+
+
+
+
+ Different types of control elements in Flow Palette
+ Flow editor supports three types of control elements.
+ They are:
+
Flow Palette Components.Part 1 =
+
+
+
+
+ =
+
+
+ Component Picture
+ Component Name =
+ Description
+
+
+
+
+
+
+
+
+ Select
+ Select a node on the canvas
+
+
+
+
+
+
+ Marquee
+ Is used for selecting a group of elements
+
+
+
+
+
+
+ Sequence Flow
+ Use this element to join two elements on the canva=
s
+
+
+ =
+
+
+
+ =
+
+ Different types of nodes in Flow Palette
+ =
+ Currently, ruleflow supports seven types of nodes.
+ In the table below you can find information about them:
+
Flow Palette Components.Part 2. =
+
+
+
+
+ =
+
+
+ Component Picture
+ Component Name =
+ Description
+
+ =
+
+
+
+
+
+
+
+ Start Event
+ The start of the ruleflow. A ruleflow should have =
exactly =
+ one start node. The Start Event can not have incoming
+ connections and should have one outgoing c=
onnection. Whenever the ruleflow process is started, =
+ the executing is started here and is autom=
atically proceeded to the first node =
+ linked to this Start Event
+
+
+
+
+
+
+ End Event
+ A ruleflow file can have one or more End Events.
+ The End =
Event n=
ode should have one incoming connection
+ and can not have outgoing connections. Whe=
n an end node is reached in the ruleflow,
+ the ruleflow is terminated (including othe=
r remaining active nodes when parallelism
+ is used).
+ =
+
+ =
+
+
+
+ Rule Task
+ represents a set of rules. A Rule =
Task no=
de should have one
+ incoming connection and one outgoing conne=
ction. =
+ The Rule=
FlowGroup property which is used to specify the name of the
+ ruleflow-group that represents the set of =
rules of this Rule Task node.
+ When a Rule Task node is reached =
in the ruleflow, the engine will start
+ executing rules that are a part of the cor=
responding ruleflow-group.
+ Execution automatically continues to the n=
ext node when there are no
+ more active rules in this ruleflow-group. =
+
+
+
+ =
+
+
+
+ Gateway[diverge]
+ allows you to create branches in your ruleflow.
+ A Gatewa=
y[diverge] node should have one incoming connection and two or more
+ outgoing connections.
+
+
+ =
+
+
+
+ Gateway[converge]
+ allows you to synchronize multiple branches.
+ A Gatewa=
y[diverge]node should have two or more incoming connections and one
+ outgoing connection.
+ =
+
+ =
+
+
+
+ Reusable Sup-Process
+ represents the invocation of another ruleflow from=
this ruleflow.
+ A subflow node should have one incoming co=
nnection and one outgoing connection. =
+ It contains the property "processId" which=
specifies the id of the process that should be executed. =
+ When a R=
eusable Sup-Process node is reached in the ruleflow, the engine will start the pro=
cess with the given id.
+ The subflow node will only continue if tha=
t subflow process has terminated its execution.
+ Note that the subflow process is started a=
s an independent process, =
+ which means that the subflow process will =
not be terminated if this process reaches an end node.
+
+
+ =
+
+
+
+ Script Task
+ represents an action that should be executed in th=
is ruleflow.
+ An Scrip=
t Task =
node should have one incoming connection and one outgoing
+ connection. It contains the property "acti=
on" which specifies the action that should be executed.
+ When a S=
cript Task node is reached in the ruleflow, it will execute the action and =
+ continue with the next node. An action sho=
uld be specified as a piece of (valid)
+ MVEL code.
+
+
+
+
+
+
+
+ =
+
+ The Rule Editor
+
+ The Rule editor works=
on files that have a
+ .drl
+ (or
+ .rule
+ in the case of spreading rules across multiple rul=
e files) extension.
+
+
+ New Rule
+
+
+
+
+
+
+
+ The editor follows the pattern of a normal text editor in ec=
lipse, with all the normal
+ features of a text editor:
+
+
+
+
+ Content =
Assist
+
+
+
+
+
+ Code Foldi=
ng
+
+
+
+
+
+
+
+ Synch=
ronization with Outline
+ View
+
+
+
+
+
+ Content Assist
+
+ While working in the Rule ed=
itor you can get a content
+ assistance the usual way by pressing
+ Ctrl + Space.=
emphasis>
+
+ Content Assist shows all possible keywords for the curre=
nt cursor position.
+
+
+ Content Assist Demonstration
+
+
+
+
+
+
+
+ Content Assist inside of the
+ Message
+ suggests all available fields.
+
+
+ Content Assist Demonstration
+
+
+
+
+
+
+
+
+
+
+ Code Folding
+
+ Code folding is also available in the Rule editor. To
+ hide/show sections of the file use the icons with minus/pl=
us on the left vertical
+ line of the editor.
+
+
+ Code Folding
+
+
+
+
+
+
+
+
+
+
+
+
+ Synchronization with Outline View
+
+ The Rule editor w=
orks in synchronization with the
+ Outline view wh=
ich shows the structure of the rules,
+ imports in the file and also globals and functions if the =
file has them.
+
+
+ Synchronization with Outline View
+
+
+
+
+
+
+
+ The view is updated on save. It provides a quick way of =
navigating around rules by
+ names in a file which may have hundreds of rules. The item=
s are sorted
+ alphabetically by default.
+
+
+
+ The Rete Tree View
+
+ The Rete Tree view shows you the current Rete Network for
+ your
+ .drl
+ file. Just click on the
+ Rete Tree tab
+ at the bottom of the Rule editor.
+
+
+ Rete Tree
+
+
+
+
+
+
+
+ Afterwards you can generate the current Rete Network vis=
ualization. You can push
+ and pull the nodes to arrange your optimal network overvie=
w.
+ If you got hundreds of nodes, select some of them with a=
frame. Then you can pull
+ groups of them.
+
+
+ Selecting the nodes in the Rete Tree with Frame
+
+
+
+
+
+
+
+ You can zoom in and out the Rete tree in case not all no=
des are shown in the
+ current view. For this use the combo box or "+" and "-" ic=
ons on the toolbar.
+
+
+ Rete Tree Zooming
+
+
+
+
+
+
+
+
+ Note:
+
+ The Rete Tree view works only in Drools Rule Projects,
+ where the Drools Builder is set in the project propert=
ies.
+
+ We hope, this guide helped you to get started with the J=
Boss BPMN Convert module.
+ Besides, for additional information you are welcome on
+ JBoss forum.
+
+ =
+
+ =
+
+
+ =
+ =
+
--===============6474507894247521325==--