Convert Figma logo to code with AI

Activiti logoActiviti

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. It's open-source and distributed under the Apache license. Activiti runs in any Java application, on a server, on a cluster or in the cloud. It integrates perfectly with Spring, it is extremely lightweight and based on simple concepts.

10,272
6,967
10,272
633

Top Related Projects

A compact and highly efficient workflow and Business Process Management (BPM) platform for developers, system admins and business users.

C7 CE enters EOL in October 2025. Please check out C8 https://github.com/camunda/camunda – Flexible framework for workflow and decision automation with BPMN and DMN. Integration with Quarkus, Spring, Spring Boot, CDI.

3,529

Process Orchestration Framework

:fire: Seata is an easy-to-use, high-performance, open source distributed transaction solution.

Quick Overview

Activiti is an open-source Business Process Management (BPM) and workflow engine written in Java. It provides a platform for modeling, executing, and monitoring business processes and workflows, allowing organizations to automate their operations efficiently.

Pros

  • Lightweight and embeddable, making it easy to integrate into existing Java applications
  • Supports BPMN 2.0 standard, providing a widely recognized notation for process modeling
  • Active community and regular updates, ensuring ongoing support and improvements
  • Offers both a Community Edition and an Enterprise Edition for different needs

Cons

  • Learning curve can be steep for newcomers to BPM concepts
  • Documentation can be inconsistent or outdated in some areas
  • Limited out-of-the-box integrations compared to some commercial alternatives
  • Performance may degrade with very complex processes or high concurrency

Code Examples

  1. Creating a ProcessEngine:
ProcessEngine processEngine = ProcessEngineConfiguration
    .createStandaloneInMemProcessEngineConfiguration()
    .buildProcessEngine();
  1. Deploying a process definition:
RepositoryService repositoryService = processEngine.getRepositoryService();
repositoryService.createDeployment()
    .addClasspathResource("myProcess.bpmn20.xml")
    .deploy();
  1. Starting a process instance:
RuntimeService runtimeService = processEngine.getRuntimeService();
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("myProcess");
  1. Completing a user task:
TaskService taskService = processEngine.getTaskService();
Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult();
taskService.complete(task.getId());

Getting Started

To get started with Activiti, add the following dependency to your Maven pom.xml:

<dependency>
    <groupId>org.activiti</groupId>
    <artifactId>activiti-engine</artifactId>
    <version>7.1.0.M6</version>
</dependency>

Then, create a configuration file named activiti.cfg.xml in your classpath:

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                           http://www.springframework.org/schema/beans/spring-beans.xsd">

    <bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
        <property name="jdbcUrl" value="jdbc:h2:mem:activiti;DB_CLOSE_DELAY=1000" />
        <property name="jdbcDriver" value="org.h2.Driver" />
        <property name="jdbcUsername" value="sa" />
        <property name="jdbcPassword" value="" />
        <property name="databaseSchemaUpdate" value="true" />
    </bean>
</beans>

This configuration sets up an in-memory H2 database for Activiti. You can now use the code examples provided above to start working with Activiti in your Java application.

Competitor Comparisons

A compact and highly efficient workflow and Business Process Management (BPM) platform for developers, system admins and business users.

Pros of Flowable Engine

  • More active development and frequent updates
  • Enhanced performance and scalability for large-scale processes
  • Improved support for cloud-native deployments and microservices architecture

Cons of Flowable Engine

  • Steeper learning curve due to additional features and complexity
  • Potential compatibility issues when migrating from Activiti
  • Less extensive community support compared to Activiti's established ecosystem

Code Comparison

Activiti process definition:

<process id="myProcess" name="My Process">
  <startEvent id="start" />
  <userTask id="userTask" name="User Task" />
  <endEvent id="end" />
  <sequenceFlow sourceRef="start" targetRef="userTask" />
  <sequenceFlow sourceRef="userTask" targetRef="end" />
</process>

Flowable process definition:

<process id="myProcess" name="My Process">
  <startEvent id="start" />
  <userTask id="userTask" name="User Task" flowable:assignee="${assignee}" />
  <endEvent id="end" />
  <sequenceFlow sourceRef="start" targetRef="userTask" />
  <sequenceFlow sourceRef="userTask" targetRef="end" />
</process>

The main difference in the code example is the addition of the flowable:assignee attribute in the Flowable version, demonstrating its enhanced task assignment capabilities.

C7 CE enters EOL in October 2025. Please check out C8 https://github.com/camunda/camunda – Flexible framework for workflow and decision automation with BPMN and DMN. Integration with Quarkus, Spring, Spring Boot, CDI.

