cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti Job Executor EE available (Apache License 2.0)

catandgrep
Champ in-the-making
Champ in-the-making
Dear Activity Community,

We (agito) would like to share our Job Executor for EE environments with you, that we've implemented some time ago for the EE distributions of our product agito BPMO. Due to its loosly coupled nature, it can be integrated with any Activiti Engine.

The default job executor in Activiti uses a self managed Thread Pool, which is not sufficient when running Activiti on JEE compliant application servers. Also the hard coupling between process engine and job acquisition does not fit well into enterprise scenarios. This project provides solution for both issues, and fill the gap between Activiti and JEE servers.

The Job Executor EE is licensed under Apache License 2.0 and available on github.

In case you want to give us feedback, you can reach us here in the forum or by using the mailing list in the Community Center.

### Scope of the Activiti Job Executor EE Project ###
  1. Decouple Job Acquisition from Process Engines
    1. Configure Acquition Workers
      • maxJobsPerAcquisition
      • lockTimeInMillis
      • waitTimeInMillis
    2. Assign Process Engines to Acquisition Workers (Multiple Engines can be assigned to one acquisition worker)
  2. Job Executor EE implementation using the Java Connector Architecture (JCA)
    1. JEE 1.5 and 1.6 compliant.
    2. Obtain threads from standard Work Manager provided by Application Servers.
    3. Dispatch job execution to Message Driven Bean for entering the JEE container (synchronous invocation, no JMS).
    4. Use default Job Execution Command from Activiti.
  3. Integrated Test Suite (ITS) showing how to use it.


### Out of Scope ###
  • Dedicated mechanism to execute asynchronous work within application context. (A custom classloader in Activiti could take care of that)
  • Dedicated mechanism to deploy web- or enterprise-applications. (You could register the application classloader upon deployment of an application)
Have fun.
Andreas.
5 REPLIES 5

jbarrez
Star Contributor
Star Contributor
Nice work guys! Keep up the good work!

catandgrep
Champ in-the-making
Champ in-the-making
Version 1.0.8 Released containg upgrade to Activiti 5.14.

The Job Executor EE is available on github.

clstokes
Champ in-the-making
Champ in-the-making
<blockquote>
The default job executor in Activiti uses a self managed Thread Pool, which is not sufficient when running Activiti on JEE compliant application servers. Also the hard coupling between process engine and job acquisition does not fit well into enterprise scenarios.
</blockquote>

Can you expand on why this is? What's missing and/or inferior about the normal implementation?

catandgrep
Champ in-the-making
Champ in-the-making
A simple reason: Threads of a self managed thread pool will not be managed by the Application Server. E.g. in startup/shutdown scenarios, this means, that these threads can not rely on resources of the application server at any time. The JCA adapter is by design fully integrated into the lifecycle of an application server.

Easier Concurrency Support for JEE applications comes with JSR 236 Concurrency Utils for EE. This is available on the EE7 platform and defines extensions to the SE concurrency APIs to allow them to be used in an app server environment. On JEE5 & JEE6 platforms the only safe way to spawn threads is the WorkManager of an Resource Adapter.

Because implementing such an Resource Adapter requires good knowledge about the JCA contracts,  the Activiti Job Executor EE project provides an open source reference.

mahavirj
Champ in-the-making
Champ in-the-making
Does this work in a clustered environment? Can the resource adapter assign work to multiple jvms in a cluster but have only one jvm pick up work?