Login
Pass
Always remember me
Home > Bonita open source BPM community blog >  Subscribe in a reader
Categories
Blogroll
Meta

How to populate a select box field from a database using Groovy

A good practice while developing processes is to store business data in an external business database and retrieve them only when needed. A good question is: How do I retrieve this information from my forms?

Here’s a quick tutorial which explains how to retrieve the information from an external database, and display it as the initial value of a select box field in a form. You can find the process used as an example here.

Create a process with a human task and one form to interact with.



Add an entry pageflow form on the task Display data.

In this form, use a widget to add a select box field.

Click on the select box widget, then on the General tab and Data pane.  In the available value field, use this script:

import groovy.sql.Sql;
def result = []
Sql sql = providedscripts.BonitaSql.newInstance(url,username,password,new org.h2.Driver())
sql.eachRow 'select * from USERS;', { result += it.name }
sql.close()
result

This script will create a list to store the usernames that are returned. Then, it opens the SQL connection to query the table and add each name to the list. Finally, it returns the result.

At the execution, you’ll get this:

BonitaSoft kicks off a new year

We just had a meeting of the minds here in Grenoble, with BonitaSofties from all over France and the United States, to have a look back at 2011 and a look forward to 2012.

We had a pretty good 2011, both in the community and in the company.

We were even able to afford some new chairs…

for all the new… Read the rest of this entry »

Train, Training, Trained

The BonitaSoft training group has been busy lately – training, training, training, and training. (Did you know we have 4 levels of training?)

And in addition, our current calendar of training sessions are in English, French and Spanish.

Here’s a summary of what the BonitaSoft Services group is using to help Bonita Open Solution users get up to speed quickly.

Read the rest of this entry »

How do I loop a task using a condition?

A question often asked about tasks is: How do I loop a task using a condition?

Example
A practical example of this could be when a plan has to be validated by a certain number of Managers before being carried out.
We’ve shown this example in a  new video tutorial, now available in the online BonitaSoft Documentation.

How validation works
Each of the Managers will validate the plan in turn, by clicking on a submit button in a form displayed in Bonita User Experience.
When all the Managers (5 in the case of the video tutorial) have validated the plan, the maximum number of loops has been reached.
The 5th and last validation will end the loop, terminate the task and finish the validation of the plan.

Configure the task
Take a look at our video tutorial, How to loop a task or a call activity, where the above example is illustrated.
It shows how to configure a loop on a human task using a Boolean variable (True/false variable).
Simply set up a Boolean variable on a pool first, see Define a boolean variable, then apply the Boolean variable to a task. You can  set a maximum number of loops for the task.

More tutorial videos are available in the BonitaSoft Documentation video library.

Have fun with Bonita!

Pimp YOUR Bonita

O looky!

It’s the contest we’ve been talking about for a while now…it’s live and happening.

Pimp My Bonita.

More accurately, Pimp YOUR Bonita.

Share your most creative and innovative BPM use cases implementing Bonita Open Solution – win accolades, and prizes!

Grand prize is the winner’s choice of:

$3,000 (USD); or

a trip to Paris to visit BonitaSoft’s City of Light office; or

a trip to San Francisco to leave your at BonitaSoft’s offices there.

There are 6 categories to enter:

  • Best Process Model
  • Best BPMN2 Implementation
  • Best Process-Driven Application
  • Best Add-On or Connector
  • Best Use of User Experience Portal
  • Most Creative Use of Bonita Open Solution

◊ ◊ ◊ ◊ ◊ ◊

Each category finalist gets an autographed copy of

Bruce Silver’s new book, BPMN Methods and Style, and

a BonitaSoft t-shirt (but not this one.  And our lovely model does not come with it.)

To enter before March 15, 2012:

◊ ◊ ◊ ◊ ◊ ◊

Remember -  have fun with [Pimp my] Bonita!

How we document a new feature

Different teams at BonitaSoft work together in documenting and publishing information about Bonita Open Solution.
We have prepared a process diagram which outlines the way we do this.
Check it out on the Community Contributions page here: How to document a new feature.

For every feature documented, an accompanying tutorial is included.
Go visit Top tutorials on the BonitaSoft Documentation and see a selection of these tutorials.

Have fun with Bonita!