Pros of Camunda BPM Platform

  • More extensive documentation and community support
  • Offers a wider range of features, including advanced process engine capabilities
  • Better integration with modern development tools and frameworks

Cons of Camunda BPM Platform

  • Steeper learning curve due to its more complex architecture
  • Higher resource consumption, which may impact performance in some scenarios

Code Comparison

Camunda BPM Platform:

@Deployment(resources = "process.bpmn")
public void testProcess() {
  ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("myProcess");
  Task task = taskService.createTaskQuery().singleResult();
  taskService.complete(task.getId());
  assertProcessEnded(processInstance.getId());
}

Activiti:

@Deployment(resources = "process.bpmn20.xml")
public void testProcess() {
  ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("myProcess");
  Task task = taskService.createTaskQuery().singleResult();
  taskService.complete(task.getId());
  assertProcessEnded(processInstance.getId());
}

Both examples demonstrate similar syntax for deploying and testing a process, with minor differences in resource naming conventions and method calls. Camunda BPM Platform offers more advanced features and integrations, while Activiti provides a simpler, lightweight alternative for basic workflow management needs.

3,529

Process Orchestration Framework

Pros of Camunda

  • More extensive documentation and community support
  • Offers a wider range of features, including advanced process modeling and analytics
  • Better integration with modern cloud-native architectures

Cons of Camunda

  • Steeper learning curve due to more complex architecture
  • Higher resource requirements for deployment and operation
  • Potentially more expensive for enterprise-level implementations

Code Comparison

Camunda (BPMN process definition):

<bpmn:process id="Process_1" isExecutable="true">
  <bpmn:startEvent id="StartEvent_1" />
  <bpmn:task id="Task_1" name="Perform Task" />
  <bpmn:endEvent id="EndEvent_1" />
  <bpmn:sequenceFlow id="Flow_1" sourceRef="StartEvent_1" targetRef="Task_1" />
  <bpmn:sequenceFlow id="Flow_2" sourceRef="Task_1" targetRef="EndEvent_1" />
</bpmn:process>

Activiti (BPMN process definition):

<process id="myProcess" name="My Process" isExecutable="true">
  <startEvent id="start" />
  <userTask id="userTask" name="User Task" />
  <endEvent id="end" />
  <sequenceFlow sourceRef="start" targetRef="userTask" />
  <sequenceFlow sourceRef="userTask" targetRef="end" />
</process>

Both frameworks use similar BPMN XML syntax for process definitions, but Camunda often provides more advanced features and extensions within its BPMN implementation.

:fire: Seata is an easy-to-use, high-performance, open source distributed transaction solution.

Pros of Seata

  • Focused on distributed transaction management, offering more specialized features for microservices architectures
  • Supports multiple transaction modes (AT, TCC, SAGA, XA) for different use cases
  • Active development with frequent updates and a growing community

Cons of Seata

  • Steeper learning curve due to its specialized nature in distributed transactions
  • Less comprehensive documentation compared to Activiti, especially for non-Chinese speakers

Code Comparison

Seata (Java):

@GlobalTransactional
public void businessLogic() {
    // Business logic
    orderService.create(orderDTO);
    accountService.debit(orderDTO.getUserId(), orderDTO.getAmount());
}

Activiti (Java):

@Autowired
private RuntimeService runtimeService;

public void startProcess() {
    Map<String, Object> variables = new HashMap<>();
    variables.put("employeeName", "John Doe");
    runtimeService.startProcessInstanceByKey("onboarding", variables);
}

Summary

Seata is tailored for distributed transaction management in microservices, while Activiti focuses on business process management. Seata offers more flexibility in transaction modes but may be more complex to implement. Activiti provides a more general-purpose workflow engine with easier integration for business processes but may lack specific features for distributed systems.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Activiti

Join Us in Gitter CI Codacy Badge ASL 2.0 CLA security status stability status licensing status

Homepage: http://activiti.org

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. It's open-source and distributed under the Apache license. Activiti runs in any Java application, on a server, on a cluster or in the cloud. It integrates perfectly with Spring, it is extremely lightweight and based on simple concepts.

**NOTE: We moved to the master branch all the content of the development branch that we were using to design and code the next major version of the project. If you want to contribute with version 6.x please look at the 6.x branch.**

If you want to read more about our Repositories structure you can read our GitBook.

