Login
Pass
Always remember me
Categories

Archive for the ‘Example’ Category

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!

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!

How to produce a video: a community contribution

Here at BonitaSoft, we like to use video tutorials,  to show you how to create, use and configure Bonita Open Solution including some extra features included in the Subscription Pack.

So we thought you would like to see just what goes into creating a new video for a feature, a sort of behind the scenes peek into our process.
In this contribution, we have included a .bar file ‘How to create a video for the Bonita Documentation System’ which presents an overview of this process.

To see a result of how we apply this process, visit the Bonita Documentation System and take a look at our videos, for example: How to multi-instantiate a task.

See how useful a short and concise video tutorial can be when you need to understand how to use and configure a feature.

How to use the Bonita HTTP API

Looking for a quick way to learn how to use the Bonita HTTP API? This blog post will guide you on how to configure your HTTP server using the BOS-Tomcat bundle (BOS-5.5.1-Tomcat-6.0.32) with different types of clients.

This kind of installation is intended for deployments in which Bonita Open Solution will be deployed on a dedicated web application server, allowing different applications to reach BOS remotely via standard HTTP.

This blog post has two main parts: server side and client side. The server side configuration is common for everyone, while the client side is specific to each client type. Read the rest of this entry »

Error management with BOS

How do you deal with connector errors during the execution of your BOS processes?

This article will present two different ways to deal with errors in your processes: error events and exceptions. We will provide an example for each, and we will give you their pros and cons so you can choose the one that best fits your needs.

Sending and Receiving error events

This method allows you to associate a error with a name to a connector.  If the connector fails, the process will catch that error with a boundary error event associated to that error name.

Error handling process diagram

Error handling with a boundary error event

This will provide an alternate path that is taken to deal with your error.

However, this method has some major drawbacks:

  • One can only associate a single named error to a connector, even if it can throw different types of errors. For example, for a database query connector, the server might be down or your query’s syntax might be incorrect, but the error raised by the failed connector will be the same.
  • Upon receiving the error signal, you will no longer have access to the name of the error that occurred.

Throwing and Catching Exceptions

Another solution which is more complex, but also more powerful, is to use Java exceptions for error handling.

In this case, if you are developing your own connectors and using the Bonita API to execute some tasks, you can catch the exceptions that are raised by your connector.

Here is an example of a process that executes a task via a subprocess:

Exception handling process diagram

Exception handling via a subprocess

In this example the parent process will execute a “Caller step.”

This caller step will launch the subprocess and execute the “Exception throwing step” with this method:

runtimeAPI.executeTask(activity.getUUID(), false);

This automated task will execute a connector that throws a Java Exception. This exception will be then be thrown by the execute task method and can be used to provide appropriate error handling.

You can log the error and even store the Exception object as a reference to the last error that occurred.

Errors happen – so it’s useful to deal with them in advance with boundary events or exception handling.

You may download the example processes from the contribution page here:
Error management sample processes for BOS 5.5.1

Implementing a Business Collaboration with BPMN and Bonita

You never know what you’re going to find in the community contributions – the Bonita community is wide and deep!

A Simple Business Collaboration Scenario was recently contributed by community member allweyer, aka  Prof. Dr. Thomas Allweyer, Department of Computer Science and Micro Systems Technology at Fachhochschule (University of Applied Sciences) Kaiserslautern (Germany).

Along with the 2 choreographed processes which you can download from the contributions page directly, Dr. Allweyer provides a link to a very well-written whitepaper that describes the design of these processes.

In it he describes a detailed, clear example using BPMN to model a business collaboration, consisting of interaction between a customer process and a vendor process. Prof. Dr. Allweyer shows the the development of choreography diagrams, the collaboration diagrams, data structures, and messages using several different modeling tools and explains how to implement them.

He then uses Bonita Open Solution to model, deploy, and run the scenario.

Download the whitepaper, and the customer and supplier processes, for yourself – and follow along step-by-step; some of the topics he covers as he builds the processes include

  • Conversations and choreographies
  • Collaborations
  • Message exchange
  • Message and timer events
  • Defining message structures and implementing them with XML schema
  • Implementation alternatives for business-to-business integration
  • Correlating messages and process instances

Share and enjoy! (And many thanks to Prof. Dr. Allweyer for this excellent contribution to the Bonita community.)