View on GitHub


Activiti module for Ninja framework

Download this project as a .zip file Download this project as a tar.gz file

Activiti BPM Engine module for Ninja framework.

Activiti ( is a light-weight workflow and Business Process Management (BPM) Platform targeted at business people, developers and system admins. Its core is a super-fast and rock-solid BPMN 2 process engine for Java.

This module helps running activiti inside Ninja framework (

Getting started


1) Add the ninja-activiti-module dependency to your pom.xml:


2) Install the module in your conf.Module:

protected void configure() {
    install(new ActivitiModule());

3) All set! Start Ninja application and activiti engine will be started with an in-memory database and default configs. you can inject activiti ProcessEngine, FormService, TaskService, ... in your code.

public class Sample {

    ProcessEngine processEngine;
    FormService formService;
    HistoryService historyService;
    IdentityService identityService;
    RepositoryService repositoryService;
    RuntimeService runtimeService;
    ManagementService managementService;
    TaskService taskService;


Activiti Engine Configurations

1) You can create activiti.cfg.xml in 'conf' directory. This file will be used as a default activiti configurations. for more detail on how to use the file refer to "".

2) You can also choose the "configuration file" in conf/application.conf.


3) There is also possibility to set activiti configuration in conf/application.conf file without providing activiti xml configuration file.


consult activiti documents for list of all process engine configurations "".

4) Mixed-mode: You can also mix xml and property configuration. by providing both activiti.cfg.xml file and ninja properties(conf/application.conf). configs in conf/application.conf overrides xml configuration.

5) No configuration: If there was no configuration, the default activiti configurations with an in-memory database will be applied.

Order of applying configurations

Step1) If Default activiti.cfg.xml is provided it will be read unless you explicitly set the config file path in "conf/application.conf" --> activiti.cfg.path=conf/my.activiti.cfg.xml

Step2) If there are activiti configuration in "conf/application.conf" they will be override xml configurations.