Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Version 5.6.1
Introduction Tutorial
Process Definition
User Guidance Profile: Process Engineer
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
Contents
Introduction ................................................................................................................................ 4
Part 1. Tutorial Process Overview ................................................................................................ 5
Part 2. Begin with MyTutorialProcessDiagram ............................................................................. 7
Part 3. Extend the process diagram .............................................................................................. 9
3.1 Add data .................................................................................................................................. 9
3.1.1 Define variables............................................................................................................... 9
3.1.2 Check off User Guidance ............................................................................................... 14
3.2 Define transitions .................................................................................................................. 15
3.2.1 Define conditions on transitions ................................................................................... 15
3.2.2 Check off User Guidance ............................................................................................... 23
3.3 Add a connector .................................................................................................................... 24
3.3.1 Add a connector to a task ............................................................................................. 24
3.3.2 Test a connector............................................................................................................ 28
3.3.3 Check off User Guidance ............................................................................................... 29
3.4 Run ........................................................................................................................................ 30
3.4.1 Check validation ............................................................................................................ 30
3.4.2 Configure actor selectors .............................................................................................. 30
3.4.3 Run the process............................................................................................................. 33
3.4.4 Check off User Guidance ............................................................................................... 34
3.5 Debug .................................................................................................................................... 35
3.5.1 De-activate the connector ............................................................................................ 35
3.5.2 Check off User Guidance ............................................................................................... 35
Part 4. For more tutorial examples ............................................................................................ 36
Part 5. Feedback, Questions, and More Information................................................................... 36
page 2 www.bonitasoft.com | © BonitaSoft S.A. BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
Figures
Figure 1. Begin with MyTutorialProcessDiagram (1.0) ........................................................................................... 5
Figure 2. Completed process diagram ................................................................................................................... 6
Figure 3. Open MyTutorialProcessDiagram from Menu bar ................................................................................. 7
Figure 4. Open MyTutorialProcessDiagram from Cool bar .................................................................................... 7
Figure 5. Import MyTutorialProcessDiagram from Menu bar ............................................................................... 8
Figure 6. Import MyTutorialProcessDiagram from Cool bar ................................................................................. 8
Figure 7. Save the process diagram with a new version number .......................................................................... 8
Figure 8. Change the version numbers on the process diagram and pools ........................................................... 9
Figure 9. Add a variable ....................................................................................................................................... 10
Figure 10. Add a variable for customer name ..................................................................................................... 10
Figure 11. Text variable added ............................................................................................................................ 11
Figure 12. Add a list of options variable .............................................................................................................. 11
Figure 13. Define a list of options for a variable .................................................................................................. 12
Figure 14. Add an item to a list of options ........................................................................................................... 12
Figure 15. Complete list of options variable ........................................................................................................ 13
Figure 16. Variables defined for this pool ............................................................................................................ 14
Figure 17. Select User Guidance to see the checklist .......................................................................................... 14
Figure 18. User Guidance checklist ...................................................................................................................... 15
Figure 19. Select a variable to use to enter a condition manually....................................................................... 16
Figure 20. Complete the condition expression manually .................................................................................... 16
Figure 21. Select Edit expression to define a condition ....................................................................................... 17
Figure 22. Select a variable to use to define a condition in the expression editor .............................................. 17
Figure 23. Use the expression editor to define a condition................................................................................. 18
Figure 24. Select Edit decision table to define a condition .................................................................................. 18
Figure 25. Add a row to the decision table .......................................................................................................... 19
Figure 26. Select the variable to use in the expression ....................................................................................... 20
Figure 27. Select the operator ............................................................................................................................. 20
Figure 28. Select the variable value ..................................................................................................................... 21
Figure 29. Select whether the transition is taken (or not) when the expression evaluates to true .................... 22
Figure 30. Define condition using expression editor ........................................................................................... 23
Figure 31. define condition using decision table ................................................................................................. 23
Figure 32. Add a connector .................................................................................................................................. 24
Figure 33. Select a connector to send an email ................................................................................................... 25
Figure 34. Give the connector a name and description ....................................................................................... 25
Figure 35. Configure access to an email account................................................................................................. 26
Figure 36. Create the email message ................................................................................................................... 27
Figure 37. Email connector appears in the list..................................................................................................... 28
Figure 38. Test a connector ................................................................................................................................. 28
Figure 39. Connector test executing .................................................................................................................... 29
Figure 40. Connector test successful ................................................................................................................... 29
Figure 41. Test emails show up in email box ....................................................................................................... 29
Figure 42. Activate validation .............................................................................................................................. 30
Figure 43. Non-executable elements are visible.................................................................................................. 30
Figure 44. Choose an actor selector to apply to the customer lane .................................................................... 31
Figure 45. Customer = process initiator ............................................................................................................... 31
Figure 46. Create a new actor selector to fetch sales employees ....................................................................... 32
Figure 47. Create a group by entering individuals manually ................................................................................ 32
Figure 48. Give a name and description to the actor selector ............................................................................. 33
Figure 49. Create a group containing “john” and “james” .................................................................................. 33
Figure 50. Run the process .................................................................................................................................. 33
Figure 51. Process deploying in default web applications .................................................................................... 34
Figure 52 ............................................................................................................................................................... 34
Figure 53. Debug a connector .............................................................................................................................. 35
Figure 54. Skip the unchecked connector ............................................................................................................ 35
BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012 www.bonitasoft.com | © BonitaSoft S.A. page 3
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
Introduction
Use this Introduction Tutorial to become familiar with adding executable content to a
graphical process diagram in Bonita Open Solution.
The steps explained in Part 4 follow the User Guidance checklist in Bonita Studio*. Follow
these steps to create an executable process diagram example that can be deployed (in
development mode) in Bonita web applications.
To further develop the example with customized web applications, see the next tutorial on
Application Design.)
Add data
Define global and local variables
Define single and multiple variables
Define a list of options as a variable
Define transitions
Conditions
Decision table
Add connectors
Add a connector to a task
Test a connector
Run
Debug
For more information about this set of functions, see the Process Engineer Guide in the
Bonita Open Solution online documentation. This documentation also contains detailed
information about Bonita Open Solution functionality in general.
This tutorial demonstrates how to apply most of the Bonita Studio process design features
available in the Process Engineer checklist of User Guidance (SP version). All of these same
features are also available in the open source version of Bonita Open Solution, although
there is only a single Application Developer checklist with all User Guidance features.
User Guidance, User Guidance checklists, and User Guidance profiles are explained in the
online BonitaSoft Documentation.
In both versions the application of the User Guidance checklist is the same, as shown in this
tutorial.
*The screenshots in this tutorial were taken from Bonita Studio (Subscription pack),
Teamwork edition, in Process Engineer Profile mode. This profile hides some features to
simplify the interface. Therefore, in some cases the screenshots are slightly different from
the equivalent interface in BOS. The features shown in this tutorial are the same in both
(except where noted).
page 4 www.bonitasoft.com | © BonitaSoft S.A. BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
In this tutorial you will begin with the process (MyTutorialProcessDiagram) that was
designed with the first tutorial in this series (Intro Tutorial: Process Design). If you have not
created this process diagram yourself, you can import a copy into Bonita Studio from
BonitaSoft Community Contributions.
The process diagram graphically models and can execute the following scenario:
Begin with the process diagram MyTutorialProcessDiagram (1.0), which looks like this:
When you complete this tutorial, the process diagram will look like this:
BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012 www.bonitasoft.com | © BonitaSoft S.A. page 5
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
page 6 www.bonitasoft.com | © BonitaSoft S.A. BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
If you have created the process diagram MyTutorialProcessDiagram by following the step-
by-step instruction in Introduction Tutorial: Process Design, open it now.
In Bonita Studio, go to the Menu bar and select Process > Open, or go to the Cool bar and
select Open.
To import the process diagram, first download it from BonitaSoft Community Contributions
here: http://www.bonitasoft.org/exchange/extension_view.php?eid=290. (You must be
registered and logged in as a BonitaSoft Community Forum user to access the Community
Contributions.) Save it locally.
When you have saved the process diagram, go to the Menu bar and select Process > Import,
or go to the Cool bar and select Import.
BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012 www.bonitasoft.com | © BonitaSoft S.A. page 7
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
Save this diagram with a new version. To do this, click on the process diagram outside the
pools, and click on Edit next to the process diagram name.
Leave the process name as MyTutorialProcessDiagram, and change its version to 1.1.
Change the version on the Pool Web Purchase and the Pool Deliver to 1.1 also.
page 8 www.bonitasoft.com | © BonitaSoft S.A. BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
Figure 8. Change the version numbers on the process diagram and pools
Follow this section to create an executable process from the process design.
Add variables to the process to accept and treat data input by the customer:
name
email address
product selected
credit card number and expiration date
Variables are also useful for defining conditions on transitions to direct the process down
one branch or another, so you’ll also add a variable (called confirmation) to determine the
whether the process will follow the path for “order accepted” or “order not accepted.”
As global variables are available anywhere in a process/pool, you can click on the
Web_Purchase pool, or the Customer lane or the Sales Employee lane in the Web_Purchase
pool, to define global variables.
Click anywhere in the Web_Purchase pool, and go to its Details Panel > General tab > Data
pane. Click on Add.
BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012 www.bonitasoft.com | © BonitaSoft S.A. page 9
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
Add a new variable. In Name, enter customerName. For Data type, select Text, and for
Multiplicity, select single. Leave the default value blank (no default value to be proposed).
page 10 www.bonitasoft.com | © BonitaSoft S.A. BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
The next information entered by the customer will be a product choice. Click on Add, name
the variable Products and this time select List of Options.
Add a list of items. To do this, add the Name Promotional products and description
Available products for the list, and click on Add.
BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012 www.bonitasoft.com | © BonitaSoft S.A. page 11
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
Repeat this to add two more items: mobile phone and laptop. Click on OK and then
Finish to finish.
page 12 www.bonitasoft.com | © BonitaSoft S.A. BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
Add three more variables to this process/pool using the same manipulation used to add the
text variables:
creditCardNumber = integer
expirationDate = date
confirmation = Boolean
The Web_Purchase process diagram Details panel > General tab > Data pane now looks like
this:
BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012 www.bonitasoft.com | © BonitaSoft S.A. page 13
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
There are no local variables in this process, but they would be defined in the same way as
the global variables you have just added.
To apply the User Guidance checklist, go to the Cool bar and click on User Guidance.
The User Guidance checklist will appear. Click on Define global and local variables and then
on Done.
page 14 www.bonitasoft.com | © BonitaSoft S.A. BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
As all of the variables defined in this example are single, you can mark Define single and
multiple variables as Done. The variable Products is a list of options; mark Define a list of
options as a variable as Done also.
Conditions on transitions allow you to define how the process will “know” which path to
take when there are multiple possibilities.
In this tutorial example, there is an XOR gateway – only one of the outgoing paths
(transitions) can be taken: the Sales employee either confirms or rejects the order reviewed.
Define the conditions on each of the two outgoing transitions, using a variable that will
determine which path will be taken depending on the Sales employee’s decision.
To do this, click on the transition between the XOR gateway and Pay. Go to its Details Panel
> General tab > General pane. Enter if accepted in Name. (Note that the name
appears on the process diagram.)
In Condition, use the Boolean variable confirmation. If confirmation evaluates to “true,” the
process will follow this path.
BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012 www.bonitasoft.com | © BonitaSoft S.A. page 15
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
The expression appears in the Condition field. Use it to complete the expression
“confirmation == true.”
Select Edit expression from the dropdown list. When it appears, select the variable
confirmation and complete the expression in the editor.
page 16 www.bonitasoft.com | © BonitaSoft S.A. BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
Figure 22. Select a variable to use to define a condition in the expression editor
BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012 www.bonitasoft.com | © BonitaSoft S.A. page 17
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
page 18 www.bonitasoft.com | © BonitaSoft S.A. BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
Click on Add a row, then, when it appears under Edit, on Add condition.
From the dropdown menu in the first field, select the variable Confirmation.
BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012 www.bonitasoft.com | © BonitaSoft S.A. page 19
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
page 20 www.bonitasoft.com | © BonitaSoft S.A. BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
The line in blue is now filled with a condition (the value for which the variable Confirmation
is evaluated as true.) Complete the condition in the table by choosing a decision (the action
the process will take when confirmation = true). In this case, that action is Take transition.
BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012 www.bonitasoft.com | © BonitaSoft S.A. page 21
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
Figure 29. Select whether the transition is taken (or not) when the expression evaluates to true
Define the condition Confirmation = false on the transitions between the XOR gate and Send
notification. To do this, first name the transition if rejected.
page 22 www.bonitasoft.com | © BonitaSoft S.A. BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
Go to the User Guidance checklist. Check off Define transitions as Done. Both Conditions
and Decision table under that heading will also be checked off. Click on Close.
BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012 www.bonitasoft.com | © BonitaSoft S.A. page 23
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
Add a connector to Send notification so that an email is sent if the order is rejected by the
Sales employee. (This example will show how to configure and test this connector.)
In this example, the connector will be configured to send an email using gmail. To duplicate
this action, you will need to have a gmail account.
Click on Send notification. Go to its Details panel > General tab > Connector pane. Click on
Add.
From the list of connectors that appears, click on Messaging and then on Email – send an
email. Click on Next.
page 24 www.bonitasoft.com | © BonitaSoft S.A. BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
Enter the Name Send notification and the Description This message is sent
if the order can not be filled. In Select event, finish indicates that the
connector will fire when the task has completed. If the connector fails, an exception will
occur.
BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012 www.bonitasoft.com | © BonitaSoft S.A. page 25
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
Configure access to the gmail account to use to send the email message. (This account will
not be shown in the email message sent as you can configure the From field independently
of this.) The host and port for gmail are shown below in the screenshot. Enter the User
name (in the form of the entire name@gmail.com email address) and password to access
the actual account you will use to test this example with.
page 26 www.bonitasoft.com | © BonitaSoft S.A. BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
The From field will appear in the email message, so you can enter a dummy address,
manager@example.com.
The To field will send this message to an actual address. To test it, enter an email address
you can access.
BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012 www.bonitasoft.com | © BonitaSoft S.A. page 27
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
Test the connector to see if it functions properly. Click on the Send notification connector,
then on Edit. Click on Next to pass the connector parameters wizard.
page 28 www.bonitasoft.com | © BonitaSoft S.A. BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
If the configuration is ok, the Results window will indicate “connector execution is
successful.”
There is no output defined for this connector; that is, no data is returned to the process
from its execution. Click on Back to exit the test.
Test 2
Test 1
Figure 41. Test emails show up in email box
If the connector fails to execute, find the exception in the engine log (Menu bar > Help >
Show engine log).
Go to the User Guidance checklist. Check off Add connectors as Done. Both Add a connector
to a task or pool and Test a connector under that heading will also be checked off. Click on
Close.
BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012 www.bonitasoft.com | © BonitaSoft S.A. page 29
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
3.4 Run
To run the process, all of the executable elements must be configured. To check this, click
on the process diagram (outside the pools) and confirm that Activate validation is checked.
You should see red X’s, indicating missing configuration, on the lanes Customer and Sales
employees, and on the tasks Pay and Sales Review.
To complete the configuration and run this process, define the missing “group or user” with
actor selectors.
Click on the lane Customer. Go to its Details panel > General tab > Actors pane. Select
Choose.
page 30 www.bonitasoft.com | © BonitaSoft S.A. BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
Since the customer is the initiator of this process, click on Initiator and then Finish.
The Initiator is now the actor assigned to this lane. Save the process and the validation
warnings should disappear from this lane and from Pay.
Click on the lane Sales employees. Go to its Details panel > General tab > Actors pane.
Select Create.
BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012 www.bonitasoft.com | © BonitaSoft S.A. page 31
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
For the purposes of this tutorial, assign some “test users” manually to a group called Sales
employees. To do this, click on User list – enter individuals manually and then click on Next.
Enter the Name of this group: Sales Employees, with the Description Employees
authorized to handle web sales. Click on Next.
page 32 www.bonitasoft.com | © BonitaSoft S.A. BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
Enter two of the default “users” already configured in Bonita Open Solution (that is,
configured to login with the names admin, john, jack, and james and the password bpm):
john,james. Click on Finish.
Save the process and the validation warnings should disappear from this lane.
Click anywhere on the Web_Purchase pool. Go to the Cool bar and click Run.
BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012 www.bonitasoft.com | © BonitaSoft S.A. page 33
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
The process Web_Purchase will be deployed and a form will be created in the default Bonita
web application.
A form is displayed in the web application specified in Preferences > Web > Browser.
Since you have not yet configured web forms, the default form will show un-customized
fields (in simple alphabetical order) for all of the variables in the process.
Figure 52
Go to the Cool bar and click on User Guidance. Click on Skip to skip Multi-instantiation and
configure events. Check off Run.
Click on Done for each one, then on and Close to return to Bonita Studio.
page 34 www.bonitasoft.com | © BonitaSoft S.A. BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
3.5 Debug
It is not always possible to configure working connectors while defining and testing a process
configuration. If the connector in this tutorial example is giving you headaches, try running
the process in Debug mode (that is, with the connector de-activated).
Click anywhere on the Web_Purchase pool. Go to the Cool bar and click on Debug.
Uncheck the connectors to de-activate. The solid blue indicates that the Service Task – Send
notifcation connector is selected. Click on it to de-select and skip when the process is
tested.
Click on Debug.
The process should run, deploy and present the un-customized form in the selected web
browser.
Go to the Cool bar and click on User Guidance. Click on Skip to skip Contexts. Check off
Debug.
BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012 www.bonitasoft.com | © BonitaSoft S.A. page 35
Bonita Open Solution 5.6.1 Intro Tutorial
Process Definition / Process Engineer
More information about these features can be found in the Bonita Open Solution online
documentation.
The development of the example used in the tutorial is shown in the previous tutorial for
Process Design.
A continuation of this example showing features to add and define forms, handle data,
change look’n’feels and more, can be found in the next tutorial for Application Design.
If you explore a bit more in Bonita Open Solution, you will find many more functionalities
not addressed in this Intro Tutorial.
More Functionalities
For further explanation of the features and functionalities in Bonita Open Solution, see the
Bonita Open Solution online documentation.
http://www.bonitasoft.com/resources/documentation/index.php
BonitaSoft Forum
We welcome your feedback on the BonitaSoft Forum.
Ask your questions too. Use the BonitaSoft Forum to let us have it!
http://www.bonitasoft.org/forum/
BonitaSoft Community
Join the BonitaSoft Community and get our Newsletter, access detailed information, and
more.
http://www.bonitasoft.org/register.php
More information
For more information, contact us at www.bonitasoft.com
http://www.bonitasoft.com/company/contact.php.
page 36 www.bonitasoft.com | © BonitaSoft S.A. BOS 5.6.1 Introduction Tutorial, Process Definition 1 Feb 2012