cancel
Showing results for 
Search instead for 
Did you mean: 

Does Activiti really need spring?

johnament1
Champ in-the-making
Champ in-the-making
So, this is more design level than anything else.  My application today makes heavy use of CDI.  It seems like Activiti comes bundled with Spring.  Based on this note, I was surprised to see it as a hard requirement.

Note that the configuration XML is in fact a Spring configuration. This does not mean that Activiti can only be used in a Spring environment! We are simply leveraging the parsing and dependency injection capabilities of Spring internally for building up the engine.

So, is it possible for me to exclude Spring from my application, assuming that I bootstrap Activiti manually using something like this:


ProcessEngine processEngine = ProcessEngineConfiguration.createStandaloneInMemProcessEngineConfiguration()
  .setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_FALSE)
  .setJdbcUrl("jdbc:h2:mem:my-own-db;DB_CLOSE_DELAY=1000")
  .setJobExecutorActivate(true)
  .buildProcessEngine();
1 REPLY 1

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

Activiti engine does not depend on the spring. Only on spring beans

    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-beans</artifactId>
    </dependency>

You can instantiate process engine without spring configuration too.

Regards
Martin