Sha256: 5ffa1919b1742527208ab6d9b15f80f405f84dbca2deba06a60a76887660b9af

Contents?: true

Size: 1.55 KB

Versions: 1

Compression:

Stored size: 1.55 KB

Contents

# JrubyActiviti

You can directly access Activiti BPM in JRuby Application.

## Test Environment
JRuby-9.0.3.0, Activiti-5.19.0

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'jruby_activiti'
```

Run the `bundle install` command to install it.

You need to run the generator:

```
rails g jruby_activiti:install
```

It will create 4 files, edit the log4j.properties, config/activiti.cfg.xml as your need.

```
create  Jarfile
create  log4j.properties
create  config/activiti.cfg.xml
create  config/initializers/jruby_activiti.rb
```

And then execute `jbundle install`

## Usage
You can access Activiti directly by using `Activiti`. For example, in a Rails controller

``` ruby
# Activiti::Engine
# Activiti::RepositoryService
# Activiti::RuntimeService
# Activiti::TaskService
# Activiti::ManagementService
# Activiti::IdentityService
# Activiti::HistoryService
# Activiti::FormService

Activiti::RepositoryService.createDeployment().
  addClasspathResource("config/your_bpm_xml_file.bpmn20.xml").
  deploy()
```

## Warning
Do not create Activiti Engine in a Rails application repeatedly. Otherwise you will get exception `log writing failed. Bad file descriptor - Bad file descriptor`

## Thanks
Inspired by https://github.com/boberetezeke/jruby-activiti

## Contributing

1. Fork it ( https://github.com/richfisher/jruby_activiti/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jruby_activiti-1.2.2 README.md