<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3568943604490253950</id><updated>2011-07-07T15:54:52.732-06:00</updated><category term='Identity'/><category term='Connectors'/><category term='General'/><category term='Database'/><category term='Designer'/><category term='Console'/><category term='HowTo'/><category term='Engine'/><category term='Hooks'/><category term='Security'/><category term='API'/><category term='Deployed'/><category term='News'/><category term='Installation'/><category term='Embedded'/><title type='text'>Bonita World</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://bonitaworld.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://bonitaworld.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Luis Sanabria</name><uri>http://www.blogger.com/profile/13781535971948382221</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>27</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3568943604490253950.post-8837654691933916937</id><published>2009-12-31T14:55:00.004-06:00</published><updated>2009-12-31T15:46:15.337-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='News'/><category scheme='http://www.blogger.com/atom/ns#' term='General'/><title type='text'>New Year, New Post, New Bonita</title><content type='html'>After being away for a long time, I am trying to restart work on this blog. A lot of things have happened and the best way to restart is to list some of them. For those of you following the Bonita project most of the things mentioned here will be already known, but it's always good to put them together.

&lt;ol&gt;&lt;li&gt;The Bonita team and &lt;a href="http://www.bull.com/index.php"&gt;Bull&lt;/a&gt; chose to follow separate paths last September. That led to the creation of the BonitaSoft company. This is very good for the project, since the BPM/workflow solution will be the main product and focus of the new company.&lt;/li&gt;&lt;li&gt;The BonitaSoft company joined the &lt;a href="http://ow2.org/"&gt;OW2&lt;/a&gt; consortium in October.&lt;/li&gt;&lt;li&gt;A new community website was launched in October, 23. This has more features than the existing OW2 forge, including a source code navigator, a bug tracking tool, a blog, some forums and sections with documentation and downloads.&lt;/li&gt;&lt;li&gt;Several milestone versions of the new major overhaul of the Bonita platform (now called Bonita Open Solution) were released. Bonita Open Solution 5.0 M5 is the latest available release. The final version is expected around February of 2010.&lt;/li&gt;&lt;/ol&gt;Here are some useful/interesting links in the new Bonita ecosystem:
&lt;ul&gt;&lt;li&gt;BonitaSoft &lt;a href="http://www.bonitasoft.org/"&gt;community site&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;BonitaSoft &lt;a href="http://www.bonitasoft.com/"&gt;corporate site&lt;/a&gt; where you should go if your employer is interested in hiring their value added &lt;a href="http://www.bonitasoft.com/services/support.php"&gt;services&lt;/a&gt;.
&lt;/li&gt;&lt;li&gt;You can follow the latest developments by the Bonita team in &lt;a href="https://www.twitter.com/BonitaSoft"&gt;Twitter&lt;/a&gt;, their &lt;a href="http://www.bonitasoft.com/blog/"&gt;corporate blog&lt;/a&gt; and their &lt;a href="http://www.bonitasoft.org/blog/"&gt;community blog&lt;/a&gt;. Among the interesting things you can find there are a several videos with &lt;a href="http://www.bonitasoft.com/blog/?p=266"&gt;demonstrations of the tool&lt;/a&gt;.
&lt;/li&gt;&lt;/ul&gt;Please join me in wishing them the best for their newly formed company and contribute to the project to make the Bonita Open Solution a world class first order BPM solution, not just when compared to other open source solutions but among the commercial ones as well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568943604490253950-8837654691933916937?l=bonitaworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonitaworld.blogspot.com/feeds/8837654691933916937/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bonitaworld.blogspot.com/2009/12/new-year-new-post-new-bonita.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/8837654691933916937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/8837654691933916937'/><link rel='alternate' type='text/html' href='http://bonitaworld.blogspot.com/2009/12/new-year-new-post-new-bonita.html' title='New Year, New Post, New Bonita'/><author><name>Luis Sanabria</name><uri>http://www.blogger.com/profile/13781535971948382221</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3568943604490253950.post-5686231288922058073</id><published>2009-08-19T16:54:00.002-06:00</published><updated>2009-08-19T16:54:00.231-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Hooks'/><category scheme='http://www.blogger.com/atom/ns#' term='API'/><category scheme='http://www.blogger.com/atom/ns#' term='Designer'/><category scheme='http://www.blogger.com/atom/ns#' term='Engine'/><title type='text'>Transactional and Non-Transactional Hooks</title><content type='html'>&lt;p&gt;Every method call in the Bonita API, that updates the process instance state, is executed in a &lt;a href="http://java.sun.com/docs/books/tutorial/jdbc/basics/transactions.html"&gt;transactional context&lt;/a&gt;. That allows the Bonita engine to roll back the whole operation if one of its steps raises an exception, guaranteeing the workflow database will remain in a consistent state and the client application will not have to deal with partially executed operations (e.g.: a task was finished but the following one was not properly initiated).&lt;/p&gt;&lt;p&gt;Hooks are executed in the transactional context of the calling operation. It means the Bonita engine will need to know how to process them during a roll back. The workflow developer must provide that information by identifing them as transactional or non-transactional hooks.&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;Non-transactional Hooks&lt;/p&gt;&lt;p&gt;Non-transactional hooks are safe from the point of view of the Bonita engine. They do not perform any actions that need to be rolled back in case of an error in the hook itself or somewhere else in the operation and they don’t perform any updates to the workflow database. To enforce this policy, they only expose the read access APIs of the Bonita Platform: &lt;code&gt;QueryDefinitionAPI&lt;/code&gt; and &lt;code&gt;QueryRuntimeAPI&lt;/code&gt; to the hook programmer. It's important to note they are safe only if the hook developer respects the policy and does not perform any tasks that need to be reverted in case of error using this kind of hook.
&lt;/p&gt;&lt;p&gt;They are ideal for operations that do not need or cannot be undone, like &lt;a href="http://bonitaworld.blogspot.com/2009/07/sending-e-mails.html"&gt;sending e-mails&lt;/a&gt;. To properly deal with situations where an operation fails after executing a non-transactional hook, the workflow developer must rely on verifications as part of the business logic, either in the business model or in the hook code itself. For example, if a non-transactional hook is used to distribute an e-mail notification, the hook itself might need to query the e-mail system about any e-mail distribution request received from that same activity before or the client application programmer might need to include code to instruct the e-mail system to stop the distribution if the API call raised an exception.&lt;/p&gt;&lt;p&gt;Non-transactional hooks might be run more than once, when the same operation is retried after receiving the exception and (hopefully) cleaning the situation that lead to the error in the first place. This situation must be considered and accounted for by the hook developer.&lt;/p&gt;&lt;p&gt;If an exception is raised during the execution of a non-transactional hook, the Bonita engine will catch it, log it and ignore it. All other changes done as part of the same activity will be completed as if no error had happened.
&lt;/p&gt;&lt;p&gt;To include a non-transactional hook in your business process you need to follow these steps:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Create a new non-transactional hook class in &lt;span style="font-weight: bold;"&gt;ProEd&lt;/span&gt;, by selecting the &lt;span style="font-style: italic;"&gt;File -&gt; New -&gt; Other -&gt; Bonita BPM -&gt; New Bonita Hook&lt;/span&gt; option. Please notice this sequence of commands assumes you have an open Bonita BPM project in &lt;a href="http://www.eclipse.org/"&gt;Eclipse&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Click on &lt;span style="font-style: italic;"&gt;Next&lt;/span&gt; and specify a Package name and a class name in the &lt;span style="font-style: italic;"&gt;Java Class&lt;/span&gt; form and click on the &lt;span style="font-style: italic;"&gt;Finish&lt;/span&gt; button. This will create a new Java class in the project, implementing the &lt;code&gt;org.ow2.bonita.definition.Hook&lt;/code&gt; interface.&lt;/li&gt;&lt;li&gt;Replace the &lt;code&gt;// TODO Auto-generated method stub&lt;/code&gt; text with your business logic for this hook.&lt;/li&gt;&lt;li&gt;Go to the project’s process model (&lt;a href="http://en.wikipedia.org/wiki/XPDL"&gt;XPDL&lt;/a&gt;  file) and double click on the activity where you want to associate the hook.&lt;/li&gt;&lt;li&gt;Click on the &lt;span style="font-style: italic;"&gt;Hooks&lt;/span&gt; tab.&lt;/li&gt;&lt;li&gt;Click on the &lt;span style="font-style: italic;"&gt;Add&lt;/span&gt; button&lt;/li&gt;&lt;li&gt;In the &lt;span style="font-style: italic;"&gt;Call Point&lt;/span&gt; frame, select the kind of hook you want to specify. The different kinds of hooks and their relationship with the task’s life cycle are discussed &lt;a href="http://bonitaworld.blogspot.com/2009/06/task-execution-in-nova-bonita.html"&gt;here&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;In the &lt;span style="font-style: italic;"&gt;Hook Name&lt;/span&gt; text field type the fully qualified name (package name plus class name) of the Java class created in steps 1 to 3.&lt;/li&gt;&lt;li&gt;Make sure the &lt;span style="font-style: italic;"&gt;rollback&lt;/span&gt; checkbox remains unchecked. This will indicate to the workflow engine that it will be dealing with a non-transactional hook.&lt;/li&gt;&lt;li&gt;Click on the &lt;span style="font-style: italic;"&gt;Ok&lt;/span&gt; buttons of the &lt;span style="font-style: italic;"&gt;Add Hook&lt;/span&gt; and the task’s properties windows.&lt;/li&gt;&lt;li&gt;Complete and deploy the process in your Bonita Engine (e.g.: &lt;span style="font-weight: bold;"&gt;Bonita Console&lt;/span&gt;)&lt;/li&gt;&lt;/ol&gt;&lt;p style="font-weight: bold;"&gt;Transactional Hooks&lt;/p&gt;&lt;p&gt;Transactional hooks expose both read and write APIs to the hook programmer. They perform operations in the instance of the business process that will need to be reverted if an exception is raised. Both, exceptions raised by the hook itself and by other operations performed by the same API call will cause the hook’s operations to be rolled back.&lt;/p&gt;&lt;p&gt;Any changes done in external systems cannot be reverted by the workflow engine itself. If the error was raised during the hook’s execution, the hook itself is responsible for catching the exception and doing the cleaning work. If the hook’s execution finished and the exception is raised by the API call later on, those changes to the external systems won’t be undone.&lt;/p&gt;&lt;p&gt;To include a non-transactional hook in your business process you need to follow these steps:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Create a new transactional hook class in &lt;span style="font-weight: bold;"&gt;ProEd&lt;/span&gt;, by selecting the &lt;span style="font-style: italic;"&gt;File -&gt; New -&gt; Other -&gt; Bonita BPM -&gt; New Bonita Transactional Hook&lt;/span&gt; option. This will create a new Java class in the project, implementing the &lt;code&gt;org.ow2.bonita.definition.TxHook&lt;/code&gt; interface.&lt;/li&gt;&lt;li&gt;Perform the steps from 2 to 8 of the instructions to add a non-transactional hook to your business process. Those steps are the same for both transactional and non-transactional hooks.&lt;/li&gt;&lt;li&gt;Make sure the &lt;span style="font-style: italic;"&gt;rollback&lt;/span&gt; checkbox is checked. This will indicate to the workflow engine that it will be dealing with a transactional hook.&lt;/li&gt;&lt;li&gt;Perform the steps from 10 to 11 of the instructions to add a non-transactional hook to your business process. Those steps are the same for both transactional and non-transactional hooks.&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568943604490253950-5686231288922058073?l=bonitaworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonitaworld.blogspot.com/feeds/5686231288922058073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bonitaworld.blogspot.com/2009/08/transactional-and-non-transactional.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/5686231288922058073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/5686231288922058073'/><link rel='alternate' type='text/html' href='http://bonitaworld.blogspot.com/2009/08/transactional-and-non-transactional.html' title='Transactional and Non-Transactional Hooks'/><author><name>Luis Sanabria</name><uri>http://www.blogger.com/profile/13781535971948382221</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3568943604490253950.post-7221667313781231583</id><published>2009-07-27T06:10:00.001-06:00</published><updated>2009-07-27T07:51:08.658-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='API'/><category scheme='http://www.blogger.com/atom/ns#' term='Designer'/><category scheme='http://www.blogger.com/atom/ns#' term='Engine'/><title type='text'>Basics of Automatic Activities</title><content type='html'>&lt;p&gt;When modeling business processes some activities will be assigned to a person, group, department or organizational unit. Those activities are usually named &lt;span style="font-style: italic;"&gt;Manual Activities&lt;/span&gt; or &lt;span style="font-style: italic;"&gt;Tasks&lt;/span&gt;. Their life cycle and the mechanisms provided by &lt;a style="font-style: italic;" href="http://www.bonitasoft.com/"&gt;Nova Bonita&lt;/a&gt; to work with them were briefly described &lt;a href="http://bonitaworld.blogspot.com/2009/06/task-execution-in-nova-bonita.html"&gt;here&lt;/a&gt; and &lt;a href="http://bonitaworld.blogspot.com/2009/06/task-execution-in-nova-bonita-part-2.html"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Additionally, there are other types of activities that will not be assigned to individuals or groups but that will help the business analysts to model work that needs to be done by the workflow engine itself or by other enterprise systems (like &lt;a href="http://en.wikipedia.org/wiki/Enterprise_resource_planning"&gt;ERP&lt;/a&gt;s, &lt;a href="http://en.wikipedia.org/wiki/Customer_relationship_management"&gt;CRM&lt;/a&gt;s, mail platforms, etc.). Those activities are called &lt;span style="font-style: italic;"&gt;Automatic Activities&lt;/span&gt; and the &lt;span style="font-style: italic;"&gt;Bonita Platform&lt;/span&gt; implements them using hooks.&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;Modeling / Definition&lt;/p&gt;&lt;p&gt;To incorporate automatic activities into your processes you need to follow the next steps:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Create a Java class implementing the &lt;code&gt;org.ow2.bonita.definition.Hook&lt;/code&gt; interface.  This class will be responsible for performing the work associated with the automatic activity. The Bonita Engine also supports transactional hooks with the &lt;code&gt;org.ow2.bonita.definition.TxHook&lt;/code&gt; interface. They will be discussed in an upcoming post.&lt;/li&gt;&lt;li&gt;Add a basic activity to the process model (&lt;span style="font-style: italic;"&gt;XPDL&lt;/span&gt;) in &lt;span style="font-style: italic;"&gt;ProEd&lt;/span&gt; as described in section 3.1.3 of the &lt;a href="http://download.forge.objectweb.org/bonita/bonita-4.1.1-BonitaQuickStart.pdf"&gt;Bonita Quick Start tutorial&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Make sure the Performer combo box remains empty (no process participant is assigned to the activity). The process editor (&lt;span style="font-style: italic;"&gt;ProEd&lt;/span&gt;) and the &lt;span style="font-style: italic;"&gt;Bonita Engine&lt;/span&gt; will consider activities without a performer assigned as &lt;span style="font-style: italic;"&gt;Automatic Activities&lt;/span&gt; and activities with performers associated as &lt;span style="font-style: italic;"&gt;Manual Activities&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;Select the Add button in the Hooks tab of the New Activity form.&lt;/li&gt;&lt;li&gt;In the Hook Name field of the Add Hook form, type the fully qualified name of the class implemented in step number one. For automatic activities the only kind of hook that can be specified is the OnEnter hook. The other kinds of hooks are not necessary since all the life cycle phases of the activity are controlled by the workflow engine, without manual intervention.&lt;/li&gt;&lt;li&gt;Click in the Ok buttons of the Add Hook and New Activity forms.&lt;/li&gt;&lt;li&gt;Complete and deploy the process in your &lt;span style="font-style: italic;"&gt;Bonita Engine&lt;/span&gt; (e.g.: The Bonita Console).&lt;/li&gt;&lt;/ol&gt;&lt;p style="font-weight: bold;"&gt;Execution&lt;/p&gt;&lt;p&gt;The automatic activities are executed by the Bonita engine when the &lt;code&gt;finishTask()&lt;/code&gt; method is called on the previous manual activity. For example, in the process shown below, if the &lt;code&gt;finishTask()&lt;/code&gt; is called on an instance of &lt;span style="font-weight: bold;"&gt;Manual Activity 1&lt;/span&gt;, the engine will not just execute the &lt;span style="font-style: italic;"&gt;OnFinish&lt;/span&gt; hook of that activity. It will also execute the &lt;span style="font-style: italic;"&gt;OnEnter&lt;/span&gt; hook of &lt;span style="font-weight: bold;"&gt;Automatic Activity&lt;/span&gt; and the &lt;span style="font-style: italic;"&gt;OnReady&lt;/span&gt; hook of &lt;span style="font-weight: bold;"&gt;Manual Activity 2&lt;/span&gt;.&lt;/p&gt;&lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_Q4pNv822dZY/Sm2vNOu1LEI/AAAAAAAAACY/gFO5qmH35aU/s1600-h/ProcessWithAutomaticActivity.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 174px; height: 320px;" src="http://1.bp.blogspot.com/_Q4pNv822dZY/Sm2vNOu1LEI/AAAAAAAAACY/gFO5qmH35aU/s320/ProcessWithAutomaticActivity.PNG" alt="" id="BLOGGER_PHOTO_ID_5363135373095808066" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The sequence of events for the previous process, when calling the &lt;code&gt;finishTask()&lt;/code&gt; method for an instance of &lt;span style="font-weight: bold;"&gt;Manual Activity 1&lt;/span&gt;, will be as follows:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Manual Activity 1: OnFinish Hook&lt;/li&gt;&lt;li&gt;Automatic Activity: OnEnter Hook&lt;/li&gt;&lt;li&gt;Manual Activity 2: Role Mapper&lt;/li&gt;&lt;li&gt;Manual Activity 2: Performer Assigner&lt;/li&gt;&lt;li&gt;Manual Activity 2: OnReady Hook&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Once the execution of the &lt;span style="font-style: italic;"&gt;OnReady&lt;/span&gt; hook of &lt;span style="font-weight: bold;"&gt;Manual Activity 2&lt;/span&gt; is completed the &lt;code&gt;finishTask()&lt;/code&gt; method will return control to the caller.&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;Exceptions&lt;/p&gt;&lt;p&gt;Code executed in the context of hooks can raise exceptions for various reasons. For example, an &lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;a href="http://en.wikipedia.org/wiki/SMTP"&gt;SMTP&lt;/a&gt; server might be down when trying to send an e-mail. The &lt;span style="font-style: italic;"&gt;Bonita Engine&lt;/span&gt; will catch all exceptions raised by non-transactional hooks (those implementing the &lt;code&gt;org.ow2.bonita.definition.Hook&lt;/code&gt; interface), report them to the Bonita logs and will them for any other purpose. That means their impact on the execution of the processes will be minimal and the API calls will return successfully. In the case of automatic activities, that means the engine will mark them as successfully finished, even if their &lt;span style="font-style: italic;"&gt;OnEnter&lt;/span&gt; hooks raised an exception.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568943604490253950-7221667313781231583?l=bonitaworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonitaworld.blogspot.com/feeds/7221667313781231583/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bonitaworld.blogspot.com/2009/07/basics-of-automatic-activities.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/7221667313781231583'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/7221667313781231583'/><link rel='alternate' type='text/html' href='http://bonitaworld.blogspot.com/2009/07/basics-of-automatic-activities.html' title='Basics of Automatic Activities'/><author><name>Luis Sanabria</name><uri>http://www.blogger.com/profile/13781535971948382221</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_Q4pNv822dZY/Sm2vNOu1LEI/AAAAAAAAACY/gFO5qmH35aU/s72-c/ProcessWithAutomaticActivity.PNG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3568943604490253950.post-443223586645561398</id><published>2009-07-06T09:54:00.006-06:00</published><updated>2009-07-06T10:20:37.089-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Connectors'/><title type='text'>Sending E-Mails</title><content type='html'>&lt;p&gt;Workflow systems usually interact with people using e-mail notifications. These e-mails help to let people know about pending tasks, approaching deadlines, events affecting them or other activities according to the nature of the business processes that were automated.&lt;/p&gt;&lt;p&gt;Since the Bonita engine focuses on the workflow functions and many enterprise systems already have built in e-mail functionality, there are no specific features in the engine itself to model and distribute e-mails (like an e-mail activity). This allows the workflow developers to interact with any e-mail system already deployed in their environment or to use the &lt;a style="font-weight: bold;" href="http://java.sun.com/products/javamail/"&gt;Java Mail API&lt;/a&gt; that is available in all &lt;a href="http://en.wikipedia.org/wiki/Java_application_server#Java_application_servers"&gt;J EE application servers&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;However, for those not having an e-mail notification system already in place or unfamiliar with the &lt;span style="font-weight: bold;"&gt;Java Mail API&lt;/span&gt; a more simple option might be desirable. To satisfy that need, the development team has included in &lt;a style="font-weight: bold;" href="http://bonitaworld.blogspot.com/2009/05/bonita-411-was-released.html"&gt;Nova Bonita 4.1.1&lt;/a&gt; a class that makes use of the &lt;span style="font-weight: bold;"&gt;Java Mail API&lt;/span&gt; and the new connectors feature to allow for easy set up and distribution of e-mails.&lt;/p&gt;&lt;p&gt;The &lt;span style="font-style: italic;"&gt;EmailConnector&lt;/span&gt; is one of the built-in connectors included with the distribution but is not hardwired in the engine itself. This allows the developers using Bonita to rely on their own e-mail solution if they what to. The connector can be called from any kind of hook and in future releases of Bonita it will be possible to set up and configure it directly from the &lt;a href="http://wiki.bonita.ow2.org/xwiki/bin/view/Main/Roadmap"&gt;upcoming BPM Studio&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Please notice that the connector infrastructure is just a technology preview at this time. Because of that the API can change in upcoming releases of Nova Bonita.&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;E-Mail Connector Set Up and usage&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Create a new hook in &lt;span style="font-weight: bold;"&gt;ProEd (Eclipse)&lt;/span&gt;, which you will use to send the e-mail. If you have defined already a hook, you can perfectly add the e-mail sending logic to the existing hook.&lt;/li&gt;&lt;li&gt;Import the &lt;span style="font-style: italic;"&gt;bonita-server-4.1.1.jar&lt;/span&gt; library to your &lt;a href="http://www.eclipse.org/"&gt;Eclipse&lt;/a&gt; project. The e-mail connector classes are not included in the &lt;span style="font-style: italic;"&gt;bonita-client-4.1.1.jar&lt;/span&gt; library (imported by default when a new Bonita project is created). If the &lt;span style="font-style: italic;"&gt;bonita-server-4.1.1.jar&lt;/span&gt; library is not imported to the project, Eclipse will report in-line errors (EmailConnector class cannot be resolved to a type) and the Bonita engine will generate runtime exceptions when trying to create an instance of the connector.&lt;/li&gt;&lt;li&gt;Import the e-mail connector class:&lt;blockquote&gt;&lt;code&gt;import org.ow2.bonita.connector.email.EmailConnector;&lt;/code&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;Create a new instance of the connector:&lt;blockquote&gt;&lt;code&gt;EmailConnector email = new EmailConnector();&lt;/code&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;Set the connector properties with the values necessary to connect to your &lt;a href="http://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol"&gt;SMTP&lt;/a&gt; server and the information part of the e-mail you are generating. You can see all the available properties in the &lt;a href="http://svn.forge.objectweb.org/cgi-bin/viewcvs.cgi/bonita/tags/bonita-4.1.1/bonitaPVM/modules/bonita-template/src/main/java/org/ow2/bonita/connector/email/EmailConnector.java?rev=4582&amp;view=markup"&gt;connector’s source code&lt;/a&gt;. The Bonita Cookbook shows an example with a minimum set of properties:&lt;blockquote&gt;&lt;code&gt;email.setSmtpHost("127.0.0.1"); // Your SMTP server IP.&lt;br /&gt;&lt;br /&gt;email.setSmtpPort(25); // Your SMTP server port.&lt;br /&gt;&lt;br /&gt;email.setTo(“receiver@bonitaworld.org”); // Destination address.&lt;br /&gt;&lt;br /&gt;email.setSubject("It works!"); // The e-mail’s subject.&lt;/code&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;Validate the connector configuration is correct. The validation method will return a list of errors if the parameters were not set correctly. For example, the To field was set with an invalid e-mail address. The validation is run before the execution of the connector (next step). However, the execution method will not return the list of error and will not raise an exception because of them so you will not know the execution was not done. The list returned by the &lt;code&gt;validate()&lt;/code&gt; method must be empty for the &lt;code&gt;execute()&lt;/code&gt; method to run the connector logic.&lt;blockquote&gt;&lt;code&gt;List&amp;lt;ConnectorError&amp;gt;  errors = email.validate();&lt;/code&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;Execute the e-mail connector. If the &lt;code&gt;validate()&lt;/code&gt; method returned an empty list of errors, the connector will proceed to execute the e-mail sending logic. If the e-mail distribution was successful, the method will return normally. If there were any problems during the process (for example the &lt;a href="http://freshmeat.net/search?q=SMTP+Server&amp;amp;section=projects"&gt;SMTP server&lt;/a&gt; was down) an exception will be raised. You must catch those exceptions and add code for handling those error conditions.&lt;blockquote&gt;&lt;code&gt;email.execute();&lt;/code&gt;&lt;/blockquote&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568943604490253950-443223586645561398?l=bonitaworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonitaworld.blogspot.com/feeds/443223586645561398/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bonitaworld.blogspot.com/2009/07/sending-e-mails.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/443223586645561398'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/443223586645561398'/><link rel='alternate' type='text/html' href='http://bonitaworld.blogspot.com/2009/07/sending-e-mails.html' title='Sending E-Mails'/><author><name>Luis Sanabria</name><uri>http://www.blogger.com/profile/13781535971948382221</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3568943604490253950.post-2069888084845604846</id><published>2009-06-23T06:13:00.003-06:00</published><updated>2009-06-23T08:54:51.279-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Console'/><category scheme='http://www.blogger.com/atom/ns#' term='Identity'/><title type='text'>Accessing Bonita Console's identity services</title><content type='html'>&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Nova Bonita 4.1.1&lt;/span&gt; interacts with external identity services using role mappers and performer assigners. Role mappers' function is to connect to an external service (like &lt;a href="http://en.wikipedia.org/wiki/LDAP"&gt;LDAP&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Active_directory"&gt;ActiveDirectory&lt;/a&gt;, etc.) and return a list of candidates for performing a task. Performer Assigners (if specified) receive a list of candidates from the workflow engine and select the one responsible for performing the task. The selected candidate will be the only one with the task on his/her task list.&lt;/p&gt;&lt;p&gt;An external identity service must be provided and custom role mappers must be written as part of a Nova Bonita implementation project. However, if you are using the Bonita Console for demonstration purposes it's very likely you will want to access the&lt;a href="http://en.wikipedia.org/wiki/Exo_platform"&gt; eXo Platform&lt;/a&gt; identity services from your business processes. This will allow you to assign tasks to the &lt;a href="http://www.exoplatform.org/portal/public/website/"&gt;eXo Platform&lt;/a&gt; groups and users.&lt;/p&gt;&lt;p&gt;The procedure to access the Bonita Console identity services (summarized below) was discussed in the Bonita forums &lt;a href="https://forge.ow2.org/forum/forum.php?thread_id=5987&amp;amp;forum_id=154"&gt;here&lt;/a&gt; and &lt;a href="http://forge.ow2.org/forum/forum.php?thread_id=6289&amp;amp;forum_id=154"&gt;here&lt;/a&gt;. It is composed of two main steps: the creation of the group structure in the Bonita Console and the set up of the business process model to access the service.&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;Creating the group structure&lt;/p&gt;&lt;p&gt;The following steps describe the process to create a user and group structure using the Bonita Console's user management function.&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Create the necessary users. You can see a step by step description in the section &lt;span style="font-weight: bold;"&gt;Creating new users&lt;/span&gt; of the &lt;a href="http://bonitaworld.blogspot.com/2009/06/user-management-on-bonita-console.html"&gt;previous post&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Create the group structure that match or organizational needs. To create the groups you need to:&lt;ol&gt;&lt;li&gt;Select the &lt;span style="font-style: italic;"&gt;Page Navigations&lt;/span&gt; button from the &lt;span style="font-style: italic;"&gt;Doc Bar&lt;/span&gt; at the bottom of the page.&lt;/li&gt;&lt;li&gt;Select the &lt;span style="font-style: italic;"&gt;Administration&lt;/span&gt; page from the list of pages shown.&lt;/li&gt;&lt;li&gt;Select the &lt;span style="font-style: italic;"&gt;Community Management&lt;/span&gt; button from the &lt;span style="font-style: italic;"&gt;Doc Bar&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;Select the &lt;span style="font-style: italic;"&gt;Group Management Option&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;Navigate to the desired location of your group. It can be at the root of the structure or nested in another groups (e.g.: &lt;code style="font-style: italic;"&gt;/Platform&lt;/code&gt;)&lt;/li&gt;&lt;li&gt;Click on the &lt;span style="font-style: italic;"&gt;Add new group&lt;/span&gt; option, located in the header of the Group frame, with a + sign as icon.&lt;/li&gt;&lt;li&gt;Complete the fields in the &lt;span style="font-style: italic;"&gt;Add new group&lt;/span&gt; frame and click on the &lt;span style="font-style: italic;"&gt;Save&lt;/span&gt; button.
&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;li&gt;Assign the users created in step 1 to the groups created in step 2. You can see a step by step description in the section &lt;span style="font-weight: bold;"&gt;Providing access to the Users Worklist portlet&lt;/span&gt; of the &lt;a href="http://bonitaworld.blogspot.com/2009/06/user-management-on-bonita-console.html"&gt;previous post&lt;/a&gt;. The only difference is that in step 5 you will need to navigate to the desired group rather than to the &lt;code style="font-style: italic;"&gt;/Platform/Console/Bonita&lt;/code&gt; group.&lt;/li&gt;&lt;/ol&gt;&lt;p style="font-weight: bold;"&gt;Set up the business process model&lt;/p&gt;&lt;p&gt;To access the group structure created in the previous section you need to define the process participants in &lt;span style="font-weight: bold;"&gt;ProEd&lt;/span&gt;, with the following restrictions:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;The participant name must follow this format: *:&amp;lt;group&amp;gt;. For example if you created a group called &lt;code style="font-style: italic;"&gt;/Org/BonitaWorld/Publishers&lt;/code&gt; and you want to assign a task to its members (set them as candidates), the task's performer must be a participant with name &lt;code style="font-style: italic;"&gt;*:/Org/BonitaWorld/Publishers&lt;/code&gt;&lt;/li&gt;&lt;li&gt;The participant Type must be &lt;span style="font-style: italic;"&gt;Role&lt;/span&gt;&lt;/li&gt;&lt;li&gt;The participant Mapper Type must be &lt;span style="font-style: italic;"&gt;Custom&lt;/span&gt;&lt;/li&gt;&lt;li&gt;The participant mapper Class Name must be &lt;code style="font-style: italic;"&gt;org.ow2.novabpm.admin.service.bonita.ExoOrganizationMapper&lt;/code&gt;
&lt;/li&gt;&lt;/ol&gt;&lt;p style="font-weight: bold;"&gt;Warning&lt;/p&gt;&lt;p&gt;This mechanism to access the eXo Platform identity service will only work on processes deployed in the Bonita Console or from applications running on the same Tomcat instance than the console. Otherwise, the Bonita engine will not be able to locate the necessary classes during the role mapping phase.&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;Membership type&lt;/p&gt;&lt;p&gt;The eXo Platform identity service allows the users to specify different kinds of membership to a group. By default there are 4 membership types configured in the Bonita Console: user, member, manager and operator. If you want to assign a task to a subset of a group's members with a given membership type, you need to replace the * at the beginning of the participant name with the desired membership type.&lt;/p&gt;&lt;p&gt;For example, if you want to assign a task only to the managers in the &lt;code style="font-style: italic;"&gt;/Org/BonitaWorld/Publishers&lt;/code&gt; group you need to set the participant name as &lt;code style="font-style: italic;"&gt;manager:/Org/BonitaWorld/Publishers&lt;/code&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568943604490253950-2069888084845604846?l=bonitaworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonitaworld.blogspot.com/feeds/2069888084845604846/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bonitaworld.blogspot.com/2009/06/accessing-bonita-consoles-identity.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/2069888084845604846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/2069888084845604846'/><link rel='alternate' type='text/html' href='http://bonitaworld.blogspot.com/2009/06/accessing-bonita-consoles-identity.html' title='Accessing Bonita Console&apos;s identity services'/><author><name>Luis Sanabria</name><uri>http://www.blogger.com/profile/13781535971948382221</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3568943604490253950.post-4074392992787047117</id><published>2009-06-15T06:52:00.003-06:00</published><updated>2009-06-23T08:55:32.717-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Console'/><title type='text'>User management on Bonita Console</title><content type='html'>&lt;p&gt;The Nova Bonita console has three main functions available to the users: &lt;span style="font-style: italic;"&gt;Users Worklist&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;BPM Management&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;User Administration&lt;/span&gt;. The &lt;span style="font-style: italic;"&gt;Users Worklis&lt;/span&gt;t allows users to create new instances of deployed processes, execute tasks in their &lt;span style="font-weight: bold;"&gt;TODO&lt;/span&gt; list and review the history of completed tasks. The &lt;span style="font-style: italic;"&gt;BPM Management&lt;/span&gt; function allows users to manage business processes (deploy, undeploy, start, remove, etc.) process instances and activities. &lt;span style="font-style: italic;"&gt;User Management&lt;/span&gt; allows the creation and management of users and their assignment to groups.&lt;/p&gt;&lt;p&gt;Access to these functions can be manged from the Console itself using the &lt;span style="font-style: italic;"&gt;User Management&lt;/span&gt; function built-in as part of the &lt;a href="http://www.exoplatform.org/portal/public/website/"&gt;eXo Platform&lt;/a&gt;. The steps below describe the processes necessary to create a new Console user and grant it the necessary access rights for each one of the functions. You will be able to find further details and screenshots in the &lt;a href="http://wiki.bonita.ow2.org/xwiki/bin/download/Main/Documentation/bonita-4.1-BonitaCookBook.pdf"&gt;Bonita's Cookbook&lt;/a&gt; document, section 8.9
&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;Creating new users&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Login as an user with user administration rights. By default only the root user has user management capabilities.&lt;/li&gt;&lt;li&gt;Select the &lt;span style="font-style: italic;"&gt;Page Navigations&lt;/span&gt; button from the &lt;span style="font-style: italic;"&gt;Doc Bar&lt;/span&gt; at the bottom of the page.&lt;/li&gt;&lt;li&gt;Select the &lt;span style="font-style: italic;"&gt;Administration&lt;/span&gt; page from the list of pages shown.&lt;/li&gt;&lt;li&gt;Select the &lt;span style="font-style: italic;"&gt;New Account&lt;/span&gt; button from the &lt;span style="font-style: italic;"&gt;Doc Bar&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;Complete all the required fields in the &lt;span style="font-style: italic;"&gt;Account Setting&lt;/span&gt; tab of the portlet shown and optionally the fields from the &lt;span style="font-style: italic;"&gt;User Profile&lt;/span&gt; tab.&lt;/li&gt;&lt;li&gt;Click on the &lt;span style="font-style: italic;"&gt;Save&lt;/span&gt; button. The console will show a pop-up button with the result of the operation. If the user name was not in use before, the account will be added and the console will report that “&lt;span style="font-style: italic;"&gt;You have registered a new account successfully!&lt;/span&gt;”&lt;/li&gt;&lt;li&gt;Click on the &lt;span style="font-style: italic;"&gt;Ok&lt;/span&gt; button of the pop up frame.&lt;/li&gt;&lt;/ol&gt;&lt;p style="font-weight: bold;"&gt;Providing access to the Users Worklist portlet&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Select the &lt;span style="font-style: italic;"&gt;Page Navigations&lt;/span&gt; button from the &lt;span style="font-style: italic;"&gt;Doc Bar&lt;/span&gt; at the bottom of the page.&lt;/li&gt;&lt;li&gt;Select the &lt;span style="font-style: italic;"&gt;Administration&lt;/span&gt; page from the list of pages shown.&lt;/li&gt;&lt;li&gt;Select the &lt;span style="font-style: italic;"&gt;Community Management&lt;/span&gt; button from the &lt;span style="font-style: italic;"&gt;Doc Bar.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Select the &lt;span style="font-style: italic;"&gt;Group Management&lt;/span&gt; Option&lt;/li&gt;&lt;li&gt;Navigate to the &lt;code&gt;/Platform/Console/Bonita&lt;/code&gt; group&lt;/li&gt;&lt;li&gt;In the &lt;span style="font-style: italic;"&gt;User Name&lt;/span&gt; text field of the &lt;span style="font-style: italic;"&gt;Add Member&lt;/span&gt; frame, type the name of the user to receive access to the &lt;span style="font-style: italic;"&gt;Users Worklist&lt;/span&gt; portlet.&lt;/li&gt;&lt;li&gt;In the &lt;span style="font-style: italic;"&gt;Membership&lt;/span&gt; combo-box of the &lt;span style="font-style: italic;"&gt;Add Member&lt;/span&gt; frame, select &lt;code&gt;user&lt;/code&gt; as membership type.&lt;/li&gt;&lt;li&gt;Click on the &lt;span style="font-style: italic;"&gt;Save&lt;/span&gt; button.&lt;/li&gt;&lt;/ol&gt;&lt;p style="font-weight: bold;"&gt;Providing access to the BPM Management portlet&lt;/p&gt;&lt;p&gt;Repeat the steps followed to grant access to the &lt;span style="font-style: italic;"&gt;Users Worklist&lt;/span&gt; portlet, but in step 7 select &lt;code&gt;operator&lt;/code&gt; rather than &lt;code&gt;user&lt;/code&gt; as membership type.&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;Providing access to the user management functions&lt;/p&gt;&lt;p&gt;Repeat the steps followed to grant access to the &lt;span style="font-style: italic;"&gt;Users Worklist&lt;/span&gt; portlet, but in step 5, navigate to the &lt;code&gt;/Platform/Administrators&lt;/code&gt; group and in step 7 select &lt;code&gt;manager&lt;/code&gt; as membership type.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568943604490253950-4074392992787047117?l=bonitaworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonitaworld.blogspot.com/feeds/4074392992787047117/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bonitaworld.blogspot.com/2009/06/user-management-on-bonita-console.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/4074392992787047117'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/4074392992787047117'/><link rel='alternate' type='text/html' href='http://bonitaworld.blogspot.com/2009/06/user-management-on-bonita-console.html' title='User management on Bonita Console'/><author><name>Luis Sanabria</name><uri>http://www.blogger.com/profile/13781535971948382221</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3568943604490253950.post-5350894530257861187</id><published>2009-06-05T18:13:00.001-06:00</published><updated>2009-06-08T15:53:43.429-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='API'/><category scheme='http://www.blogger.com/atom/ns#' term='Engine'/><title type='text'>Task execution in Nova Bonita (part 2)</title><content type='html'>&lt;p&gt;The &lt;a href="http://bonitaworld.blogspot.com/2009/06/task-execution-in-nova-bonita.html"&gt;previous post&lt;/a&gt; describes some basic principles related to task management in the &lt;a href="http://wiki.bonita.ow2.org/xwiki/bin/view/Main/WebHome"&gt;Nova Bonita&lt;/a&gt; BPM platform. Hook execution, the life cycle of the tasks  and the API calls necessary to manage them where among the items discussed.&lt;/p&gt;&lt;p&gt;A minimal application that applies those principles is provided and discussed in this post. This &lt;a href="http://java.sun.com/"&gt;Java&lt;/a&gt; class can be compiled and run as is. Information on how &lt;a href="http://bonitaworld.blogspot.com/2009/02/standalone-application-set-up.html"&gt;build the application&lt;/a&gt; and &lt;a href="http://bonitaworld.blogspot.com/2009/02/how-to-change-database-engine.html"&gt;set up the persistence environment&lt;/a&gt; can be found on previous posts. Please note some posts were written for previous versions of the Bonita platform. You will need to adjust the instructions to accommodate the &lt;a href="http://bonitaworld.blogspot.com/2009/03/setting-up-bonita-41.html"&gt;changes introduced by newer versions&lt;/a&gt;.&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;Full Code&lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;pre&gt;package org.bonitaworld;

