cancel
Showing results for 
Search instead for 
Did you mean: 

Scalability of the Activiti Engine in an Enterprise environment

ambharath
Champ in-the-making
Champ in-the-making
Hello All,

I have a couple of questions related to the scalability of Activiti as follows:

1) What is the best way to execute multiple process instances of a workflow? One good recommendation was from Joram in another post where he gave the usage of a Java ThreadPool executor with each thread starting & executing one process instance. Is there some other approach too?
2) In order to be able to run multiple instances running the order of, say, a million, what is the best way to come up with a configuration or design?
3) On a different track, if the Activiti Engine suddenly shuts down (due to an unforeseen reason like a power outage), once we boot up the server again, is there a provision in the API to wake up all suspended process instances and bring them back to execution? The assumption is that the process instance in this context contains async-true service tasks, user tasks & script tasks.

Can anyone kindly let me know inputs in this regard so as to give me some traction to go ahead on my own?
2 REPLIES 2

frederikherema1
Star Contributor
Star Contributor
1) Don't think there is another approach, other than having a process with a service-task in it (with async=true) that starts any number of instances, using the EngineServices. Due to the fact that the activity is async, this will be run in the job-executor, and not using the thread that actually starts this "special" process.

2) Not sure if it's related to 1, but you could have multiple of these processes, spawining batches of lat's say 100 processes each time, perhaps using sequential multi-instance with timeouts in between?

3) Activiti uses a transaction when executing a process. So when VM goes down, all pending transactions are rolled back and all processes are left in the state they were before the ongoing action.

ambharath
Champ in-the-making
Champ in-the-making
Hello frederikheremans,

Many thanks for the answers - they've opened a new stream of thoughts in me Smiley Happy
I shall proceed in this direction!

-
A M Bharath