Configuring IntelliJ

  • Force language level 21, to fail-fast when (accidentally) using features available only in newer Java versions.

    • Open menu File, menu item Project Structure
    • Click list item Modules, for each module, tab Sources, combobox Language level should be automatically set to 21 ...
  • Avoid that changes in some resources are ignored in the next run/debug (and you are forced to use mvn)

    • Open menu File, menu item Settings or menu IntelliJ IDEA, menu item Preferences... if on a Mac
    • Click tree item Compiler, textfield Resource patterns: change to !?*.java (remove other content)
  • Avoid a StackOverflowError when building

    • Open menu File, menu item Settings or menu IntelliJ IDEA, menu item Preferences... if on a Mac
    • Click tree item Compiler, tree item Java Compiler, textfield Additional command line parameters
    • Add -J-Xss1024k
  • Recommended code style: use the Google Java Style Guide with editorconfig

    • Download the IntelliJ code style xml from: [https://google.github.io/styleguide/intellij-java-google-style.xml]
    • Open menu File, menu item Settings or menu IntelliJ IDEA, menu item Preferences... if on a Mac
    • Click tree item Code Style, click cogwheel and select Import scheme, then IntelliJ code style xml
    • Browse where you downloaded the xml and open it. Check that GoogleStyle is the active scheme.
      • Note: IntelliJ IDEA doesn't format your code automatically. You have to press Ctrl+Alt+L keyboard combination to trigger auto formatting when coding is done.
    • There's an .editorconfig what has definition for indents, file encoding, line endings.
    • If you disable it, you need to set the file encoding and number of spaces correctly manually.
    • Eclipse code style xml: [https://google.github.io/styleguide/eclipse-java-google-style.xml]
    • Eclipse needs editorconfig-eclipse plugin in order to support EditorConfig files.
  • Set manually the correct file encoding (UTF-8 except for properties files) and end-of-line characters (unix):

    • Open menu File, menu item Settings or menu IntelliJ IDEA, menu item Preferences... if on a Mac
    • Click tree item Code Style, tree item General
      • Combobox Line separator (for new files): Unix
    • Click tree item File Encodings
      • Combobox Global Encoding: UTF-8
      • Combobox Default encoding for properties files: ISO-8859-1
        • Note: normal i18n properties files must be in ISO-8859-1 as specified by the java ResourceBundle contract.
  • Set manually the correct number of spaces when pressing tab:

    • Open menu File, menu item Settings or menu IntelliJ IDEA, menu item Preferences... if on a Mac
    • Click tree item Code Style, tree item General
    • Click tab Java
      • Checkbox Use tab character: off
      • Textfield Tab size: 4
      • Textfield Indent: 4
      • Textfield Continuation indent: 8
    • Open tab XML
      • Checkbox Use tab character: off
      • Textfield Tab size: 2
      • Textfield Indent: 2
      • Textfield Continuation indent: 4
  • Set the correct file headers (do not include @author or a meaningless javadoc):

    • Open menu File, menu item Settings or menu IntelliJ IDEA, menu item Preferences... if on a Mac
    • Click tree item File templates, tab Includes, list item File Header
    • Remove the line @author Your Name.
      • We do not accept @author lines in source files, see FAQ below.
    • Remove the entire javadoc as automatically templated data is meaningless.
  • Set the correct license header

    • Open menu File, menu item Settings or menu IntelliJ IDEA, menu item Preferences... if on a Mac
    • Click tree item Copyright, tree item Copyright profiles
    • Click tree item Copyright
      • Combobox Default project copyright: Alfresco Software

FAQ

  • Why do you not accept @author lines in your source code?

    • Because the author tags in the java files are a maintenance nightmare

      • A large percentage is wrong, incomplete or inaccurate.
      • Most of the time, it only contains the original author. Many files are completely refactored/expanded by other authors.
      • Git is accurate, that is the canonical source to find the correct author.
    • Because the author tags promote code ownership, which is bad in the long run.

      • If people work on a piece they perceive as being owned by someone else, they tend to:
        • only fix what they are assigned to fix, instead of everything that's broken
        • discard responsibility if that code doesn't work properly
        • be scared of stepping on the feet of the owner.
    • Credit to the authors is given:

Development commands

Add License header

To format files with the required license:

mvn license:format

Checkstyle

To check if your code style respect all the rules:

mvn checkstyle:check -DskipCheckstyle=false

Site

To generate the maven site:

mvn clean site site:stage

the site will be generated at: target/staging/index.html

CI/CD

Running on GH Actions.

For Dependabot PRs to be validated by CI, the label "CI" should be added to the PR.

Requires the following secrets to be set:

NameDescription
BOT_GITHUB_TOKENToken to launch other builds on GH
BOT_GITHUB_USERNAMEUsername to issue propagation PRs
NEXUS_USERNAMEInternal Maven repository username
NEXUS_PASSWORDInternal Maven repository password
SLACK_NOTIFICATION_BOT_TOKENToken to notify slack on failure