Activiti vs Spring batch
Question: I have got a use case to implement. It's basically a workflow kind of use
case. Below is the requirements

  1. Extract and import data from an external db to an internal db

  2. Make this imported data into different formats and supply it to multiple external systems and invoke some script there. The external interfaces are SFTP, SOAP, JDBC, Python over CORBA. There are around 14 external systems with one of these interfaces.

  3. Interface transactions are executed in around 15 steps, with the ability to run some steps in parallel

  4. These steps should be configurable. ie, a particular flow may execute 10 of these 15 steps and another flow executes 15 of 15 steps

  5. Should have the ability to restart each step individually or restart from a particular step

  6. There are some steps that are manual and completion of manual step should trigger next step

Volume of data is not that large. Total data size is around 400k records. But
this process is executing for around 30k records at a time. Time for
development is less and we are looking for some light weight easy to learn and
implement solution.

We are looking for Spring based or Spring integratable solutions.

The solutions we considered are

**For workflow:** **Activiti, Spring Batch**

**For interfaces:** **Spring Integration**

My question is 1) Can Spring batch considered for managing a work flow kind of
use case? I don't think it's a best fit use case for Spring Batch but as its
simple and easy to implement looked for its scope. We considered doing the
interfaces interaction as each step in a batch job and inside the tasklet do
the Spring Integration for external interfaces, with few issues as far as I
understand are

a) Dynamic step configuration can be done with Java configuration, but how
flexible it is and is it recommended?

b) Manual step processing is not possible in Spring Batch

Is there any work around for this? Is there any other issues or performance
impacts on doing this?

2) Activiti seems to a solution. Can you please provide some feedback on
Activiti with Spring and Spring integration for this use case and ease of
implementing it? And support for Activiti

3) Can Activiti workflows restarted from a particular task? Is a task can be
rollbacked?

Welcoming any suggestions !!


Answer: 1) For managing workflows, Activiti would be a great choice. They have created
a really good process engine which should comply your needs for delegating
your tasks as well as calling your custom logic. Moreover, it is based
entirely on Spring Framework so Integration with your logic would be easy.

2) i've provided the same in first answer.

3) No, you will have to create a new workflow for that and Yes!, a task can be
rolled back.

