AnsweredAssumed Answered

what is the best architecture?

Question asked by tbee on Aug 28, 2012
Latest reply on Aug 29, 2012 by trademak
I'm considering using Activiti in one of my projects, but I'm a bit uncertain about the best architecture. Activiti basically is an active component. This means that when the environment triggers a "compete task", the workflow will move forward to the next task in the workflow, and possibly execute whatever action is required for that task in the current environment. This means that any environment that modifies the workflow in principle must be able to execute any possible action.

Given that fact, one would lean towards making Activiti the center of the universe; it is the central core which initiates actions. If that is the case, then one would expect some kind of central "workflow" server, basically an application server. And naturally things like clustering / fail over / load balancing become issues.

But in the era of cloud computing, a more decentralized and distributed approach is often used. In this case I would imagine Activiti to be a component, for example embedded in a webapp. But that would mean all actions are executed on the webserver. You may not want certain actions to happen there. For example, somewhere in the workflow some documents need to be generated. You do not want the webserver to carry that load and offload it to separate batch server.

So what is wise?
1. Create a central Activiti workflow server including fail over / load balancing.
2. Embed Activiti in the components of system.

I'm leaning toward 2. But if you embed Activiti, are there any chances of conflicts because multiple workflow engines are active at the same time (each webserver has an engine, the batch processes have an engine, etc)?