Table of Content
- About
- Installation
- Download
- Dependencies
- Build instructions
- Simple example
- Resource Documentation
AngularJS module for Bonita BPM platform. This module acts as a Bonita REST API client. It allows to quickly build business application by providing user management API, authentication API, business process API, ...
Notes:
- this module is not an official extension of Bonita BPM
- this module is compatible with Bonita BPM 6.0 and onward but some resources may be missing in early Bonita versions
The project binaries are available here
In order to use ngBonita, you will need the following JS dependencies:
- Angular core 1.3.0 or upper
- Angular resource module
If you wish to build the project from the sources, follow these instructions:
- Make sure you have installed grunt. See this guide for more instructions.
- Open a command line at the project root directory
- Run "npm install"
- Run "grunt build"
The following example will log in Bonita with user "walter.bates" and will list the process definitions that he has the right to start using the browser's console:
var app = angular.module('appMainModule', ['ngBonita']);
app.config(function (bonitaConfigProvider) {
// Optional call to override Bonita URL setup
bonitaConfigProvider.setBonitaUrl('http:https://localhost:8080/bonita');
});
// Application controller
app.controller('AppController', function($scope, $log, bonitaAuthentication, ProcessDefinition){
// Logs into Bonita as 'walter.bates'
bonitaAuthentication.login('walter.bates','bpm').then(function() {
// Lists all process definitions that can be started by current user
ProcessDefinition.getStartableByCurrentUser().$promise.then(function (processDefinitions) {
$log.log('Listing '+ processDefinitions.items.length +' process definition(s):');
for (var i=0; i<processDefinitions.items.length; i++)
$log.log(' - '+ processDefinitions.items[i].name +' '+ processDefinitions.items[i].version);
// Logs out of Bonita
bonitaAuthentication.logout();
});
});
});
As of latest version, the following resources are available:
- ArchivedCaseDocument
- ArchivedHumanTask
- ArchivedProcessInstance
- BonitaSession
- CaseDocument
- HumanTask
- ProcessDefinition
- ProcessInstance
- User