import java.util.Iterator;
import javax.security.auth.login.*;
import org.ow2.bonita.facade.*;
import org.ow2.bonita.facade.exception.*;
import org.ow2.bonita.facade.runtime.*;
import org.ow2.bonita.facade.uuid.*;
import org.ow2.bonita.util.*;

public class TaskExecutionExample {

  public static void main(String[] arguments)
    throws LoginException, 
           TaskNotFoundException,
           IllegalTaskStateException,
           ActivityNotFoundException,
           VariableNotFoundException{

    TaskUUID taskUUID;
    String whatAction;
    LoginContext loginContext;
    ActivityInstance&lt;TaskInstance&gt; currentActivity;
  
    loginContext = 
      new LoginContext("Bonita",
                       new SimpleCallbackHandler("john", "bpm"));

    loginContext.login();
        
    RuntimeAPI runtimeAPI = AccessorUtil.getRuntimeAPI();
    QueryRuntimeAPI queryRuntimeAPI = AccessorUtil.getQueryRuntimeAPI();

    Iterator&amp;lt;ActivityInstance&amp;lt;TaskInstance&amp;gt;&amp;gt; myIterator =
      queryRuntimeAPI.getTaskList(ActivityState.READY).iterator();
     
    while (myIterator.hasNext()){

      currentActivity = myIterator.next();
      taskUUID = currentActivity.getBody().getUUID();
      runtimeAPI.startTask(taskUUID, true);

      whatAction = 
        (String)queryRuntimeAPI.getVariable(currentActivity.getUUID(),
                                            "Action");
       
      if (whatAction.compareTo("SUSPEND") == 0){
        runtimeAPI.suspendTask(taskUUID, true);
      }else {

        runtimeAPI.setVariable(currentActivity.getUUID(),
                               "Action",
                               "SUSPEND");
        
        runtimeAPI.finishTask(taskUUID, true);

      }
    }

    loginContext.logout();

  }
}&lt;/pre&gt;&lt;/code&gt;&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;Line by Line Explanation&lt;/p&gt;&lt;p&gt;&lt;code&gt;public static void main(String[] arguments) throws LoginException, TaskNotFoundException, IllegalTaskStateException, ActivityNotFoundException, VariableNotFoundException&lt;/code&gt;&lt;blockquote&gt;Exceptions are not properly managed in this example to reduce the complexity. In production applications, each kind of exception must be managed with try/catch blocks at the points where they are originated.&lt;/blockquote&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;loginContext = new LoginContext("Bonita", new SimpleCallbackHandler("john", "bpm"));&lt;br /&gt;loginContext.login();&lt;/code&gt;&lt;blockquote&gt;The default identity service included in the Bonita Platform distribution requires the applications to log in using the JAAS standard API. This sample application uses a very simple login module provided with the distribution, and the JAAS configuration file &lt;span style="font-style:italic;"&gt;jaas-standard.cfg&lt;/span&gt;, located in the &lt;span style="font-style:italic;"&gt;bonita-runtime-4.1.1/conf&lt;/span&gt; folder.&lt;/blockquote&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;RuntimeAPI runtimeAPI = AccessorUtil.getRuntimeAPI();&lt;/code&gt;&lt;blockquote&gt;This code provides the programmer with access to the Runtime API&lt;/blockquote&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;QueryRuntimeAPI queryRuntimeAPI = AccessorUtil.getQueryRuntimeAPI();&lt;/code&gt;&lt;blockquote&gt;This code provides the programmer with access to the Query Runtime API&lt;/blockquote&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;Iterator&amp;lt;ActivityInstance&amp;lt;TaskInstance&amp;gt;&amp;gt; myIterator = queryRuntimeAPI.getTaskList(ActivityState.READY).iterator();&lt;/code&gt;&lt;blockquote&gt;The &lt;code&gt;getTaskList(ActivityState.READY)&lt;/code&gt; returns all the activities assigned to the currently logged in user that are in &lt;span style="font-weight:bold;"&gt;READY&lt;/span&gt; status. This function can be used to get a list of activities in any other status or assigned to different users if that is necessary. The method returns a &lt;code&gt;java.util.Collection&lt;/code&gt; with elements of &lt;code&gt;ActivityInstance&lt;TaskInstance&gt;&lt;/code&gt; type. This instruction directly retrieves the &lt;code&gt;java.util.Iterator&lt;/code&gt; to process the tasks, but any other manipulation of the &lt;span style="font-style:italic;"&gt;Collection&lt;/span&gt; object is allowed. All activities in this list were processed previously by the BPM engine. That preprocessing included the execution of the OnReady hook, the Role Mapper and the Performer Assigner.&lt;/blockquote&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;taskUUID = currentActivity.getBody().getUUID();&lt;/code&gt;&lt;blockquote&gt;Tasks are the body of manual activities in the Bonita API. This function retrieves the UUID (Universal Unique IDentifier) of the task. This object is necessary to manage the task's life cycle.&lt;/blockquote&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;runtimeAPI.startTask(taskUUID, true);&lt;/code&gt;&lt;blockquote&gt;The &lt;code&gt;startTask()&lt;/code&gt; function signals to the Bonita Engine that it needs to move a task from the &lt;span style="font-weight:bold;"&gt;READY&lt;/span&gt; status to the &lt;span style="font-weight:bold;"&gt;EXECUTING&lt;/span&gt; one. This allows the system to know when a user started to work on one of the items on his/her TODO list. As part of this function call, the engine executes the OnStart hook.&lt;/blockquote&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;whatAction = (String)queryRuntimeAPI.getVariable(currentActivity.getUUID(), "Action");&lt;/code&gt;&lt;blockquote&gt;One important function that allows the communication between front-end applications and the instances of the business processes managed by the Bonita Engine is the retrieval of variable values. The &lt;code&gt;getVariable()&lt;/code&gt; method implements that function. In this case the value of a variable called &lt;span style="font-style:italic;"&gt;Action&lt;/span&gt; is retrieved to take business decisions later on.&lt;/blockquote&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;if (whatAction.compareTo("SUSPEND") == 0){&lt;/code&gt;&lt;blockquote&gt;This code makes use of a process variable value to instruct the application regarding the business logic to execute. In the case of this example, if the Action variable has the value &lt;span style="font-weight:bold;"&gt;SUSPEND&lt;/span&gt;, the task will be suspended. Otherwise, the task will be normally finished and the engine will move the process to the next activities.&lt;/blockquote&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;runtimeAPI.suspendTask(taskUUID, true);&lt;/code&gt;&lt;blockquote&gt;The &lt;code&gt;suspendTask()&lt;/code&gt; function changes the status of the task refered with with UUID from &lt;span style="font-weight:bold;"&gt;EXECUTING&lt;/span&gt; to &lt;span style="font-weight:bold;"&gt;SUSPENDED&lt;/span&gt;. It will triger the execution of the OnSuspend hook as well.&lt;/blockquote&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;runtimeAPI.setVariable(currentActivity.getUUID(), "Action", "SUSPEND");&lt;/code&gt;&lt;blockquote&gt;The &lt;code&gt;setVariable()&lt;/code&gt; function is the partner of &lt;code&gt;QueryRuntimeAPI.getVariable()&lt;/code&gt;. It allows the front end application to change the value of the process and instance variables. It receives the UUID of the activity where the variable value is going to be updated, the variable name and the value to store.&lt;/blockquote&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;runtimeAPI.finishTask(taskUUID, true);&lt;/code&gt;&lt;blockquote&gt;Once the application users complete a human activity (task) the BPM engine needs to be notified. The &lt;code&gt;finishTask()&lt;/code&gt; method allows the applications to do that. It moves the status of the provided task from the &lt;span style="font-weight:bold;"&gt;EXECUTING&lt;/span&gt; to the &lt;span style="font-weight:bold;"&gt;FINISHED&lt;/span&gt; status and it triggers the execution of the OnFinish hook. Additionally, it's during the execution of this method that the workflow engine works to determine the following activities to execute. Once it has reached the next manual activities, it creates the corresponding tasks, executes their Role Mappers, Performer Assigners and OnReady hooks.&lt;/blockquote&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568943604490253950-5350894530257861187?l=bonitaworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonitaworld.blogspot.com/feeds/5350894530257861187/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bonitaworld.blogspot.com/2009/06/task-execution-in-nova-bonita-part-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/5350894530257861187'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/5350894530257861187'/><link rel='alternate' type='text/html' href='http://bonitaworld.blogspot.com/2009/06/task-execution-in-nova-bonita-part-2.html' title='Task execution in Nova Bonita (part 2)'/><author><name>Luis Sanabria</name><uri>http://www.blogger.com/profile/13781535971948382221</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3568943604490253950.post-2353300742378093060</id><published>2009-06-01T06:32:00.004-06:00</published><updated>2009-07-27T07:05:51.221-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='API'/><category scheme='http://www.blogger.com/atom/ns#' term='Engine'/><title type='text'>Task execution in Nova Bonita (part 1)</title><content type='html'>&lt;p&gt;Task execution is one of the major functions to be performed by the applications implementing workflow capabilities with the &lt;a href="http://wiki.bonita.ow2.org/xwiki/bin/view/Main/WebHome"&gt;Nova Bonita BPM engine&lt;/a&gt;. Tasks are instances of manual activities, assigned to a user or a group of users and can be managed by a set of 5 basic API calls in the Nova Bonita API. Those methods move the task across the different status of its life cycle and trigger the execution of the associated components set up in the ProEd editor.&lt;/p&gt;&lt;p&gt;The following table describes the relations between the API calls, the task’s status and the calling sequence for the components set up in the business process model. The table rows are sorted according to their execution order, from top to bottom.&lt;/p&gt;&lt;table style="border-style: solid; border-width: 1px; width: 100%;"&gt;
&lt;tbody style="border-style: solid; border-width: 1px;"&gt;
&lt;tr&gt;
&lt;th style="border-style: solid; border-width: 1px; width: 40%;"&gt;Bonita API Calls&lt;/th&gt;
&lt;th style="border-style: solid; border-width: 1px;"&gt;Components Called&lt;/th&gt;
&lt;th style="border-style: solid; border-width: 1px;"&gt;Task Status&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-style: solid; border-width: 1px;"&gt;Previous task’s &lt;code&gt;finishTask()&lt;/code&gt; call or &lt;code&gt;instantiateProcess()&lt;/code&gt; call when the task is the first in the business process&lt;/td&gt;
&lt;td style="border-style: solid; border-width: 1px;"&gt;Role Mapper&lt;p&gt;
Performer Assignment&lt;/p&gt;&lt;p&gt;
Hook: OnReady&lt;/p&gt;&lt;/td&gt;
&lt;td style="border-style: solid; border-width: 1px;"&gt;READY&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-style: solid; border-width: 1px;"&gt;&lt;code&gt;startTask()&lt;/code&gt;&lt;/td&gt;
&lt;td style="border-style: solid; border-width: 1px;"&gt;Hook: OnStart&lt;/td&gt;
&lt;td style="border-style: solid; border-width: 1px;"&gt;EXECUTING&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-style: solid; border-width: 1px;"&gt;&lt;code&gt;suspendTask()&lt;/code&gt;&lt;/td&gt;
&lt;td style="border-style: solid; border-width: 1px;"&gt;Hook: OnSuspend&lt;/td&gt;
&lt;td style="border-style: solid; border-width: 1px;"&gt;SUSPENDED&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-style: solid; border-width: 1px;"&gt;&lt;code&gt;resumeTask()&lt;/code&gt;&lt;/td&gt;
&lt;td style="border-style: solid; border-width: 1px;"&gt;Hook: OnResume&lt;/td&gt;
&lt;td style="border-style: solid; border-width: 1px;"&gt;EXECUTING or READY&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-style: solid; border-width: 1px;"&gt;&lt;code&gt;finishTask()&lt;/code&gt;&lt;/td&gt;
&lt;td style="border-style: solid; border-width: 1px;"&gt;Hook: OnFinish&lt;p&gt;Next task’s Role Mapper&lt;/p&gt;&lt;p&gt;Next task’s Performer Assignment&lt;/p&gt;&lt;p&gt;Next task’s Hook: OnReady&lt;/p&gt;&lt;/td&gt;
&lt;td style="border-style: solid; border-width: 1px;"&gt;FINISHED&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Life Cycle (Task Status)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The life cycle of the tasks is composed of 4 main status: &lt;span style="font-weight: bold;"&gt;READY&lt;/span&gt;, &lt;span style="font-weight: bold;"&gt;EXECUTING&lt;/span&gt;, &lt;span style="font-weight: bold;"&gt;FINISHED &lt;/span&gt;and &lt;span style="font-weight: bold;"&gt;SUSPENDED&lt;/span&gt;. Tasks in &lt;span style="font-weight: bold;"&gt;READY &lt;/span&gt;status are those available for execution by one of the human users of the workflow system. The tasks in &lt;span style="font-weight: bold;"&gt;READY &lt;/span&gt;status, assigned to a user, form the TODO list (or worklist) of that user. A task status changes from &lt;span style="font-weight: bold;"&gt;READY &lt;/span&gt;to &lt;span style="font-weight: bold;"&gt;EXECUTING &lt;/span&gt;once it is selected from that list and the user starts working on it. At this point a task can be suspended, moving it temporally from &lt;span style="font-weight: bold;"&gt;EXECUTING &lt;/span&gt;to &lt;span style="font-weight: bold;"&gt;SUSPENDED &lt;/span&gt;state and the work can be resume moving it back from &lt;span style="font-weight: bold;"&gt;SUSPENDED &lt;/span&gt;to &lt;span style="font-weight: bold;"&gt;EXECUTING&lt;/span&gt;. Finally, the task moves to &lt;span style="font-weight: bold;"&gt;FINISHED &lt;/span&gt;status when the user has completed the task. You can see a graphical representation of the life cycle in the picture below, which is anotated with the API calls that execute the transitions.&lt;/p&gt;&lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_Q4pNv822dZY/Sm2mFBFNuFI/AAAAAAAAABY/0RTxAuZAn-E/s1600-h/TaskLifeCycle.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 265px;" src="http://1.bp.blogspot.com/_Q4pNv822dZY/Sm2mFBFNuFI/AAAAAAAAABY/0RTxAuZAn-E/s320/TaskLifeCycle.png" alt="" id="BLOGGER_PHOTO_ID_5363125336387991634" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Bonita API Calls&lt;/span&gt;&lt;/p&gt;&lt;p&gt;There are 5 main API calls that can be used to manage the life cycle of the tasks across the status mentioned above. Those calls have many variations and the methods themselves can perform the actions under a wider set of conditions than described here. However, for the sake of simplicity, this post focuses on their basic functionality. For more information you can check the Javadocs included with the &lt;span style="font-style: italic;"&gt;bonita-runtime-4.1.1&lt;/span&gt; package.&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;code&gt;QueryRuntimeAPI.getTaskList(ActivityState.READY)&lt;/code&gt;&lt;blockquote&gt;The &lt;code&gt;getTaskList()&lt;/code&gt; method, when called with the &lt;code&gt;ActivityState.READY&lt;/code&gt; parameter, returns the list of tasks that can be executed by the current logged in user. This list of tasks forms the TODO list for the user and once it is available to the client application, it can be iterated and the user can pick up a task to execute.&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;RuntimeAPI.startTask(TaskUUID, boolean)&lt;/code&gt;&lt;blockquote&gt;The &lt;code&gt;startTask()&lt;/code&gt; method moves the activity from the &lt;span style="font-weight: bold;"&gt;READY &lt;/span&gt;to the &lt;span style="font-weight: bold;"&gt;EXECUTING &lt;/span&gt;status, signaling the start of the work on the task by the human user of the system.&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;RuntimeAPI.suspendTask(TaskUUID)&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;RuntimeAPI.resumeTask(TaskUUID)&lt;/code&gt;&lt;blockquote&gt;These methods allow the movement of the tasks between the &lt;span style="font-weight: bold;"&gt;EXECUTING &lt;/span&gt;and &lt;span style="font-weight: bold;"&gt;SUSPENDED &lt;/span&gt;status. The main purpose of the &lt;span style="font-weight: bold;"&gt;SUSPENDED &lt;/span&gt;status is to allow the application users to record that they will not work continually in a task, which is a common situation on long running process steps like the ones usually modeled as human activities. One of the main benefits of this status is that the system will be able to accurately record the time spent working on a task.

