Projects:BPM
Contents
|
Status
- Stage: Confirmed Stable
- Planned Release: 2015/Feb
- Status Notes:
Team
- Contact: Martin Taal (martin.taal@openbravo.com)
Definition
The goal of this development is to embed/integrate a BPM engine within the Openbravo application. There are several bpm solutions available. The first action of this project should be to choose an open source BPM solution which to use as a solution. Two main solutions are clear candidates:
The choice has been made to use and integrate with Activiti as it can easily be embedded within the Openbravo webapp.
Documentation
Videos showing an example of a work flow implementation for dunning including configuring the work flow system:
Development Project
Feature overview
A summary of the planned work flow integration features:
- to be able to define BPM workflows from within Openbravo, or at least provide a visually integrated method of defining BPM workflows, also things like user authorization/authentication should be integrated
- allow Openbravo windows/processes/forms to be defined as work flow steps, make it possible to select these Openbravo artifacts from within the work flow editor
- make it possible to use the Openbravo data model in expressions or other logic within the work flow system
- make it possible to define business events or other triggers within Openbravo which will trigger a workflow
- from within Openbravo, for an end user, visualize work flow concepts such as tasks lists, allow a user to start/continue a work flow from within Openbravo
- allow integration from an Openbravo window with a workflow instance instantiating this window
- make Openbravo data (from tables/DAL) available in the work flow engine steps
Status Overview (Feb 2012)
The current status (Feb 2012), activiti has been integrated within the Openbravo app:
- an Activiti module has been created, if installed it will automatically run Activiti engine and administrative UI within the Openbravo webapp
- users and groups are synchronized with Activiti
- a work flow can be defined in Openbravo in xml, it is synchronized with Activiti
- a Tasks view has been created which shows the current tasks for a user
- a first module has been created which works with Activiti: dunning
The main open topics are:
- extend the visual integration in each window/tab to start work flows from a window/tab and view work flows from a window/tab
- provide a task specific user interface
- some extra functionality in the task view (assign tasks to users)
- additional authorization settings
- graphical work flow editing
- start work flow from business rules/alerts
Development Steps
The implementation steps (with their status):
- (done) to prototype and understand specific concepts of the work flow system
- (done) run the work flow system in the same tomcat context
- (done) integrate the database of the work flow system with Openbravo
- (partially done) allow editing of work flows from within Openbravo
- (partially done) integrate the work flow system from a visual point of view
- (done) integrate/embed the work flow system from an authentication/authorization point of view
- make it possible to use/apply Openbravo concepts within the embedded work flow system
Planning
- MP10:
- MP11:
Tracking
This feature development is tracked using the following issue(s): to-be-added
Design
This section discusses the detailed design of the work flow integration of Openbravo with Activiti. It combines both the existing functionality as planned new functionality.
The work flow integration makes it possible to define work flows in Openbravo, start work flows, get an overview of current tasks, visualize which work flows are available for a certain record/object, and in which work flows a certain record/object is the main subject.
Data/Object Oriented Work Flow integration
Linking work flow definitions to window/tabs
The idea is that a work flow is enabled/available for a certain tab. So when defining work flows in Openbravo it is possible to specify for which tabs this work flow should be available.
The tab-work flow link should also allow to define an expression which specifies if a certain work flow is valid for a certain record. For example, an expression like e.orderQuantity > 0 defines that a work flow is only available for a sales order line with an order quantity larger than 0. This expression is executed on the client, it should be possible to use other javascript (global) objects in this expression.
The work flow tab link should also define if a work flow may be started once or multiple times for a certain record.
Visualization of available work flows in a tab
The link of a work flow definition with a tab is visualized as follows in the target window/tab:
- there will be a work flow button in the toolbar, when this button is clicked a flyout menu appears. The work flow button will have different states depending if the record participates in a work flow or not, this participation can be computed using a client-server check which is done when a record gets selected (after a certain delay to now overflow the server while scrolling through a grid).
- if a record is selected then the flyout will show the available work flows for the record. The work flow is enabled for a record if the enabling expression (see work flow - tab link) computes to true.
- To start a work flow, the user can click a work flow in the flyout, a confirmation dialog is shown (do you want to start work flow xyx for [identifier]?, if the user presses ok, then the work flow is started, an information dialog notifies the user that the work flow has been started.
- if the record already participates in the selected work flow and it is not allowed to start multiple work flow instances then an information dialog is shown (work flow already started for the selected record)
Current work flows for a record
When a record is selected then the fly out will also show an option to show all the current work flows in which a record currently participates.
When the user selects this option then a section in the form is opened which lists (in a grid) all the current work flows in which a record is the main subject. For each work flow the following information is displayed:
- name of the work flow
- name of the current task
- assignee (user or group) of the current task
- start date of the work flow
- date of the current task (when the current task was assigned/reached)
- a button to show the current location in the work flow, the current location is shown graphically
- a button to delete/stop the work flow if the user is authorized for it
- a button/link to open the user interface for the task, if the current user is the assignee
User Oriented Work Flow Integration
The previous section discusses how work flows relate to data in the system. This section focuses on the user oriented part of the work flow integration.
The user oriented approach is visualized in different ways:
- the tasks navigation bar link (see in the top in the image below)
- the current task list view of the user (is opened when clicking on the tasks navigation bar button)
- within each window in the work flow button
Task View
The task view is currently available as part of the Activiti integration. It shows the current list of tasks assigned to a user and the tasks assigned to the group of the user, which the user can claim.
From the task view the user can also see the current location in the work flow:
The functionality of the task view has to be extended in several ways:
- allow a user to assign or move a task to other users, both from the user task list as well as from the tasks assigned to the group (to-be-claimed).
- allow a user to stop/delete a work flow, if he/she is authorized.
These actions can be made available on the task list using a right-mouse button click on the task. Both actions should be executed after first confirming with the user.
Work flow button in each window/tab
If the work flow module is installed then in each window there is a work flow button which shows a flyout (see also the data-oriented work flow integration above). The flyout can show the current list of tasks assigned to the user, by clicking on a task the task specific user interface is opened for that task (see next section).
Task specific user interface
The current prototype allows the work flow to define a target window/tab for a user task. In the task view list this is visualized as a link which opens the window/tab for the selected record. When the user clicks that link the openbravo window/tab is opened for that record, this is a standard openbravo window/tab with all the available functionality enabled.
This is fine for an initial approach, however the main drawback of the current approach is that the user can perform any action on the opened window/tab: delete, edit, click buttons etc. Also it is not clear/defined which of these action accomplishes/finishes the task. So the user needs, as an extra step, to click a button to tell the system that a certain task is finished.
To solve this there are 2 solutions possible:
- open the window/tab in work flow mode:
- visualize in the window/tab that a specific task is being executed (through a message somewhere)
- only allow the single record to be viewed, so no navigation to other records or information, possibly allow a separate link to open the record in full-edit/standard mode
- show work flow specific buttons/actions on the window or tab. This means that we somehow have to be able to define work flow actions in a user task which translate into custom buttons in the Openbravo user interface.
- add a new type of window to the system which allows visualization of a record with the definition of specific process buttons which execute the task. When the user clicks these buttons (or when the process popup returns with a success messsage) then the task has been executed and the work flow can move on.
For the second option we can re-use most/all of the window/tab definition in the Application Dictionary and also re-use large parts of the client and server code. Imv the second approach is the prefered approach, both approaches can also be implemented together.
Defining Work Flows within the Openbravo UI
The initial/current implementation (Febr 2012) allows you to define work flows as XML within Openbravo.
There are 2 options for defining work flows in Openbravo in a more detailed way than xml:
- Administrative: within Openbravo we create tables (and windows/tabs to maintain them) which reflect a common work flow structure. The work flow can be created/edited through the Openbravo window/tab.
- Graphical: the work flow can be created/maintained using a graphical/drawing type of user interface through the web browser, see here
The second approach is the preferred approach, to allow graphical editing of work flows through the web browser/Openbravo user interface. It should be possible to refer to Openbravo Application Dictionary components (window/tabs) from within the graphical editor.
Authorizations
The system should define that a user is allowed to start work flows or even stop/delete an work flow instance.
The idea is to add a Role Work Flow table which defines for a combination of role and work flow definition that a work flow maybe started or stopped by that user.
The user interface discussed in previous sections should take these authorizations into consideration.
Starting work flows from alerts
The idea is that a work flow could also be started automatically based on an alert. To accomplish this the alert rule should have a reference to a work flow definition. If an alert is created for that alert rule then this work flow is started.
To implement this functionality, probably the alert generation mechanism needs to be made extensible. Or another approach is to have a separate process running, just after generating alerts. This separate process iterates over all non-solved/non-ignored alerts and if the alert rule has a work flow link, start the work flow.
The target record/tab of the alert can be used as the target of the work flow.
Administrative User Interface
The System Administrator has direct access to the Activiti Explorer UI which will be opened in a separate tab. The Activiti Explorer UI is available as the Work Flow Administration menu option.