An AngularJS service for Activiti REST API (v5.19.0).
Activiti is a light-weight workflow and Business Process Management (BPM) Platform targeted at business people, developers and system admins. And Activiti is open-source workflow engine written in Java that can execute business processes described in BPMN 2.0.
Activiti information: Activiti User Guide
$ bower install -S https://github.com/northwalker/ngActivitiRestService.git
Include ngActivitiRestServices
as a dependency on in your main Angular module.
angular.module('myApp',['ngResource', 'ngActivitiRestServices'])
Use ngActivitiResourceProvider
to configure the service, also to set authentication for Activiti REST API request.
angular.module('myApp')
.config(['ngActivitiResourceProvider', function(ngActivitiResourceProvider) {
ngActivitiResourceProvider.setUrlBase('http://localhost:8080/activiti-webapp-rest');
ngActivitiResourceProvider.setAuthHeader('authentication');
ngActivitiResourceProvider.setActivitiAccount('kermit');
ngActivitiResourceProvider.setActivitiPassword('kermit');
}])
Inject the activiti service into any controller, service or directive where you need it.
angular
.module('myApp')
.controller('MyController',
function($scope, ProcessDefinitionsService) {
ProcessDefinitionsService.listProcessDefinitions( function(processDefinitionList){
console.log(processDefinitionList);
});
});
See ngActivitiRestService wiki for details.
-
Dev dependencies
- npm
- gulp
-
Command
$ npm install $ gulp
-
ESLint
$ gulp eslint
Get garbled data when using some REST APIs. (specific fetching binary data variables).
The MIT License (MIT)
Copyright (c) 2016 Northwalker
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.