The &lt;code&gt;suspendTask()&lt;/code&gt; method can be called either after the &lt;code&gt;startTask()&lt;/code&gt; method (while the task is in &lt;span style="font-weight: bold;"&gt;EXECUTING &lt;/span&gt;status) or before it (while the task is in &lt;span style="font-weight: bold;"&gt;READY &lt;/span&gt;status).
&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;RuntimeAPI.finishTask(TaskUUID, boolean)&lt;/code&gt;&lt;blockquote&gt;The &lt;code&gt;finishTask()&lt;/code&gt; method moves the activity from the &lt;span style="font-weight: bold;"&gt;EXECUTING&lt;/span&gt; to the &lt;span style="font-weight: bold;"&gt;FINISHED &lt;/span&gt;status and indicates to the workflow engine that it needs to move the process to the next activity. Once the execution of this method is completed, the task is considered finished and the Bonita BPM engine will take care of identifying the next activities to execute and the responsible parties, in order to continue the execution of the process instance.&lt;/blockquote&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Components Called: Hooks&lt;/span&gt;&lt;/p&gt;&lt;p&gt;When modeling a business process with ProEd, the modeler is able to reference hooks (Java classes) to integrate the process with back end systems or to access services external to the client application or the workflow engine. There are 5 different types of hooks that can be associated with a manual activity in the business process: &lt;span style="font-style: italic;"&gt;OnReady&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;OnStart&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;OnSuspend&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;OnResume &lt;/span&gt;and &lt;span style="font-style: italic;"&gt;OnFinish&lt;/span&gt;.&lt;/p&gt;&lt;p&gt;The &lt;span style="font-style: italic;"&gt;OnReady &lt;/span&gt;hook is called when the a task becomes available for the users to pick up and execute it. The hook is called as part of the &lt;code&gt;finishTask()&lt;/code&gt; method when called in the previous manual activity or as part of the &lt;code&gt;instantiateProcess()&lt;/code&gt; method, when the task is an instance of the first manual activity in a process. As the responsible to identify all the activities that need to be run after a task is completed, the &lt;code&gt;finishTask()&lt;/code&gt; method takes care (among other things) of creating all the necessary tasks and calling their &lt;span style="font-style: italic;"&gt;OnReady &lt;/span&gt;hooks.&lt;/p&gt;&lt;p&gt;The &lt;span style="font-style: italic;"&gt;OnStart &lt;/span&gt;hook is called as part of the &lt;code&gt;startTask()&lt;/code&gt; method, that signals the user’s intention to start working on the associated task, selected from his/her TODO list.&lt;/p&gt;&lt;p&gt;The &lt;span style="font-style: italic;"&gt;OnSuspend &lt;/span&gt;and &lt;span style="font-style: italic;"&gt;OnResume &lt;/span&gt;hooks are called as part of the corresponding API calls [&lt;code&gt;suspendTask()&lt;/code&gt; and &lt;code&gt;resumeTask()&lt;/code&gt;].&lt;/p&gt;&lt;p&gt;The &lt;span style="font-style: italic;"&gt;OnFinish &lt;/span&gt;hook is the last piece of back end code that is executed as part of a task and is intended to allow for final processing after a task is completed (as specified by the client application by calling the &lt;code&gt;finishTask()&lt;/code&gt; method) but before the next activities are determined by the system.&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;Role Mapper and Performer Assigners&lt;/p&gt;&lt;p&gt;The Bonita Workflow Engine uses &lt;span style="font-style: italic;"&gt;Role Mappers&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;Performer Assigners&lt;/span&gt; to determine what user or group of users is responsible to perform a task. The code associated to these functions is executed before the task’s &lt;span style="font-style: italic;"&gt;OnReady &lt;/span&gt;hook. The first of them is the &lt;span style="font-style: italic;"&gt;Role mapper&lt;/span&gt;. This function provides the engine with a list of candidates to perform the task. Once the &lt;span style="font-style: italic;"&gt;Role Mapper&lt;/span&gt; is executed the Engine proceeds to execute the &lt;span style="font-style: italic;"&gt;Performer Assigner&lt;/span&gt; (if there is any) and it determines the assigned user that must perform the task. The TODO list of a user is formed by all the tasks where he or she was assigned as responsible and those tasks without assigned user that include him or her in the list of candidates.&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;Final Comments&lt;/p&gt;&lt;p&gt;The elements discussed here are only a high level review of the main concepts behind the task management function in the Bonita BPM Platform. Once you have being able to retrieve, process and finish tasks in your application code, you will want to refer to the &lt;a href="http://wiki.bonita.ow2.org/xwiki/bin/view/Main/Documentation"&gt;documentation&lt;/a&gt; (Javadoc, Cookbook and Quick Start files) to take full advantage of the workflow engine capabilities.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568943604490253950-2353300742378093060?l=bonitaworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonitaworld.blogspot.com/feeds/2353300742378093060/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bonitaworld.blogspot.com/2009/06/task-execution-in-nova-bonita.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/2353300742378093060'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/2353300742378093060'/><link rel='alternate' type='text/html' href='http://bonitaworld.blogspot.com/2009/06/task-execution-in-nova-bonita.html' title='Task execution in Nova Bonita (part 1)'/><author><name>Luis Sanabria</name><uri>http://www.blogger.com/profile/13781535971948382221</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_Q4pNv822dZY/Sm2mFBFNuFI/AAAAAAAAABY/0RTxAuZAn-E/s72-c/TaskLifeCycle.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3568943604490253950.post-2463643330538114165</id><published>2009-05-25T06:17:00.002-06:00</published><updated>2009-05-25T08:07:42.153-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='General'/><title type='text'>Bonita 4.1.1 was released</title><content type='html'>&lt;p&gt;Last week the Bonita &lt;a href="http://wiki.bonita.ow2.org/xwiki/bin/view/Main/BonitaFaces"&gt;development team&lt;/a&gt; released the version &lt;a href="http://forge.ow2.org/project/shownotes.php?release_id=3277"&gt;4.1.1&lt;/a&gt; of the Nova Bonita platform. This version is a maintenance release with several bug fixes for all the components of the platform: the process editor, the console and the run-time environment.&lt;/p&gt;&lt;p&gt;In addition to the bug fixes, this version includes a preview of the &lt;span style="font-weight: bold; font-style: italic;"&gt;connectors&lt;/span&gt; functionality that is under development by the team. With this new feature, the developers will be able to encapsulate functionality in Java classes called connectors and access it from the process hooks. In future versions, once the &lt;a href="http://wiki.bonita.ow2.org/xwiki/bin/view/Main/Roadmap"&gt;BPM Studio&lt;/a&gt; is released, it will be possible for the process designers to load, configure and use the connectors without the need to write any Java code.&lt;/p&gt;&lt;p&gt;The current version has several build-in connectors. The most notable of them are a &lt;a href="http://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol"&gt;SMTP&lt;/a&gt; connector for sending e-mails without the need to use the &lt;a href="http://java.sun.com/products/javamail/"&gt;Java Mail&lt;/a&gt; API and a connector to perform searches on identity services that comply with the &lt;a href="http://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol"&gt;LDAP&lt;/a&gt; standard.&lt;/p&gt;In the section 7.11 of the updated Cookbook document (located in &lt;code&gt;bonita-runtime-4.1.1/doc&lt;/code&gt;), you will find instructions to use the existing connectors and to create new ones that suit your needs.
&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568943604490253950-2463643330538114165?l=bonitaworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonitaworld.blogspot.com/feeds/2463643330538114165/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bonitaworld.blogspot.com/2009/05/bonita-411-was-released.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/2463643330538114165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/2463643330538114165'/><link rel='alternate' type='text/html' href='http://bonitaworld.blogspot.com/2009/05/bonita-411-was-released.html' title='Bonita 4.1.1 was released'/><author><name>Luis Sanabria</name><uri>http://www.blogger.com/profile/13781535971948382221</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3568943604490253950.post-6831652466074915887</id><published>2009-04-08T06:50:00.000-06:00</published><updated>2009-04-08T09:58:53.282-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HowTo'/><category scheme='http://www.blogger.com/atom/ns#' term='Deployed'/><category scheme='http://www.blogger.com/atom/ns#' term='Console'/><title type='text'>Accessing a Bonita J EE deployment with the Console</title><content type='html'>&lt;p&gt;The Bonita Console is configured to deploy and work with processes in an embedded instance of the BPM engine.&lt;/p&gt;&lt;p&gt;If you deployed the Bonita engine as a J EE application you will have to either develop your own administrative console from scratch, use the provided Ant tasks for management (described in the Bonita Cookbook, section 7.4) or reconfigure the console to access the remote engine instead of the embedded one.&lt;/p&gt;&lt;p&gt;The following steps show how to reconfigure the console to access a Bonita engine deployed in an application server:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Set the API Type variable.&lt;/li&gt;&lt;li&gt;Set the initial context properties.&lt;code&gt;
&lt;/code&gt;&lt;/li&gt;&lt;li&gt;Include the client libraries.&lt;/li&gt;&lt;li&gt;JAAS settings to propagate the client security identity.&lt;/li&gt;&lt;li&gt;Changing the console's default port (optional)
&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;I will further discuss each one of those steps in the following sections.&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Set the API Type variable&lt;/span&gt;&lt;/p&gt;&lt;p&gt;For the Bonita classes in the console to work as a facade to an engine deployed in a remote server rather than as an embedded solution you need to set the API type variable (&lt;code&gt;org.ow2.bonita.api-type&lt;/code&gt;) with either &lt;span style="font-weight: bold;"&gt;EJB2&lt;/span&gt; or &lt;span style="font-weight: bold;"&gt;EJB3&lt;/span&gt; values (depending on the EJB environment you are using).&lt;/p&gt;&lt;p&gt;The easiest way to do it is by editing the &lt;span style="font-style: italic;"&gt;bpm.bat&lt;/span&gt; or &lt;span style="font-style: italic;"&gt;bpm.sh&lt;/span&gt; file (in the &lt;span style="font-style: italic;"&gt;bonita-console-4.1/bin&lt;/span&gt; folder). There you can change the value of the &lt;span style="font-weight: bold;"&gt;BONITA_OPTS&lt;/span&gt; variable from &lt;code&gt;-Dorg.ow2.bonita.environment=bonita-environment.xml&lt;/code&gt; to &lt;code&gt;-Dorg.ow2.bonita.api-type=EJB2&lt;/code&gt; or &lt;code&gt;-Dorg.ow2.bonita.api-type=EJB3&lt;/code&gt;. Since the &lt;code&gt;org.ow2.bonita.environment&lt;/code&gt; variable is used only in the server side of the Bonita engine, it will not be necessary anymore and can be safely replaced with the settings for the API type variable.&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Set the initial context properties&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Since the Bonita Engine will be running in a different Java virtual machine than the Bonita Console, the latter needs to know the network location of the former, even if it is in the same physical machine.&lt;/p&gt;&lt;p&gt;This is done by setting 2 standard &lt;a style="font-weight: bold;" href="http://java.sun.com/products/jndi/"&gt;JNDI&lt;/a&gt; properties: &lt;code&gt;java.naming.factory.initial&lt;/code&gt; and &lt;code&gt;java.naming.provider.url&lt;/code&gt;. The best way to provide the values for those variables is by editing the &lt;span style="font-style: italic;"&gt;WEB-INF/conf/common/common-configuration.xml&lt;/span&gt; file, located in the &lt;span style="font-style: italic;"&gt;bonita-console-4.1/webapps/portal.war&lt;/span&gt; application. At the beginning of that file, you will find commented  XML elements that will set the properties with the values for each one of the environments supported by default (&lt;a href="http://wiki.jonas.ow2.org/xwiki/bin/view/Main/WebHome"&gt;Jonas&lt;/a&gt;, &lt;a href="http://www.jboss.org/jbossas/"&gt;JBoss&lt;/a&gt; and &lt;a href="http://wiki.easybeans.org/xwiki/bin/view/Main/WebHome"&gt;EasyBeans&lt;/a&gt;). You just need to uncomment the pair of properties for your environment and update the IP and port of Bonita Engine's location in the value of the &lt;code&gt;java.naming.provider.url&lt;/code&gt; property. Steps 1 to 6, 9 and 10 of &lt;a href="http://bonitaworld.blogspot.com/2009/04/changing-default-database-of-userrole.html"&gt;this post&lt;/a&gt; will give you detailed instructions on how to modify and rebuild the &lt;span style="font-weight: bold;"&gt;WAR&lt;/span&gt; file.&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Include the client libraries&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The Bonita Console will needed additional libraries with the code necessary to connect to the application server were the engine is deployed, that can be included in the classpath by adding them to the &lt;span style="font-style: italic;"&gt;bonita-console-4.1/lib&lt;/span&gt; folder.&lt;/p&gt;&lt;p&gt;Those libraries need to be provided by your application server vendor. For example, for Jonas 5 you will have to include a &lt;a href="http://jonas.ow2.org/JONAS_5_1_0/doc/doc-en/html/j2eeclient_pg.html#client.launch"&gt;client.jar file&lt;/a&gt;, for JBoss 4.0 you will have to include a file called jbossall-client.jar and for JBoss 5.0 you will have to provide several &lt;a href="https://jira.jboss.org/jira/browse/JBAS-4355"&gt;different JAR files&lt;/a&gt;. Most of the time those files are provided with the AS distribution.&lt;/p&gt;&lt;p&gt;Since &lt;a href="http://tomcat.apache.org/"&gt;Tomcat&lt;/a&gt;, &lt;a href="http://www.exoplatform.com/portal/public/en/"&gt;Exo&lt;/a&gt; and the Bonita Console make use of some common libraries (like &lt;a href="http://logging.apache.org/log4j/index.html"&gt;Log4J&lt;/a&gt;) you will need to check the libraries you are adding from your application server are not already provided in the  &lt;span style="font-style: italic;"&gt;bonita-console-4.1/lib&lt;/span&gt; folder or you will have classloading or API version issues. Ideally,  you should keep the newer version of the library in case of conflicts.&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;JAAS settings to propagate the client security identity&lt;/span&gt;&lt;/p&gt;&lt;p&gt;For the Bonita Engine to know what user is currently logged in the Console, you will need change the Console's JAAS settings to include a login module that can &lt;a href="http://java.sun.com/javaee/5/docs/tutorial/doc/bnbyl.html#bnbyz"&gt;propagate the client's security identity&lt;/a&gt; to the application server.&lt;/p&gt;&lt;p&gt;That login module needs to be included as the last module of the &lt;span style="font-style: italic;"&gt;exo-domain&lt;/span&gt; section in the &lt;span style="font-style: italic;"&gt;bonita-console-4.1/conf/jaas.conf&lt;/span&gt; file.&lt;/p&gt;&lt;p&gt;The actual login module to use depends on the application server that you are using. However, you can find sample settings for the environments supported out of the box in the &lt;span style="font-style: italic;"&gt;bonita-runtime-4.1/conf/jaas-*.cfg&lt;/span&gt; files.&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Changing the console's default port (optional)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;If you are running the application server and the console in the same machine, make sure they are not using the same port to publish the web applications (for example, both Bonita Console and JBoss use 8080 as the default port). You can change the console's default port by editing the &lt;span style="font-style: italic;"&gt;bonita-console-4.1/conf/server.xml&lt;/span&gt; file as described &lt;a href="http://www.mkyong.com/tomcat/how-to-change-tomcat-default-port/"&gt;here&lt;/a&gt;.
&lt;span style="font-family:monospace;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568943604490253950-6831652466074915887?l=bonitaworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonitaworld.blogspot.com/feeds/6831652466074915887/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bonitaworld.blogspot.com/2009/04/accessing-bonita-j-ee-deployment-with.html#comment-form' title='15 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/6831652466074915887'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/6831652466074915887'/><link rel='alternate' type='text/html' href='http://bonitaworld.blogspot.com/2009/04/accessing-bonita-j-ee-deployment-with.html' title='Accessing a Bonita J EE deployment with the Console'/><author><name>Luis Sanabria</name><uri>http://www.blogger.com/profile/13781535971948382221</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>15</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3568943604490253950.post-8694040458143879081</id><published>2009-04-01T06:54:00.008-06:00</published><updated>2009-04-01T14:57:14.292-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HowTo'/><category scheme='http://www.blogger.com/atom/ns#' term='Database'/><category scheme='http://www.blogger.com/atom/ns#' term='Installation'/><category scheme='http://www.blogger.com/atom/ns#' term='Console'/><title type='text'>Database settings for user management in the Bonita Console</title><content type='html'>&lt;p&gt;The user management of the Bonita Console is delegated to the &lt;a href="http://www.exoplatform.org/"&gt;Exo Platform&lt;/a&gt; application. Because of that no tables for users and roles are created when &lt;a href="http://bonitaworld.blogspot.com/2009/02/how-to-change-database-engine.html"&gt;initializing the databases&lt;/a&gt; of the workflow engine.&lt;/p&gt;&lt;p&gt;Exo Platform has it's own &lt;a href="http://www.hibernate.org/"&gt;Hibernate&lt;/a&gt; connection that creates a database for user management using the &lt;a href="http://hsqldb.org/"&gt;HSQLDB&lt;/a&gt; database engine. If that solution is not suitable to your needs, it can be reconfigured to use an alternative database engine, just like the Bonita engine.&lt;/p&gt;&lt;p&gt;These are the steps necessary to make that change:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;If you haven't done it yet, &lt;a href="http://forge.ow2.org/project/showfiles.php?group_id=56"&gt;download&lt;/a&gt; and unzip the Nova Bonita Console file (&lt;span style="font-style: italic;"&gt;bonita-console-4.1.zip&lt;/span&gt; file)&lt;/li&gt;&lt;li&gt;Go to the &lt;span style="font-style: italic;"&gt;bonita-console-4.1/webapps&lt;/span&gt; folder and delete the folder called &lt;span style="font-style: italic;"&gt;portal&lt;/span&gt; if it is present. This will help to make sure the Tomcat application will redeploy the modified &lt;code&gt;portal.war&lt;/code&gt; file.&lt;/li&gt;&lt;li&gt;Copy the &lt;code&gt;portal.war&lt;/code&gt; file to an empty folder in a suitable location.&lt;/li&gt;&lt;li&gt;Open a command prompt/terminal window pointing to the folder were the &lt;code&gt;portal.war&lt;/code&gt; file was copied in the previous step.&lt;/li&gt;&lt;li&gt;Extract the contents of the &lt;code&gt;portal.war&lt;/code&gt; file. The default &lt;a href="http://java.sun.com/javase/6/docs/technotes/guides/jar/index.html"&gt;JAR utility&lt;/a&gt; included with the JDK can be used for this purpose:&lt;blockquote&gt;&lt;code&gt;&amp;gt; jar xvf portal.war&lt;/code&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;Delete the copied &lt;code&gt;portal.war&lt;/code&gt; file.&lt;/li&gt;&lt;li&gt;Create a database in your database server for Exo to store the users and roles.&lt;/li&gt;&lt;li&gt;Change the database settings by following the instructions on the &lt;a href="http://wiki.exoplatform.com/xwiki/bin/view/Portal/Database+Configuration"&gt;following page&lt;/a&gt; of Exo's knowledge base. The &lt;a href="http://wiki.exoplatform.com/xwiki/bin/view/JCR/JDBC+Data+Container+config"&gt;supported values&lt;/a&gt; for the dialect parameter described in section 3 are:&lt;blockquote&gt;&lt;code&gt;hsqldb, mysql, mysql-utf8, pgsql, oracle, oracle-oci, mssql, sybase, derby, db2, db2v8&lt;/code&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;Create a &lt;code&gt;portal.war&lt;/code&gt; file with the modified files by using the JAR utility:&lt;blockquote&gt;&lt;code&gt;&amp;gt; jar cvf portal.war *&lt;/code&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;Copy the generated &lt;code&gt;portal.war&lt;/code&gt; file to the deploy folder of Tomcat: &lt;span style="font-style: italic;"&gt;bonita-console-4.1/webapps&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://bonitaworld.blogspot.com/2009/01/how-to-use-bonita-out-of-box.html"&gt;Start the console&lt;/a&gt; for the Exo platform to create the necessary tables in the database and populate the default user's and roles.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Alternative Configuration Modes&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The Exo platform comes bundled with support for &lt;a href="http://en.wikipedia.org/wiki/LDAP"&gt;LDAP&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Active_Directory"&gt;Active Directory&lt;/a&gt;. If you prefer to use those environments, you will need to follow the instructions in &lt;a href="http://wiki.exoplatform.org/xwiki/bin/view/Core/LDAP+Configuration"&gt;this page&lt;/a&gt; in addition to those specified in step 8.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568943604490253950-8694040458143879081?l=bonitaworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonitaworld.blogspot.com/feeds/8694040458143879081/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bonitaworld.blogspot.com/2009/04/changing-default-database-of-userrole.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/8694040458143879081'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/8694040458143879081'/><link rel='alternate' type='text/html' href='http://bonitaworld.blogspot.com/2009/04/changing-default-database-of-userrole.html' title='Database settings for user management in the Bonita Console'/><author><name>Luis Sanabria</name><uri>http://www.blogger.com/profile/13781535971948382221</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3568943604490253950.post-821895885527366566</id><published>2009-03-31T06:38:00.001-06:00</published><updated>2009-04-01T14:56:32.456-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HowTo'/><category scheme='http://www.blogger.com/atom/ns#' term='Deployed'/><title type='text'>Connecting to Bonita in an AS (part II)</title><content type='html'>&lt;p&gt;Once the Bonita Runtime engine is &lt;a href="http://bonitaworld.blogspot.com/2009/03/deploying-bonita-in-application-server.html"&gt;deployed in an application server&lt;/a&gt;, it can be &lt;a href="http://bonitaworld.blogspot.com/2009/03/connecting-to-bonita-in-as-part-i.html"&gt;accessed from a remote client&lt;/a&gt; or from applications running in the same server, like EJBs, Web Modules (JSPs, Servlets, JSF, etc.) or Web Services.&lt;/p&gt;&lt;p&gt;To access the engine from the same application server you need to:&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Create the client J EE application&lt;/li&gt;&lt;li&gt;Include the Bonita Client library&lt;/li&gt;&lt;li&gt;Set the org.ow2.bonita.api-type variable&lt;/li&gt;&lt;li&gt;Deploy the client application
&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Create the client J EE application&lt;/span&gt;&lt;/p&gt;&lt;p&gt;First, you need to code your application, as described in the &lt;a href="http://wiki.bonita.ow2.org/xwiki/bin/download/Main/Documentation/bonita-4.1-BonitaCookBook.pdf"&gt;Cookbook document&lt;/a&gt;. The &lt;span style="font-weight: bold;"&gt;Bonita API&lt;/span&gt; is designed in such a way that your code will not need to change if you move from an embedded engine to one deployed in an application server or vice versa.&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;Include the Bonita Client library&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The Bonita API classes need to be included in your application's classpath.&lt;/p&gt;&lt;p&gt;At this point, it is important to understand correctly the class loading policy configured in the target environment. If the classes of the deployed applications are isolated from each other you will need to include the &lt;span style="font-style: italic;"&gt;bonita-client-4.1.jar&lt;/span&gt; library in your application's classpath.&lt;/p&gt;&lt;p&gt;However, if the target application server has a flat class pool (like JBoss' default settings), including the Bonita client library will generate exceptions (usually &lt;code&gt;ClassCastException&lt;/code&gt;) when trying to use the Bonita API. This is because some of the classes in the client library are present as well in the &lt;span style="font-weight: bold;"&gt;bonita.ear&lt;/span&gt; file and the application server will not know which one to use.&lt;/p&gt;&lt;p&gt;In that case, you have 2 options. The first one is to make sure the &lt;span style="font-style: italic;"&gt;bonita-client-4.1.jar&lt;/span&gt; library is NOT included in your application (avoiding the duplication of deployed classes). The other option is to &lt;a href="http://www.thorgull.be/doku.php?id=tutorials:jboss:classloaderisolation"&gt;reconfigure your environment&lt;/a&gt; to isolate the classes of different application packages.&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Set the org.ow2.bonita.api-type variable&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Since you are working with a Bonita engine deployed in an application server, you need to set the &lt;code&gt;org.ow2.bonita.api-type&lt;/code&gt; system property to the corresponding value. It will be either &lt;code&gt;EJB2&lt;/code&gt; or &lt;code&gt;EJB3&lt;/code&gt;, according to the type of &lt;span style="font-weight: bold;"&gt;EJB&lt;/span&gt; container that you are using. It should match the Ant task used to create the &lt;span style="font-weight: bold;"&gt;bonita.ear&lt;/span&gt; file: &lt;span style="font-style: italic;"&gt;ear.ejb2&lt;/span&gt; or &lt;span style="font-style: italic;"&gt;ear.ejb3&lt;/span&gt;.&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Deploy the client application&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Once you have coded and build your application and your environment is ready, the final step is to deploy it. There are not special considerations required when using Bonita, so you just need to follow the instructions of your vendor. &lt;a href="http://www.jboss.org/file-access/default/members/jbossas/freezone/docs/Installation_And_Getting_Started_Guide/5/html/Sample_JSF_EJB3_Application.html#Sample_JSF_EJB3_Application-Deploying_the_Application"&gt;In JBoss&lt;/a&gt;, you will need to copy your application package (&lt;span style="font-weight: bold;"&gt;EAR&lt;/span&gt;, &lt;span style="font-weight: bold;"&gt;JAR&lt;/span&gt; or &lt;span style="font-weight: bold;"&gt;WAR&lt;/span&gt;) into the deploy folder and the server will take care of everything else.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568943604490253950-821895885527366566?l=bonitaworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonitaworld.blogspot.com/feeds/821895885527366566/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bonitaworld.blogspot.com/2009/03/connecting-to-bonita-in-as-part-ii.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/821895885527366566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/821895885527366566'/><link rel='alternate' type='text/html' href='http://bonitaworld.blogspot.com/2009/03/connecting-to-bonita-in-as-part-ii.html' title='Connecting to Bonita in an AS (part II)'/><author><name>Luis Sanabria</name><uri>http://www.blogger.com/profile/13781535971948382221</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3568943604490253950.post-2322334224777239495</id><published>2009-03-18T06:40:00.001-06:00</published><updated>2009-04-01T14:56:32.456-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HowTo'/><category scheme='http://www.blogger.com/atom/ns#' term='Deployed'/><title type='text'>Connecting to Bonita in an AS (part I)</title><content type='html'>&lt;p&gt;The Bonita  platform can be deployed in an application server and accessed from a remote &lt;a href="http://forums.java.net/jive/thread.jspa?threadID=20349"&gt;client&lt;/a&gt;. To archive that, the applications must run on an client application container but the set up details for that will change between environments.&lt;/p&gt;To connect to a Bonita Runtime engine deployed in a JBoss server you need to:&lt;ol&gt;&lt;li&gt;Install the Bonita Runtime engine in an application server. You can see how to do that &lt;a href="http://bonitaworld.blogspot.com/2009/03/deploying-bonita-in-application-server.html"&gt;here&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Include the &lt;span style="font-style: italic;"&gt;bonita-client-4.1.jar&lt;/span&gt; library in your application’s classpath. It can be found in the &lt;span style="font-style: italic;"&gt;bonita-runtime-4.1/lib/client&lt;/span&gt; folder.&lt;/li&gt;&lt;li&gt;Include in your application’s classpath all the libraries that form part of your application server's client container. In the case of the JBoss AS, they are located in the &lt;span style="font-style: italic;"&gt;${jboss.home}/client&lt;/span&gt; folder.&lt;/li&gt;&lt;li&gt;Set up the properties required by the &lt;span style="font-weight: bold;"&gt;JNDI&lt;/span&gt; provider of your application server, so that your client code knows where the server lives. These properties will change between different application servers. In the case of JBoss those properties are:&lt;blockquote&gt;&lt;code&gt;java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=jnp://localhost:1099
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces&lt;/code&gt;&lt;/blockquote&gt;The preferred method to set up those properties is including a &lt;code&gt;jndi.properties&lt;/code&gt; file in your application’s classpath. You will need to change the host name (or IP) and port number in the &lt;code&gt;java.naming.provider.url&lt;/code&gt;  property to those of your application server installation.&lt;/li&gt;&lt;li&gt;Set the &lt;code&gt;org.ow2.bonita.api-type&lt;/code&gt; system property with value &lt;code&gt;EJB3&lt;/code&gt; or &lt;code&gt;EJB2&lt;/code&gt; according to the &lt;span style="font-weight: bold;"&gt;EJB&lt;/span&gt; container supported by your application server.&lt;/li&gt;&lt;li&gt;Build and run your application.&lt;/li&gt;&lt;/ol&gt;Steps 3 and 4 are specific to JBoss, you will need to check your system's documentation to identify how to address those items. The other steps are general for Bonita and should not change between application servers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568943604490253950-2322334224777239495?l=bonitaworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonitaworld.blogspot.com/feeds/2322334224777239495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bonitaworld.blogspot.com/2009/03/connecting-to-bonita-in-as-part-i.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/2322334224777239495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/2322334224777239495'/><link rel='alternate' type='text/html' href='http://bonitaworld.blogspot.com/2009/03/connecting-to-bonita-in-as-part-i.html' title='Connecting to Bonita in an AS (part I)'/><author><name>Luis Sanabria</name><uri>http://www.blogger.com/profile/13781535971948382221</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3568943604490253950.post-1511466700033836786</id><published>2009-03-16T07:12:00.005-06:00</published><updated>2009-04-01T14:56:32.457-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HowTo'/><category scheme='http://www.blogger.com/atom/ns#' term='Deployed'/><category scheme='http://www.blogger.com/atom/ns#' term='Installation'/><title type='text'>Deploying Bonita in an application server</title><content type='html'>&lt;p&gt;The Nova Bonita 4.1 workflow engine can be deployed as a Java Enterprise application in any compliant server. The default distribution includes all the necessary files to deploy directly into the &lt;a href="http://www.jboss.org/jbossas"&gt;JBoss&lt;/a&gt; and &lt;a href="http://wiki.jonas.objectweb.org/xwiki/bin/view/Main/WebHome"&gt;Jonas&lt;/a&gt; application servers, in both &lt;a href="http://www.jcp.org/en/jsr/detail?id=19"&gt;EJB 2&lt;/a&gt; and &lt;a href="http://www.jcp.org/en/jsr/detail?id=220"&gt;EJB 3&lt;/a&gt; versions.&lt;/p&gt;&lt;p&gt;The following steps describe how to deploy the engine in the JBoss application server:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Unzip de the Bonita engine found in the &lt;span style="font-style: italic;"&gt;bonita-runtime-4.1&lt;/span&gt; file.&lt;/li&gt;&lt;li&gt;Update the &lt;code&gt;hibernate-core.properties&lt;/code&gt; and &lt;code&gt;hibernate-history.properties&lt;/code&gt; files in the &lt;span style="font-style: italic;"&gt;bonita-runtime-4.1/conf&lt;/span&gt; folder with the settings necessary to connect to the databases you defined for your workflow systems. There are instructions on how to do that &lt;a href="http://bonitaworld.blogspot.com/2009/03/setting-up-bonita-41.html"&gt;here&lt;/a&gt; and &lt;a href="http://bonitaworld.blogspot.com/2009/02/how-to-change-database-engine.html"&gt;here&lt;/a&gt;. &lt;/li&gt;&lt;li&gt;Make sure the database drivers necessary to access your database are available in the server's classpath. In JBoss, you can do that by adding them to the &lt;span style="font-style: italic;"&gt;${jboss.home}/server/default/lib&lt;/span&gt; folder (assuming that you are using the default &lt;a href="http://www.jboss.org/file-access/default/members/jbossas/freezone/docs/Installation_And_Getting_Started_Guide/5/html/The_JBoss_Server___A_Quick_Tour.html#The_JBoss_Server___A_Quick_Tour-Server_Configurations"&gt;configuration&lt;/a&gt;) or you can put them in the &lt;span style="font-style: italic;"&gt;bonita-runtime-4.1/lib/server&lt;/span&gt; folder. Since you need to add the drivers to the latter in order to create the database schemas, it is possible that they will be there at this point, so you need to check they are only in one of the two places mentioned above to avoid any possible class loading conflicts.&lt;/li&gt;&lt;li&gt;Install the Apache Ant tool in your system if you don’t have it already. It can be downloaded from &lt;a href="http://ant.apache.org/bindownload.cgi"&gt;here&lt;/a&gt;. Installation instructions can be found &lt;a href="http://ant.apache.org/manual/index.html"&gt;here&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Open the &lt;span style="font-style: italic;"&gt;bonita-runtime-4.1&lt;/span&gt; folder in a terminal window/command prompt and run the command:&lt;blockquote&gt;&lt;code&gt;&amp;gt; ant ear.ejb2&lt;/code&gt;&lt;/blockquote&gt;if you are planning to deploy to an EJB 2 server or:&lt;blockquote&gt;&lt;code&gt;&amp;gt; ant ear.ejb3&lt;/code&gt;&lt;/blockquote&gt;if you are planning to deploy to an EJB 3 server.&lt;/li&gt;&lt;li&gt;Deploy the &lt;span style="font-weight: bold;"&gt;bonita.ear&lt;/span&gt; file created in the previous step to your application server installation. It will be located in &lt;span style="font-style: italic;"&gt;bonita-runtime-4.1/ear/ejb2&lt;/span&gt; if you ran the first task or in &lt;span style="font-style: italic;"&gt;bonita-runtime-4.1/ear/ejb3&lt;/span&gt; if you ran the second one. To perform the deployment in JBoss you just need to copy the ear file to the deploy folder, usually &lt;code&gt;${jboss.home}/server/default/deploy&lt;/code&gt; (again, assuming that you are using the default configuration).&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Security&lt;/span&gt;&lt;/p&gt;&lt;p&gt;It is necessary to consider that the default deployment (as described here) does not secure the services provided by the EJBs. You will need to secure them using standard &lt;a href="http://java.sun.com/javaee/5/docs/tutorial/doc/bnbwj.html"&gt;J EE security &lt;/a&gt;mechanisms before using the Bonita runtime engine in a production environment.&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Alternative application servers&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Steps 3 and 6 will change if you are working with an application server other than JBoss AS but they will be required never the less.&lt;/p&gt;&lt;p&gt;Additionally, step 5 will create an EAR that can be deployed without change in the JBoss, Jonas and EasyBeans systems. If you are working in other environment (e.g.: &lt;a href="http://www-01.ibm.com/software/webservers/appserv/was/"&gt;IBM WebSphere&lt;/a&gt;, &lt;a href="http://www.oracle.com/appserver/weblogic/standard-edition.html"&gt;Oracle WebLogic&lt;/a&gt;, &lt;a href="http://geronimo.apache.org/"&gt;Apache Geronimo&lt;/a&gt;, etc.) it will be necessary to include any additional files required by your platform in the resulting package.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568943604490253950-1511466700033836786?l=bonitaworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonitaworld.blogspot.com/feeds/1511466700033836786/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bonitaworld.blogspot.com/2009/03/deploying-bonita-in-application-server.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/1511466700033836786'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/1511466700033836786'/><link rel='alternate' type='text/html' href='http://bonitaworld.blogspot.com/2009/03/deploying-bonita-in-application-server.html' title='Deploying Bonita in an application server'/><author><name>Luis Sanabria</name><uri>http://www.blogger.com/profile/13781535971948382221</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3568943604490253950.post-3375841919616991543</id><published>2009-03-12T07:02:00.007-06:00</published><updated>2009-03-12T09:18:04.622-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Installation'/><title type='text'>Setting up Bonita 4.1</title><content type='html'>&lt;p&gt;The &lt;a href="https://forge.objectweb.org/forum/forum.php?forum_id=1534"&gt;new version&lt;/a&gt; of Nova Bonita is an incremental improvement, making it very similar to its predecessor. That makes the installation procedures almost the same as described before in &lt;a href="http://bonitaworld.blogspot.com/2009/01/how-to-use-bonita-out-of-box.html"&gt;this post&lt;/a&gt;. However, there are several differences that need to be taken in account when starting to work with this new version.&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Business Process Editor (ProEd)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The Eclipse plugin version of ProEd comes with several bug fixes and improvements &lt;a href="http://bonitaworld.blogspot.com/2009/03/nova-bonita-41.html"&gt;described before&lt;/a&gt;. However, from an installation point of view, the only notable difference is that the plugin is distributed as a JAR file rather than a folder like in Bonita 4.0.1. However, this change does not have any effect in the end user functionality.&lt;/p&gt;&lt;p&gt;When installing the new process designer, it is important to remove the previous version of the editor (&lt;span style="font-style: italic;"&gt;org.ow2.proed_4.2.1&lt;/span&gt;) from Eclipse before deploying the new version (&lt;span style="font-style: italic;"&gt;org.ow2.proed_4.2.2&lt;/span&gt;).&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Database Engine&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The default database engine was changed to &lt;a href="http://www.h2database.com/html/main.html"&gt;H2&lt;/a&gt; (rather than &lt;a href="http://hsqldb.org/"&gt;HSQLDB&lt;/a&gt;), that provides better performance and transactional support.&lt;/p&gt;&lt;p&gt;If you want to change the default engine (useful only for testing purposes), the database initiation can be performed exactly in the same way than in &lt;span style="font-style: italic;"&gt;Bonita 4.0.1&lt;/span&gt;, except that the &lt;code&gt;hibernate.properties&lt;/code&gt; file is no longer required, so you can skip step number 6 of &lt;a href="http://bonitaworld.blogspot.com/2009/02/how-to-change-database-engine.html"&gt;this post&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;One important difference is that the default settings in Bonita do not longer use the &lt;a href="http://www.javalobby.org/java/forums/t48846.html"&gt;Hibernate cache&lt;/a&gt; functionality. This change helps to avoid problems when using different Bonita instances to access the same database, a use case discussed very often in the &lt;a href="https://forge.objectweb.org/forum/?group_id=56"&gt;Bonita forums&lt;/a&gt;. Unless you are proficient in &lt;a href="http://www.hibernate.org/"&gt;Hibernate&lt;/a&gt;, I would stick with the default settings, even if using only one Bonita instance to access the databases.&lt;/p&gt;&lt;p&gt;As with the previous version, to set up the Bonita Console to use your new databases you need to replace the Hibernate files in &lt;span style="font-style: italic;"&gt;bonita_console_4.1/conf&lt;/span&gt; with your own and provide your database drivers in &lt;span style="font-style: italic;"&gt;bonita-console-4.1/lib&lt;/span&gt;.&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;Embedding in Applications&lt;/p&gt;&lt;p&gt;When embedding Bonita in your own application (described &lt;a href="http://bonitaworld.blogspot.com/2009/02/standalone-application-set-up.html"&gt;here&lt;/a&gt; and &lt;a href="http://bonitaworld.blogspot.com/2009/02/embedding-bonita-in-web-applications.html"&gt;here&lt;/a&gt;) there are 2 main changes that it is necessary to consider:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;The &lt;code&gt;environment.xml&lt;/code&gt; and &lt;code&gt;environment-xml-history.xml&lt;/code&gt; files were merged, now you only need to provide a single file called &lt;code&gt;bonita-environment.xml&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;The packages hosting the security classes (sample JAAS login modules and identify services) were changed from &lt;code&gt;org.ow2.novabpm.identity.auth&lt;/code&gt; to &lt;code&gt;org.ow2.bonita.identity.auth&lt;/code&gt;. You need to verify your JAAS configuration file to make the necessary changes and make sure you include in your application's classpath the JAR files located in &lt;span style="font-style: italic;"&gt;bonita-runtime-4.1/lib/easybeans&lt;/span&gt; in addition to the ones under &lt;span style="font-style: italic;"&gt;bonita-runtime-4.1/lib/server&lt;/span&gt;.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Migration from Bonita 4.0.1&lt;/span&gt;&lt;/p&gt;&lt;p&gt;One final aspect to consider is that there are several changes to the database schema between versions 4.0.1 and 4.1. Because of that, it is not possible just make a Bonita 4.1 engine work with an existing Bonita 4.0.1 database. The recommended path here is to let the existing processes finish in their Bonita 4.0.1 environment and then code your application to start all new processes in a separated instance of Bonita 4.1&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568943604490253950-3375841919616991543?l=bonitaworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonitaworld.blogspot.com/feeds/3375841919616991543/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bonitaworld.blogspot.com/2009/03/setting-up-bonita-41.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/3375841919616991543'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/3375841919616991543'/><link rel='alternate' type='text/html' href='http://bonitaworld.blogspot.com/2009/03/setting-up-bonita-41.html' title='Setting up Bonita 4.1'/><author><name>Luis Sanabria</name><uri>http://www.blogger.com/profile/13781535971948382221</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3568943604490253950.post-635496236398846470</id><published>2009-03-09T07:13:00.007-06:00</published><updated>2009-03-09T11:36:51.146-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='General'/><title type='text'>Nova Bonita 4.1</title><content type='html'>&lt;p&gt;Today the development team of the &lt;a href="http://wiki.bonita.objectweb.org/xwiki/bin/view/Main/WebHome"&gt;Bonita &lt;/a&gt;open source workflow engine released &lt;a href="https://forge.objectweb.org/forum/forum.php?forum_id=1534"&gt;version 4.1&lt;/a&gt; of the platform, including changes to the runtime engine, the process editor and the management console.&lt;/p&gt;&lt;p&gt;This new version has lots of bug fixes and new features. Among them:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://wiki.bonita.objectweb.org/xwiki/bin/view/Main/Documentation"&gt;The documentation&lt;/a&gt; was restructured in 2 different documents a Quick Start guide (like in &lt;span style="font-style: italic;"&gt;Bonita 4.0.1&lt;/span&gt;) and a Cookbook that includes the information of the other three documents of the previous version (&lt;span style="font-style: italic;"&gt;Console Guide, Development Guide and Reference Guide&lt;/span&gt;). This eliminates the existing duplication of concepts between the different documents.&lt;/li&gt;&lt;li&gt;The &lt;span style="font-style: italic;"&gt;create project&lt;/span&gt; wizard in the Eclipse process designer (&lt;span style="font-weight: bold;"&gt;ProEd&lt;/span&gt;) was improved to allow the creation of an &lt;span style="font-weight: bold;"&gt;XPDL &lt;/span&gt;file directly from there (if the user wishes to do so), rather than having to create the project and then going to create the file. Additionally, the default transition from the start to end activities was removed.&lt;/li&gt;&lt;li&gt;The Bonita Runtime &lt;code&gt;environment.xml&lt;/code&gt; and &lt;code&gt;environment-xml-history.xml&lt;/code&gt; files were merged into a new &lt;code&gt;bonita-environment.xml&lt;/code&gt; file.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Join XOR&lt;/span&gt; operations and asynchronous activities (with some limitations) are supported by the engine and the process editor.&lt;/li&gt;&lt;li&gt;Additionally, several bugs were fixed and the APIs were improved in several areas.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;This is not the full list of improvements, but the ones I was more interested on. For the full list, please check the &lt;a href="https://forge.objectweb.org/project/shownotes.php?release_id=3135"&gt;release notes&lt;/a&gt;. You can download Nova Bonita 4.1 from the &lt;a href="https://forge.objectweb.org/project/showfiles.php?group_id=56"&gt;files section&lt;/a&gt; of the project's forge in OW2.&lt;/p&gt;&lt;p&gt;The next major milestones will be the support for&lt;a href="http://www.wfmc.org/index.php?option=com_docman&amp;amp;task=doc_details&amp;amp;gid=40&amp;amp;Itemid=72"&gt; XPDL 2.0&lt;/a&gt; and &lt;a href="http://www.bpmn.org/"&gt;BPMN&lt;/a&gt;. You can check the full list in the &lt;a href="http://wiki.bonita.objectweb.org/xwiki/bin/view/Main/Roadmap"&gt;project's roadmap&lt;/a&gt; page.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568943604490253950-635496236398846470?l=bonitaworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonitaworld.blogspot.com/feeds/635496236398846470/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bonitaworld.blogspot.com/2009/03/nova-bonita-41.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/635496236398846470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/635496236398846470'/><link rel='alternate' type='text/html' href='http://bonitaworld.blogspot.com/2009/03/nova-bonita-41.html' title='Nova Bonita 4.1'/><author><name>Luis Sanabria</name><uri>http://www.blogger.com/profile/13781535971948382221</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3568943604490253950.post-3325586602016282736</id><published>2009-02-25T07:53:00.001-06:00</published><updated>2009-02-25T15:59:52.650-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HowTo'/><category scheme='http://www.blogger.com/atom/ns#' term='Embedded'/><title type='text'>Embedding Bonita in web applications</title><content type='html'>&lt;p&gt;It is possible to embed Bonita 4.0.1 on web applications just line it can be done on desktop ones. The basic steps are the same. Here I will describe how to do the deployment on &lt;a href="http://tomcat.apache.org/download-60.cgi"&gt;Tomcat 6.0.18&lt;/a&gt;:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Add the Bonita libraries in &lt;span style="font-style: italic;"&gt;bonita-runtime-4.0.1/lib/server&lt;/span&gt; to the application's classpath, except for the &lt;code&gt;servlet-api-2.3.jar&lt;/code&gt; library, since this one will conflict with Tomcat's own servlet library. In the case of applications deployed as &lt;span style="font-weight: bold;"&gt;WAR&lt;/span&gt; files in Tomcat, they must be located in the &lt;span style="font-style: italic;"&gt;WEB-INF/lib&lt;/span&gt; folder.&lt;/li&gt;&lt;li&gt;Add the &lt;code&gt;environment.xml&lt;/code&gt;, &lt;code&gt;environment-history.xml&lt;/code&gt;, &lt;code&gt;hibernate.properties&lt;/code&gt;, &lt;code&gt;hibernate-core.properties&lt;/code&gt; and &lt;code&gt;hibernate-history.properties&lt;/code&gt; files to the application's classpath. In &lt;span style="font-weight: bold;"&gt;WAR&lt;/span&gt; packages this can be done by adding the files to the &lt;span style="font-style: italic;"&gt;WEB-INF/classes&lt;/span&gt; folder.&lt;/li&gt;&lt;li&gt;Add the &lt;span style="font-weight: bold;"&gt;JAR&lt;/span&gt; files with your database driver's to Tomcat's lib folder.&lt;/li&gt;&lt;li&gt;Configure your web application to use &lt;span style="font-weight: bold;"&gt;JAAS&lt;/span&gt; security with a login module of your choice. Detailed instructions on how to do that in Tomcat 6.0 are &lt;a href="http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html#JAASRealm"&gt;available here&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Modify your JAAS configuration to include the login module required by the Bonita Engine: &lt;code&gt;org.ow2.novabpm.identity.auth.StorageLoginModule&lt;/code&gt;. It must be flagged as required and it must be the last in the chain of login modules you have configured for your application. No one of the login modules configured must be flagged as sufficient. If you do so and one of the login modules succeed, the control will return to the application before actually running Bonita's module. This will make the Bonita engine to raise a security exception.&lt;/li&gt;&lt;li&gt;Add the system property &lt;code&gt;org.ow2.bonita.api-type&lt;/code&gt; with &lt;code&gt;Standard&lt;/code&gt; value to the &lt;span style="font-weight: bold;"&gt;JAVA_OPTS&lt;/span&gt; environment variable. This can be done editing the &lt;code&gt;catalina.bat&lt;/code&gt; file found in the bin folder of the Tomcat distribution. &lt;/li&gt;&lt;li&gt;Compile and deploy your application.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;In general, Bonita is not affected if deployed embedded in a web application or in a desktop one, as long as the necessary resources are available in the classpath. The only limitation is imposed by the use of a system property to specify the API type (either EJB2, EJB3 or Standard) because it is system wide, meaning that you cannot have in the same Tomcat server an application with Bonita embedded and another with Bonita as a client to a server deployed somewhere else.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568943604490253950-3325586602016282736?l=bonitaworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonitaworld.blogspot.com/feeds/3325586602016282736/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bonitaworld.blogspot.com/2009/02/embedding-bonita-in-web-applications.html#comment-form' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/3325586602016282736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/3325586602016282736'/><link rel='alternate' type='text/html' href='http://bonitaworld.blogspot.com/2009/02/embedding-bonita-in-web-applications.html' title='Embedding Bonita in web applications'/><author><name>Luis Sanabria</name><uri>http://www.blogger.com/profile/13781535971948382221</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3568943604490253950.post-6240053001465412798</id><published>2009-02-18T07:33:00.005-06:00</published><updated>2009-02-18T09:25:29.454-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HowTo'/><category scheme='http://www.blogger.com/atom/ns#' term='Embedded'/><title type='text'>Standalone application set up</title><content type='html'>&lt;p&gt;Nova Bonita 4.0.1 can be deployed as an embedded library part of Java Standard Edition applications. To do that you need to follow the steps listed below:&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Take the &lt;code&gt;environment.xml&lt;/code&gt; and &lt;code&gt;environment-xml-history.xml&lt;/code&gt; found in the&lt;span style="font-style: italic;"&gt; bonita-runtime-4.0.1/conf&lt;/span&gt; folder and include them in your application's folder.
&lt;/li&gt;&lt;li&gt;Customize the Hibernate properties files (&lt;code&gt;hibernate.properties&lt;/code&gt;, &lt;code&gt;hibernate-core.properties&lt;/code&gt; and &lt;code&gt;hibernate-history.properties&lt;/code&gt;) according to your database settings (more details can be found on &lt;a href="http://bonitaworld.blogspot.com/2009/02/how-to-change-database-engine.html"&gt;this post&lt;/a&gt;) and include them in the same folder you included the XML files mentioned in the previous step.
&lt;/li&gt;&lt;li&gt;Add the folder that contains the configuration files provided in steps 2 and 3 to the classpath of your application.&lt;/li&gt;&lt;li&gt;Add the database drivers necessary to support the selected database engine (configured in step 2) to your application's classpath.
&lt;/li&gt;&lt;li&gt;Add all the libraries (JAR files) found in the &lt;span style="font-style: italic;"&gt;bonita-runtime-4.0.1/lib/server&lt;/span&gt; folder to your application's classpath.&lt;/li&gt;&lt;li&gt;Include in your application a &lt;a href="http://java.sun.com/j2se/1.5.0/docs/guide/security/jaas/JAASRefGuide.html"&gt;JAAS&lt;/a&gt; configuration file. The &lt;span style="font-style: italic;"&gt;bonita-runtime-4.0.1&lt;/span&gt; package includes a sample file called &lt;code&gt;jaas-standard.cfg&lt;/code&gt; (located in the &lt;span style="font-style: italic;"&gt;bonita-runtime-4.0.1/conf&lt;/span&gt; folder) that can be use to get things up and running quickly, but it is not suitable for production use.
&lt;/li&gt;&lt;li&gt;Set the system property &lt;code&gt;java.security.auth.login.config&lt;/code&gt; with the path of the &lt;code&gt;jaas-configuration.cfg&lt;/code&gt; file.&lt;/li&gt;&lt;li&gt;Set the system property &lt;code&gt;org.ow2.bonita.api-type&lt;/code&gt; with the value &lt;code&gt;Standard&lt;/code&gt; to signal the use of Bonita as an embedded engine.
&lt;/li&gt;&lt;li&gt;Run the application!&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Setting a security environment (steps 6 and 7) and performing a JAAS login in the application are necessary for the Bonita Engine to work properly. The default &lt;code&gt;jaas-configuration.cfg&lt;/code&gt; file provided has a very simple implementation of security that lists the user names and passwords in the configuration file itself and must be replaced with a real login module for use with any production application.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568943604490253950-6240053001465412798?l=bonitaworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonitaworld.blogspot.com/feeds/6240053001465412798/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bonitaworld.blogspot.com/2009/02/standalone-application-set-up.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/6240053001465412798'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/6240053001465412798'/><link rel='alternate' type='text/html' href='http://bonitaworld.blogspot.com/2009/02/standalone-application-set-up.html' title='Standalone application set up'/><author><name>Luis Sanabria</name><uri>http://www.blogger.com/profile/13781535971948382221</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3568943604490253950.post-4709412163178351924</id><published>2009-02-13T07:22:00.008-06:00</published><updated>2009-02-13T08:32:59.143-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='API'/><title type='text'>Java objects for XPDL data types</title><content type='html'>&lt;p&gt;The Bonita workflow system allows the programmers to access the values of &lt;a href="http://www.wfmc.org/xpdl.html"&gt;XPDL&lt;/a&gt; variables (both process and activity variables) by means of its application programming interface (&lt;span style="font-style: italic;"&gt;API&lt;/span&gt;). That access is provided by 2 methods, part of the &lt;code&gt;QueryRuntimeAPI&lt;/code&gt; object:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;code&gt;getVariable()&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;getActivityInstanceVariable()&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;They receive the &lt;span style="font-style: italic;"&gt;UUID&lt;/span&gt; (Universally Unique IDentifier) of the activity to be used as a reference to get the data and a string with the name of the variable in the &lt;span style="font-style: italic;"&gt;XPDL&lt;/span&gt; file (process model). In turn, they return a &lt;span style="font-style: italic;"&gt;Java&lt;/span&gt; object of type &lt;code&gt;java.lang.Object&lt;/code&gt; that must be cast to the appropriate &lt;span style="font-style: italic;"&gt;Java&lt;/span&gt; type, according to the type defined for the variable.&lt;/p&gt;&lt;p&gt;In &lt;span style="font-style: italic;"&gt;Nova Bonita 4.0.1&lt;/span&gt;, the match between &lt;span style="font-style: italic;"&gt;XPDL&lt;/span&gt; variable types and Java objects is as follows:&lt;/p&gt;&lt;table style="width: 100%;border-style: solid;border-width: 1px"&gt;&lt;tbody style="border-style: solid;border-width: 1px"&gt;&lt;tr&gt;
&lt;th style="border-style: solid;border-width: 1px"&gt;XPDL Variable Type (ProEd)&lt;/th&gt;
&lt;th style="border-style: solid;border-width: 1px"&gt;Java Object (Bonita API)&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-style: solid;border-width: 1px"&gt;Integer&lt;/td&gt;
&lt;td style="border-style: solid;border-width: 1px"&gt;&lt;code&gt;java.lang.Long&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-style: solid;border-width: 1px"&gt;Float&lt;/td&gt;
&lt;td style="border-style: solid;border-width: 1px"&gt;&lt;code&gt;java.lang.Double&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-style: solid;border-width: 1px"&gt;Boolean&lt;/td&gt;
&lt;td style="border-style: solid;border-width: 1px"&gt;&lt;code&gt;java.lang.Boolean&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-style: solid;border-width: 1px"&gt;Date&lt;/td&gt;
&lt;td style="border-style: solid;border-width: 1px"&gt;&lt;code&gt;java.util.Date&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-style: solid;border-width: 1px"&gt;String&lt;/td&gt;
&lt;td style="border-style: solid;border-width: 1px"&gt;&lt;code&gt;java.lang.String&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-style: solid;border-width: 1px"&gt;Enumeration&lt;/td&gt;
&lt;td style="border-style: solid;border-width: 1px"&gt;&lt;code&gt;org.ow2.bonita.facade.runtime.var.Enumeration&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;The &lt;code&gt;Enumeration&lt;/code&gt; Java object is part of the Bonita API and provides 2 methods to access of the Enumeration variables:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;code&gt;getPossibleValues()&lt;/code&gt;: Returns a java.util.Set of Strings with the list of possible values that this variable can take. Those values are the ones defined by the process developer or business analyst in the ProEd designer.&lt;/li&gt;&lt;li&gt;&lt;code&gt;getSelectedValue()&lt;/code&gt;: This method returns a String with the value of the variable. It is always going to be one of the possible values defined in the ProEd designer and it will be part of the list of values returned by the &lt;code&gt;getPossibleValues()&lt;/code&gt; method.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Example&lt;/span&gt;&lt;/p&gt;&lt;p&gt;As an example, the Java code to access an Integer variable called "myInteger" would look like as follows:&lt;/p&gt;&lt;blockquote&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;APIAccessor a = &lt;/code&gt;&lt;code&gt;AccessorUtil.getAPIAccessor();&lt;br /&gt;

QueryRuntimeAPI q = a.getQueryRuntimeAPI();&lt;br /&gt;

Object o = q.getVariable(activityUUID, "myInteger");&lt;br /&gt;

Long l= (Long)o;&lt;br /&gt;

long number = l.longValue();
&lt;/code&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568943604490253950-4709412163178351924?l=bonitaworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonitaworld.blogspot.com/feeds/4709412163178351924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bonitaworld.blogspot.com/2009/02/java-objects-for-xpdl-data-types.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/4709412163178351924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/4709412163178351924'/><link rel='alternate' type='text/html' href='http://bonitaworld.blogspot.com/2009/02/java-objects-for-xpdl-data-types.html' title='Java objects for XPDL data types'/><author><name>Luis Sanabria</name><uri>http://www.blogger.com/profile/13781535971948382221</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3568943604490253950.post-4381550448872127545</id><published>2009-02-09T07:22:00.000-06:00</published><updated>2009-02-09T11:32:43.191-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HowTo'/><category scheme='http://www.blogger.com/atom/ns#' term='Database'/><category scheme='http://www.blogger.com/atom/ns#' term='Installation'/><category scheme='http://www.blogger.com/atom/ns#' term='Console'/><title type='text'>How to change the database engine</title><content type='html'>&lt;p&gt;One of the first tasks that needs to be done when working with the &lt;a href="http://wiki.bonita.objectweb.org/xwiki/bin/view/Main/WebHome"&gt;Bonita workflow engine&lt;/a&gt;, is to change the default database. Both the Bonita Console and the Bonita Runtime packages come bundled with a default engine called &lt;a href="http://hsqldb.org/"&gt;HSQLDB &lt;/a&gt;that allows the users to quickly start working without the need to configure a database management system. HSQLDB is a very powerful tool when embedded databases are necessary, but it's not suitable when a full featured database is required.&lt;/p&gt;&lt;p&gt;To use an alternative database engine two main steps are required. The first one is to create the databases on the database management system and the second one is to configure the engine to use it. Here I will describe how to create the databases and how to configure the Bonita Console to use them. I will talk on how to configure custom made applications on later posts.
&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Creation of the Database Schema&lt;/span&gt;
&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Create 2 databases in your database management system. One for the definition and runtime information (called by default: &lt;span style="font-style: italic;"&gt;bonita_core&lt;/span&gt;) and other for the history information (called by default: &lt;span style="font-style: italic;"&gt;bonita_history&lt;/span&gt;). Their default names can be changed to others that match your naming conventions.&lt;/li&gt;&lt;li&gt;Download and unzip the Bonita Runtime package (&lt;span style="font-style: italic;"&gt;bonita-runtime-4.0.1&lt;/span&gt;). This package includes the &lt;a href="http://ant.apache.org/"&gt;Ant&lt;/a&gt; script and the libraries required to create the database schemas.
&lt;/li&gt;&lt;li&gt;Add the database driver files to the &lt;span style="font-style: italic;"&gt;bonita-runtime-4.0.1/lib/server&lt;/span&gt; folder.&lt;/li&gt;&lt;li&gt;Update the &lt;code&gt;hibernate-core.properties&lt;/code&gt; file (located in the &lt;span style="font-style: italic;"&gt;bonita-runtime-4.0.1/conf &lt;/span&gt;folder) with the information of your &lt;span style="font-style: italic;"&gt;bonita_core&lt;/span&gt; database and database management system. There are 3 properties in there that are specific to the database engine: &lt;code&gt;hibernate.dialect&lt;/code&gt;, &lt;code&gt;hibernate.connection.driver_class&lt;/code&gt; and &lt;code&gt;hibernate.connection.url&lt;/code&gt;. At the top of the default properties file, there are sample values for all the supported systems (&lt;a href="http://hsqldb.org/"&gt;HSQLDB&lt;/a&gt;, &lt;a href="http://www.mysql.com/"&gt;MySQL&lt;/a&gt;, &lt;a href="http://www.postgresql.org/"&gt;PostgreSQL &lt;/a&gt;and &lt;a href="http://www.oracle.com/database/index.html"&gt;Oracle&lt;/a&gt;). Additionally, you need to update the database user name and password that the script will use to create the schema, using the properties &lt;code&gt;hibernate.connection.username&lt;/code&gt; and &lt;code&gt;hibernate.connection.password&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;Update the &lt;code&gt;hibernate-history.properties&lt;/code&gt; file with the information of your &lt;span style="font-style: italic;"&gt;bonita_history&lt;/span&gt; database. This file is located too in the &lt;span style="font-style: italic;"&gt;bonita-runtime-4.0.1/conf&lt;/span&gt; folder and the properties to modify are the same ones described in the previous step.
&lt;/li&gt;&lt;li&gt;Create a &lt;code&gt;hibernate.properties&lt;/code&gt; file as a copy of &lt;code&gt;hibernate-core.properties&lt;/code&gt;&lt;/li&gt;&lt;li&gt;To create the core database, run the Ant script from the base of the runtime package folder: &lt;code&gt;&amp;gt; ant init-db&lt;/code&gt;. When the script requests you to provide the &lt;a href="http://www.hibernate.org/"&gt;Hibernate&lt;/a&gt; configuration to use, type &lt;code&gt;hibernate-configuration:core&lt;/code&gt;&lt;/li&gt;&lt;li&gt;To create the history database, run the script like in the previous step, but provide &lt;code&gt;hibernate-configuration:history&lt;/code&gt; as the Hibernate configuration to use.&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-weight: bold;"&gt;Database Configuration for the Console&lt;/span&gt;&lt;p&gt;To use the new defined databases with the Bonita Console, you need to replace the default Hibernate properties files with the ones updated in steps 4 and 5 of the procedure listed above and restart the console. Those files are located in the conf folder of the console: &lt;span style="font-style: italic;"&gt;bonita-console-4.0.1\conf&lt;/span&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568943604490253950-4381550448872127545?l=bonitaworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonitaworld.blogspot.com/feeds/4381550448872127545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bonitaworld.blogspot.com/2009/02/how-to-change-database-engine.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/4381550448872127545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/4381550448872127545'/><link rel='alternate' type='text/html' href='http://bonitaworld.blogspot.com/2009/02/how-to-change-database-engine.html' title='How to change the database engine'/><author><name>Luis Sanabria</name><uri>http://www.blogger.com/profile/13781535971948382221</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3568943604490253950.post-4840060837775624544</id><published>2009-02-03T06:50:00.002-06:00</published><updated>2009-02-10T07:40:20.864-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Console'/><title type='text'>Dynamic options in combo boxes</title><content type='html'>&lt;p&gt;As &lt;a href="http://bonitaworld.blogspot.com/2009/01/customization-of-default-forms-in.html"&gt;discussed previously&lt;/a&gt;, the forms automatically generated by the Bonita Console can be customized. One case where that customization feature is useful is when you need to load a dynamic list of options in a combo box component, rather than using a list statically defined at deployment time. This case was &lt;a href="https://forge.objectweb.org/forum/forum.php?thread_id=6041&amp;amp;forum_id=153"&gt;discussed in the Bonita Forums&lt;/a&gt; during January. Since the thread is a bit long and the final solution is described across many messages, I will post a summary here.&lt;/p&gt;&lt;p&gt;The Bonita Console application makes use of the &lt;a href="http://www.exoplatform.org/"&gt;eXo Platform&lt;/a&gt; Web UI toolkit. That means that just painting and defining HTML components as part of the form is not going to work. To modify them it is necessary to use the API of the Web UI Framework. With that API you need to perform the following steps:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Import the class for the combo box option object. The class is called &lt;span style="font-style: italic;"&gt;SelectItemOption &lt;/span&gt;and its part of the libraries included by default in the Bonita Console. That means there is no need to provide any additional &lt;span style="font-weight: bold;"&gt;JAR &lt;/span&gt;files to use it.&lt;blockquote&gt;&lt;code&gt;import org.exoplatform.webui.core.model.SelectItemOption;&lt;/code&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;Define a list of options. It will store the different elements that will be displayed by the combo box and it's initially defined as empty.&lt;blockquote&gt;&lt;code&gt;def List&amp;lt;SelectItemOption&amp;lt;String&amp;gt;&amp;gt; comboBoxOptions = [];&lt;/code&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;Create the different combo box options you need and add them to the list. The method for retrieving the information that will be displayed in the options is specific to the application being develop, so it will not be described here.&lt;blockquote&gt;&lt;code&gt;comboBoxOptions &amp;lt;&amp;lt; new SelectItemOption("First Item");
comboBoxOptions &amp;lt;&amp;lt; new SelectItemOption("Second Item");
comboBoxOptions &amp;lt;&amp;lt; new SelectItemOption("Third Item");
&lt;/code&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;Retrieve the combo box component by using the variable name. The &lt;span style="font-style: italic;"&gt;uiform &lt;/span&gt;variable (quickly described in another post) provides access to all of the form objects by using the name of the variable that they are going to display.&lt;blockquote&gt;&lt;code&gt;def comboBoxVariable = uiform.getUIFormSelectBox("variableName");&lt;/code&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;Add the new list of options to the combo box, replacing the default one.&lt;blockquote&gt;&lt;code&gt;comboBoxVariable.setOptions (comboBoxOptions);&lt;/code&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Once all the previous steps have been performed the combo box component can be rendered using the standard mechanism.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568943604490253950-4840060837775624544?l=bonitaworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonitaworld.blogspot.com/feeds/4840060837775624544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bonitaworld.blogspot.com/2009/02/dynamic-options-in-combo-boxes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/4840060837775624544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/4840060837775624544'/><link rel='alternate' type='text/html' href='http://bonitaworld.blogspot.com/2009/02/dynamic-options-in-combo-boxes.html' title='Dynamic options in combo boxes'/><author><name>Luis Sanabria</name><uri>http://www.blogger.com/profile/13781535971948382221</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3568943604490253950.post-4654336208934107613</id><published>2009-01-30T07:50:00.008-06:00</published><updated>2009-02-10T07:40:20.864-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Console'/><title type='text'>Customization of Bonita Console forms (part 3)</title><content type='html'>&lt;p&gt;In the previous posts I described some tips to take in account while &lt;a href="http://bonitaworld.blogspot.com/2009/01/customization-of-default-forms-in.html"&gt;customizing the Bonita Console forms&lt;/a&gt; and the &lt;a href="http://bonitaworld.blogspot.com/2009/01/customization-of-bonita-console-forms.html"&gt;main objects and methods&lt;/a&gt; available to the programmer while writing Groovy templates to change the look and feel of the forms. Today I will provide a quick review of the structure of a minimal Groovy template for displaying the variables and actions defined in the &lt;span style="font-style:italic;"&gt;forms.xml&lt;/span&gt; file.&lt;/p&gt;&lt;p&gt;The full code is shown below and then it is explaned line by line.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Full Code&lt;/span&gt;&lt;/p&gt;
&lt;span style=";font-family:courier new;"  &gt;&lt;pre&gt;&amp;lt;div&amp;gt;
  &amp;lt;% def translations = uicomponent.getWorkflowBundle(); %&amp;gt;
  &amp;lt;% uiform.begin(); %&amp;gt;
  &amp;lt;% for(inputInfo in uicomponent.getInputInfo()) { %&amp;gt;
    &amp;lt;p&amp;gt;
      &amp;lt;%=inputInfo.getLabel() %&amp;gt;:
      &amp;lt;% uicomponent.renderField(inputInfo.getInput()); %&amp;gt;
    &amp;lt;/p&amp;gt;
  &amp;lt;% } %&amp;gt;
  &amp;lt;% def buttons = uicomponent.getSubmitButtons(); %&amp;gt;
  &amp;lt;% if(buttons.isEmpty()) { %&amp;gt;
    &amp;lt;p&amp;gt;
      &amp;lt;a href="&lt;%=uicomponent.event("EndOfState")%&amp;gt;"&amp;gt;
        &amp;lt;%=translations.getString("submit")%&amp;gt;
      &amp;lt;/a&amp;gt;
    &amp;lt;/p&amp;gt;
  &amp;lt;% } else { %&amp;gt;
    &amp;lt;% for(button in buttons) { %&amp;gt;
      &amp;lt;% buttonname = button.get("name") + ".submit"; %&amp;gt;
      &amp;lt;p&amp;gt;
        &amp;lt;a href="&lt;%=uicomponent.event("Transition", button.get("name"))%&amp;gt;"&amp;gt;
          &amp;lt;%=translations.getString(buttonname)%&amp;gt;
        &amp;lt;/a&amp;gt;
      &amp;lt;/p&amp;gt;
    &amp;lt;% } %&amp;gt;
  &amp;lt;% } %&amp;gt;
  &amp;lt;p&amp;gt;
    &amp;lt;a href="&lt;%=uicomponent.event("Cancel")%&amp;gt;"&amp;gt;
      &amp;lt;%=translations.getString("cancel")%&amp;gt;
    &amp;lt;/a&amp;gt;
  &amp;lt;/p&amp;gt;
  &amp;lt;% uiform.end(); %&amp;gt;
&amp;lt;/div&amp;gt;&lt;/pre&gt;&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;Line by Line Explanation&lt;/span&gt;

&lt;span style=";font-family:courier new;"&gt;&lt;pre&gt;&amp;lt;div&amp;gt;&lt;/pre&gt;&lt;/span&gt;&lt;blockquote&gt;The &lt;a href="http://www.exoplatform.org/"&gt;Exo Platform&lt;/a&gt; mechanism requires the code to be enclosed in a div block to be able to properly separate it from the rest of the frame. Otherwise it will not be able to properly manage the frames and windows displayed at the same time. This tag must be properly closed at the end of the template.&lt;/blockquote&gt;
&lt;span style=";font-family:courier new;"&gt;&lt;pre&gt;&amp;lt;% def translations = uicomponent.getWorkflowBundle(); %&amp;gt;&lt;/pre&gt;&lt;/span&gt;&lt;blockquote&gt;This code retrieves a reference to the resource bundle that provides access to the labels to be used for internationalization purposes.&lt;/blockquote&gt;
&lt;span style=";font-family:courier new;"&gt;&lt;pre&gt;&amp;lt;%= translations.getString("title"); %&amp;gt;&lt;/pre&gt;&lt;/span&gt;&lt;blockquote&gt;This function allows you to retrieve any key present in the properties file of the customized task (e.g.: submit, cancel, title, etc.)&lt;/blockquote&gt;
&lt;span style=";font-family:courier new;"&gt;&lt;pre&gt;&amp;lt;% uiform.begin(); %&amp;gt;&lt;/pre&gt;&lt;/span&gt;&lt;blockquote&gt;The components corresponding to the variables defined in the &lt;span style="font-style:italic;"&gt;forms.xml&lt;/span&gt; file must be drawn in a form. This function emits the HTML tags necessary to start that form.&lt;/blockquote&gt;
&lt;span style=";font-family:courier new;"&gt;&lt;pre&gt;&amp;lt;% for(inputInfo in uicomponent.getInputInfo()) { %&amp;gt;&lt;/pre&gt;&lt;/span&gt;&lt;blockquote&gt;As mentioned in the previous post, the getInputInfo() function returns a list of objects representing each one of the fields defined with the variable tag in the &lt;span style="font-style:italic;"&gt;forms.xml&lt;/span&gt; file. This list is iterated, so that every component can be added to the user interface.&lt;/blockquote&gt;
&lt;span style=";font-family:courier new;"&gt;&lt;pre&gt;&amp;lt;%=inputInfo.getLabel() %&amp;gt;:&lt;/pre&gt;&lt;/span&gt;&lt;blockquote&gt;The getLabel() function returns the internationalized version of the label for the component. This information can be retrieved with the resource bundle as well; however, this utility method avoids the need for checking the variable name in the template code.&lt;/blockquote&gt;
&lt;span style=";font-family:courier new;"&gt;&lt;pre&gt;&amp;lt;% uicomponent.renderField(inputInfo.getInput()); %&amp;gt;&lt;/pre&gt;&lt;/span&gt;&lt;blockquote&gt;The renderField() functions is the utility method in charge of displaying the components. This function makes use of the information in the &lt;span style="font-style:italic;"&gt;forms.xml&lt;/span&gt; file to identify the type of component and other information.&lt;/blockquote&gt;
&lt;span style=";font-family:courier new;"&gt;&lt;pre&gt;&amp;lt;% def buttons = uicomponent.getSubmitButtons(); %&amp;gt;&lt;/pre&gt;&lt;/span&gt;&lt;blockquote&gt;If there are any submit buttons defined in the &lt;span style="font-style:italic;"&gt;forms.xml&lt;/span&gt; file, this function returns a list that gives access to their names, allowing their inclusion on the template.&lt;/blockquote&gt;
&lt;span style=";font-family:courier new;"&gt;&lt;pre&gt;&amp;lt;% if(buttons.isEmpty()) { %&amp;gt;&lt;/pre&gt;&lt;/span&gt;&lt;blockquote&gt;If no submit buttons were defined, it is necessary to provide a default submit action that will allow the users to move the process forward. If you are developing a template for an specific activity this checking might be unnecessary, since you will know beforehand if any submit buttons were defined.&lt;/blockquote&gt;
&lt;span style=";font-family:courier new;"&gt;&lt;pre&gt;&amp;lt;a href="&lt;%=uicomponent.event("EndOfState")%&amp;gt;"&amp;gt;&lt;/pre&gt;&lt;/span&gt;&lt;blockquote&gt;In case no submit buttons are defined in the &lt;span style="font-style:italic;"&gt;forms.xml&lt;/span&gt; file, the &lt;span style="font-style:italic;"&gt;event()&lt;/span&gt; function, called with the value "EndOfState" will return the link to the function that will complete the current task and move the process forward.&lt;/blockquote&gt;
&lt;span style=";font-family:courier new;"&gt;&lt;pre&gt;&amp;lt;% for(button in buttons) { %&amp;gt;&lt;/pre&gt;&lt;/span&gt;&lt;blockquote&gt;In case that some buttons were defined, the collection must be iterated, so that every button returned by the engine is displayed in the form.&lt;/blockquote&gt;
&lt;span style=";font-family:courier new;"&gt;&lt;pre&gt;&amp;lt;% buttonname = button.get("name") + ".submit"; %&amp;gt;&lt;/pre&gt;&lt;/span&gt;&lt;blockquote&gt;As specified in the Bonita Console guide, the button names are defined in the properties files with the name of the button plus the suffix ".submit"&lt;/blockquote&gt;
&lt;span style=";font-family:courier new;"&gt;&lt;pre&gt;&amp;lt;a href="&lt;%=uicomponent.event("Transition", button.get("name"))%&amp;gt;"&amp;gt;&lt;/pre&gt;&lt;/span&gt;&lt;blockquote&gt;To get the link to activate the corresponding function, the &lt;span style="font-style:italic;"&gt;event()&lt;/span&gt; method must be called with the "Transition" value and the name of the button as an extra parameter.&lt;/blockquote&gt;
&lt;span style=";font-family:courier new;"&gt;&lt;pre&gt;&amp;lt;a href="&lt;%=uicomponent.event("Cancel")%&amp;gt;"&amp;gt;&lt;/pre&gt;&lt;/span&gt;&lt;blockquote&gt;The Bonita Console offers a predefined function that allows the user to get out of the task without making any changes to the status of the workflow or its variables. That function can be called providing "Cancel" as parameter for the &lt;span style="font-style:italic;"&gt;event()&lt;/span&gt; method.&lt;/blockquote&gt;
&lt;span style=";font-family:courier new;"&gt;&lt;pre&gt;&amp;lt;% uiform.end(); %&amp;gt;&lt;/pre&gt;&lt;/span&gt;&lt;blockquote&gt;Generates the closing tag for the form (&lt;span style="font-style:italic;"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;)&lt;/blockquote&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568943604490253950-4654336208934107613?l=bonitaworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonitaworld.blogspot.com/feeds/4654336208934107613/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bonitaworld.blogspot.com/2009/01/customization-of-bonita-console-forms_30.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/4654336208934107613'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/4654336208934107613'/><link rel='alternate' type='text/html' href='http://bonitaworld.blogspot.com/2009/01/customization-of-bonita-console-forms_30.html' title='Customization of Bonita Console forms (part 3)'/><author><name>Luis Sanabria</name><uri>http://www.blogger.com/profile/13781535971948382221</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3568943604490253950.post-175142263724507738</id><published>2009-01-27T06:50:00.001-06:00</published><updated>2009-02-10T07:40:20.864-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Console'/><title type='text'>Customization of Bonita Console forms (part 2)</title><content type='html'>&lt;p&gt;In the &lt;a href="http://bonitaworld.blogspot.com/2009/01/customization-of-default-forms-in.html"&gt;last post&lt;/a&gt; I mentioned that the Bonita Console allows customization of the automatically generated task forms by means of a forms.xml file, a set of language properties files and a template that mixes HTML and &lt;a href="http://groovy.codehaus.org/"&gt;Groovy&lt;/a&gt; code.&lt;/p&gt;&lt;p&gt;Since the functions needed are not just plain old code, but are specific of the structure provided by the &lt;a href="http://www.exoplatform.org/"&gt;eXo platform&lt;/a&gt; &lt;a href="http://wiki.exoplatform.com/xwiki/bin/view/Portal/Create+a+WebUI+Portlet"&gt;Web UI Framework&lt;/a&gt; and the Bonita Console application, some comments on it's basics might be helpful for people customizing the forms.&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Major Objects&lt;/span&gt;&lt;/p&gt;&lt;p&gt;There are 2 major objects available to the HTML fragment writer: &lt;span style="font-style: italic;"&gt;uiform&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;uicomponent&lt;/span&gt;.&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;uiform object:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;This object has 2 main methods that allow the definition of the form. &lt;span style="font-style: italic;"&gt;begin()&lt;/span&gt; generates the HTML code necessary to start the form while &lt;span style="font-style: italic;"&gt;end()&lt;/span&gt; generates the closing tag for the form. Calls to these functions must enclose the code that draws the different fields and actions in the form.&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;uicomponent object:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The &lt;span style="font-style: italic;"&gt;uicomponent &lt;/span&gt;object gives access to the input fields for the variables and actions defined in the &lt;span style="font-style: italic;"&gt;forms.xml&lt;/span&gt; file [&lt;span style="font-style: italic;"&gt;getInputInfo()&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;getSubmitButtons()&lt;/span&gt;] and provides utility methods to draw the input fields [&lt;span style="font-style: italic;"&gt;renderField()&lt;/span&gt;] and the actions [&lt;span style="font-style: italic;"&gt;event()&lt;/span&gt;]. Additionally, the values defined in the properties file for internationalization purposes can be access from the object returned by the &lt;span style="font-style: italic;"&gt;getWorkflowBundle()&lt;/span&gt; function, like in the example below:. For example: &lt;/p&gt;&lt;blockquote&gt;&lt;span style="font-style: italic;"&gt;uicomponent.getWorkflowBundle().getString("submit")&lt;/span&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;getInputInfo() collection:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The &lt;span style="font-style: italic;"&gt;getInputInfo()&lt;/span&gt; method of the &lt;span style="font-style: italic;"&gt;uicomponent &lt;/span&gt;variable returns an array of input fields. Each one of the input fields in that list provides 3 methods that allow the drawing of the components. The &lt;span style="font-style: italic;"&gt;isMandatory()&lt;/span&gt; method lets the programmer know if the field was flagged as mandatory in the &lt;span style="font-style: italic;"&gt;forms.xml&lt;/span&gt; file, the &lt;span style="font-style: italic;"&gt;getLabel()&lt;/span&gt; method provides access to the internationalized label for the component (specified in the properties file) and the &lt;span style="font-style: italic;"&gt;getInput()&lt;/span&gt; method returns a reference to the component, that allows the &lt;span style="font-style: italic;"&gt;renderField()&lt;/span&gt; method of the &lt;span style="font-style: italic;"&gt;uicomponent &lt;/span&gt;variable the rendering of the field.&lt;/p&gt;&lt;p&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;getSubmitButtons() collection:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The &lt;span style="font-style: italic;"&gt;getSubmitButtons()&lt;/span&gt; method of the &lt;span style="font-style: italic;"&gt;uicomponent &lt;/span&gt;variable returns a list of objects representing the submit buttons configured in the &lt;span style="font-style: italic;"&gt;forms.xml&lt;/span&gt; file. This list must be iterated to draw all the required action buttons. If no submit buttons were configured, the list will be empty and a default button must be provided. Each element of the list allows the programmer to call a &lt;span style="font-style: italic;"&gt;get()&lt;/span&gt; method with the &lt;span style="font-style: italic;"&gt;"name"&lt;/span&gt; string as a parameter, in order to get the name of the button, that needs to be provided to the &lt;span style="font-style: italic;"&gt;event()&lt;/span&gt; method as a parameter.&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;renderField() method:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The render field method draws the different components in the user interface, as directed by the specification of the variable in the &lt;span style="font-style: italic;"&gt;forms.xml&lt;/span&gt; file. This method must be provided a reference to the component to draw that can be obtained with the &lt;span style="font-style: italic;"&gt;getInput()&lt;/span&gt; method  of each one of the objects returned by the &lt;span style="font-style: italic;"&gt;getInputInfo()&lt;/span&gt; function.&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;event() method:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The &lt;span style="font-style: italic;"&gt;event()&lt;/span&gt; method returns a JavaScript link execute the actions required and has 2 parameters: an action type and an optional action name. There are 3 types of actions defined by the &lt;span style="font-weight: bold;"&gt;Bonita Console&lt;/span&gt; environment that are useful to the template writter. The first action is called &lt;span style="font-weight: bold;"&gt;Cancel&lt;/span&gt; and allows the rendering of a cancel button that will close the form without advancing the workflow or updating the variable values. The second action is called &lt;span style="font-weight: bold;"&gt;EndOfState&lt;/span&gt; and allows the inclusion of a default submit button if no one has been defined in the forms.xml file, this button will update the variables displayed in the form and advance the workflow. The last one is called &lt;span style="font-weight: bold;"&gt;Transition &lt;/span&gt;and requires an additional parameter with the name of the submit button that is going to be executed. This event updates a variable with the name of the button as specified by the corresponding &lt;span style="font-style: italic;"&gt;submitbutton &lt;/span&gt;tag in the &lt;span style="font-style: italic;"&gt;forms.xml&lt;/span&gt; file. All the actions/events return a link that must be put into an anchor tag (&lt;span style="font-style: italic;"&gt;&amp;lt;a&amp;gt;&lt;/span&gt;) to allow the final user to trigger the action.&lt;/p&gt;&lt;p&gt;Those are the most important functions and objects available for the template writer. In the next post I will show the general structure of the form templates for the Bonita Console.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568943604490253950-175142263724507738?l=bonitaworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonitaworld.blogspot.com/feeds/175142263724507738/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bonitaworld.blogspot.com/2009/01/customization-of-bonita-console-forms.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/175142263724507738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/175142263724507738'/><link rel='alternate' type='text/html' href='http://bonitaworld.blogspot.com/2009/01/customization-of-bonita-console-forms.html' title='Customization of Bonita Console forms (part 2)'/><author><name>Luis Sanabria</name><uri>http://www.blogger.com/profile/13781535971948382221</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3568943604490253950.post-8427349742124422605</id><published>2009-01-20T07:07:00.001-06:00</published><updated>2009-02-10T07:40:20.864-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Console'/><title type='text'>Customization of Bonita Console forms (part 1)</title><content type='html'>The Bonita Console application allows rapid deployment of process models by automatically generating forms, that enable the users to edit the values of the different process and activity variables. Those forms can be customized as described in the chapter 11 of the &lt;a href="http://wiki.bonita.objectweb.org/xwiki/bin/download/Main/Documentation/bonita-4.0-consoleUserGuide.pdf"&gt;Bonita Console User Guide&lt;/a&gt;. There are several items to take in account:
&lt;ol&gt;&lt;li&gt;The &lt;span style="font-weight: bold;"&gt;resource-bundle&lt;/span&gt; element of the &lt;span style="font-style: italic;"&gt;forms.xml&lt;/span&gt; file is described as optional, however it is required and it must reference an existing properties file. Otherwise the &lt;span style="font-style: italic;"&gt;Bonita Console&lt;/span&gt; will not run properly when requested to display the form associate to the customized task.
&lt;/li&gt;&lt;li&gt;The form customization files can be stored in the &lt;span style="font-style: italic;"&gt;scr/forms&lt;/span&gt; folder of the Eclipse project. The build process will automatically move them to the root of the &lt;span style="font-weight: bold;"&gt;BAR &lt;/span&gt;file, where the &lt;span style="font-style: italic;"&gt;Bonita Console&lt;/span&gt; will look for them.&lt;/li&gt;&lt;li&gt;The customization of the look and feel of the forms is done by providing custom &lt;a href="http://groovy.codehaus.org/"&gt;&lt;span style="font-style: italic;"&gt;Groovy&lt;/span&gt;&lt;/a&gt; templates. There is no example provided in the guide of a template to customize, however, the default template can be located in the following path:&lt;blockquote style="font-style: italic;"&gt;bonita-console-4.0.1\webapps\bonita.portlet\groovy\UITaskForm.gtmpl&lt;/blockquote&gt;The file can be copied into the Eclipse project and changed as needed.&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568943604490253950-8427349742124422605?l=bonitaworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonitaworld.blogspot.com/feeds/8427349742124422605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bonitaworld.blogspot.com/2009/01/customization-of-default-forms-in.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/8427349742124422605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/8427349742124422605'/><link rel='alternate' type='text/html' href='http://bonitaworld.blogspot.com/2009/01/customization-of-default-forms-in.html' title='Customization of Bonita Console forms (part 1)'/><author><name>Luis Sanabria</name><uri>http://www.blogger.com/profile/13781535971948382221</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3568943604490253950.post-2938770715164272505</id><published>2009-01-16T08:55:00.001-06:00</published><updated>2009-01-30T08:28:27.306-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HowTo'/><category scheme='http://www.blogger.com/atom/ns#' term='Installation'/><title type='text'>How to use Bonita out of the Box</title><content type='html'>&lt;p&gt;One of the things that make a product attractive is the ability to use it out of the box. In the case of workflow solutions, that capability is important to allow business analysts to start working on modeling the business processes and to see how they will flow through the different roles and people involved, without having to wait for the full programming tasks to be completed.&lt;/p&gt;&lt;p&gt;Bonita 4.0.1 (a.k.a Nova Bonita) allows for this capability with an easy installation of  the process modeling tool, called ProEd, and the possibility to run the process models in a WebOS environment powered by the&lt;a href="http://www.exoplatform.org/portal/public/en/"&gt; eXo Platform&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Prerequisites&lt;/span&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;To run both ProEd (the process modeling tool) and the administrative console, you need to have an installation in your machine of the Java Development Kit 1.5 and the corresponding runtime environment. You can find links to download it and installation instructions from &lt;a href="http://java.sun.com/javase/downloads/index_jdk5.jsp"&gt;Sun's website&lt;/a&gt;.
&lt;/li&gt;&lt;li&gt;Some applications might have problems while processing paths that have white spaces. Because of that I recommend that the installation of all necessary software to be done in paths without white spaces.&lt;/li&gt;&lt;li&gt;The JAVA_HOME and JAVA_RTE variables must be properly set in your environment with the paths of the Java installation.&lt;/li&gt;&lt;li&gt;To run the ProEd tool you will need the Eclipse IDE application (ProEd has a standalone version for the use of business analysts that do not need the programming capabilities of Eclipse, however, it does not provide the build/deployment facilities present in Eclipse for a quick start up). It can be &lt;a href="http://www.eclipse.org/downloads/"&gt;downloaded &lt;/a&gt;from the &lt;a href="http://www.eclipse.org/"&gt;Eclipse website&lt;/a&gt;.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;ProEd Installation in Eclipse&lt;/span&gt;&lt;/p&gt;&lt;p&gt;To install ProEd in Eclipse you have to:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Download the &lt;span style="font-style: italic;"&gt;bonita-eclipseDesigner-4.0.1.zip&lt;/span&gt; file from the &lt;a href="http://forge.objectweb.org/project/showfiles.php?group_id=56"&gt;downloads page&lt;/a&gt; of the Bonita project.&lt;/li&gt;&lt;li&gt;Unzip the file. That will give you a folder called &lt;span style="font-style: italic;"&gt;plugins&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;Copy the folder inside it (called &lt;span style="font-style: italic;"&gt;org.ow2.proed_4.2.1&lt;/span&gt;) to the &lt;span style="font-style: italic;"&gt;plugins &lt;/span&gt;folder in your Eclipse installation path.&lt;/li&gt;&lt;li&gt;Start the Eclipse IDE and enjoy.&lt;/li&gt;&lt;/ol&gt;You can read the &lt;a href="http://wiki.bonita.objectweb.org/xwiki/bin/download/Main/Documentation/bonita-4.0-developmentGuide.pdf"&gt;Bonita Development Guide&lt;/a&gt; for information on how to create and build a project in there. I will discuss that in upcoming posts.&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Bonita Console Installation&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The Bonita Console is a web application based on the eXo Platform that runs on top of the Tomcat application server. To install the Bonita console you need to:
&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Download the &lt;span style="font-style: italic;"&gt;bonita-console-4.0.1.zip&lt;/span&gt; file from the &lt;a href="http://forge.objectweb.org/project/showfiles.php?group_id=56"&gt;downloads page&lt;/a&gt; of the Bonita project.&lt;/li&gt;&lt;li&gt;Unzip the file. That will give you a folder called &lt;span style="font-style: italic;"&gt;bonita-console-4.0.1&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;Inside that folder there is a subfolder called &lt;span style="font-style: italic;"&gt;bin&lt;/span&gt;. To start the console you need to start the Tomcat application, by opening a command prompt/terminal window, navigate to that folder and running the command:&lt;blockquote&gt;&gt; &lt;span style="font-style: italic;"&gt;bpm run&lt;/span&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;To access the application you need to open a browser window and go to the address: &lt;span style="font-style: italic;"&gt;http://127.0.0.1:8080/portal&lt;/span&gt;. The application will show you a login page, you can use &lt;span style="font-style: italic;"&gt;root&lt;/span&gt; as username and &lt;span style="font-style: italic;"&gt;bpm &lt;/span&gt;as password to access it.&lt;/li&gt;&lt;/ol&gt;You can learn how to use the console and deploy business processes from the &lt;a href="http://wiki.bonita.objectweb.org/xwiki/bin/download/Main/Documentation/bonita-4.0-consoleUserGuide.pdf"&gt;Bonita Console User Guide&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568943604490253950-2938770715164272505?l=bonitaworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonitaworld.blogspot.com/feeds/2938770715164272505/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bonitaworld.blogspot.com/2009/01/how-to-use-bonita-out-of-box.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/2938770715164272505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/2938770715164272505'/><link rel='alternate' type='text/html' href='http://bonitaworld.blogspot.com/2009/01/how-to-use-bonita-out-of-box.html' title='How to use Bonita out of the Box'/><author><name>Luis Sanabria</name><uri>http://www.blogger.com/profile/13781535971948382221</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3568943604490253950.post-1519366721407277814</id><published>2009-01-13T07:07:00.003-06:00</published><updated>2009-02-05T08:16:19.431-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='General'/><title type='text'>Links and resources</title><content type='html'>&lt;p&gt;Here are several links that will be useful for people looking to work with Bonita or with a workflow solution and have selected Bonita:&lt;/p&gt;
&lt;p&gt;Bonita Home Page:&lt;/p&gt;&lt;blockquote&gt;&lt;a href="http://bonita.objectweb.org/"&gt;http://bonita.objectweb.org/&lt;/a&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Project forge in ObjectWeb:&lt;/p&gt;&lt;blockquote&gt;&lt;a href="http://forge.objectweb.org/projects/bonita"&gt;http://forge.objectweb.org/projects/bonita&lt;/a&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Forums:&lt;/p&gt;&lt;blockquote&gt;&lt;a href="http://forge.objectweb.org/forum/?group_id=56"&gt;http://forge.objectweb.org/forum/?group_id=56&lt;/a&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Issue list:&lt;/p&gt;&lt;blockquote&gt;&lt;a href="http://forge.objectweb.org/tracker/?group_id=56"&gt;http://forge.objectweb.org/tracker/?group_id=56&lt;/a&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Download page:&lt;/p&gt;&lt;blockquote&gt;&lt;a href="http://forge.objectweb.org/project/showfiles.php?group_id=56"&gt;http://forge.objectweb.org/project/showfiles.php?group_id=56&lt;/a&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;


&lt;p&gt;Licenses:&lt;/p&gt;
&lt;p&gt;For the runtime environment and the process designer:&lt;/p&gt;&lt;blockquote&gt;&lt;a href="http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"&gt;GNU Lesser General Public License, version 2.1&lt;/a&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;For the administrative management console:&lt;/p&gt;&lt;blockquote&gt;&lt;a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html"&gt;GNU Affero General Public License, version 3.0&lt;/a&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Related projects or applications:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.exoplatform.com/"&gt;Exo Platform&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://wiki.orchestra.objectweb.org/xwiki/bin/view/Main/"&gt;Orchestra&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.jboss.org/"&gt;JBoss Application Server&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://wiki.jonas.objectweb.org/xwiki/bin/view/Main/WebHome"&gt;Jonas Application Server&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://java.sun.com/"&gt;Java&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Other open source workflow applications:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://sourceforge.net/projects/crm-ctt/"&gt;Interleave&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://openwferu.rubyforge.org/"&gt;Route&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.jboss.org/jbossjbpm/"&gt;jBPM&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://swamp.sourceforge.net/index.php?seite=home"&gt;Swamp&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568943604490253950-1519366721407277814?l=bonitaworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonitaworld.blogspot.com/feeds/1519366721407277814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bonitaworld.blogspot.com/2009/01/links-and-resources.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/1519366721407277814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/1519366721407277814'/><link rel='alternate' type='text/html' href='http://bonitaworld.blogspot.com/2009/01/links-and-resources.html' title='Links and resources'/><author><name>Luis Sanabria</name><uri>http://www.blogger.com/profile/13781535971948382221</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3568943604490253950.post-7971950236878577857</id><published>2009-01-12T14:34:00.001-06:00</published><updated>2009-01-30T08:15:21.494-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='General'/><title type='text'>Talking about Bonita Workflow Engine</title><content type='html'>&lt;p&gt;Hello!&lt;/p&gt;

&lt;p&gt;I am a computer engineer and because of some projects I had to deal with in my work I became  interested on Workflow technologies and after looking for several options on the Open Source world I found Bonita to be a very good workflow solution.&lt;/p&gt;

&lt;p&gt;However, it has been challenging in some areas, I have decided to start this blog to document what I have learned about it and how to solve the most common problems I have had.&lt;/p&gt;

&lt;p&gt;I hope this will be useful to some other people trying to start with it.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568943604490253950-7971950236878577857?l=bonitaworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonitaworld.blogspot.com/feeds/7971950236878577857/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bonitaworld.blogspot.com/2009/01/talking-about-bonita-workflow-engine.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/7971950236878577857'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568943604490253950/posts/default/7971950236878577857'/><link rel='alternate' type='text/html' href='http://bonitaworld.blogspot.com/2009/01/talking-about-bonita-workflow-engine.html' title='Talking about Bonita Workflow Engine'/><author><name>Luis Sanabria</name><uri>http://www.blogger.com/profile/13781535971948382221</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
