AnsweredAssumed Answered

Activiti with no forms and modelling machines as users

Question asked by vrootid4 on Jul 19, 2013
Latest reply on Aug 6, 2013 by vrootid4

Apologies for writing a long mail :).
We are in pursuit of building an enterprise application that utilizes the power of activiti. But there's a lot of dilema in our mind.
Here's what is currently available :
1. There are jobs that need to be scheduled. The jobs are executed on multiple web clients (say around 10+ machines). Each job with unique ID is added to just one machine (Say A) which is a starting point of the flow. The execution of each job has a sequence say A->B C-> B IF A AND C BOTH RECEIVED AT B THEN MOVE AHEAD SAY TO MACHINE D. The users are native to the APP and its like machine is responsible to decide the status of a job execution.
2. Our application is utilizing JSP, Struts2, Spring JDBC, MySQL (with app db and activiti db) and now activiti which we need to integrate.

What we want?
So as in (1) above once Machine A pulls the job 1 designated to it from its native DB it then Job 1 once completed at Machine A should continue the path as designed in the process diagram to other machines. BASICALLY we need a state machine / BPM and that is where we think activiti can help. But here's what is different

1. Form to add jobs to machines is already there.
2. Forms to display a job designated to it is also there.

3. How we think activiti can be integrated. Now as far as what we understand there are 2 ways to get this process instance started
a) 1st is a message start event which keeps polling the backend application database (not activiti db) to see whether there is a job to kick-off the process instance. Or this can be a none-start with a Java service task or Java receive task (real confusion here).
With this option most of our tasks will actually be polling the non-activiti db (app native db) to check for certain flags and move the sequence ahead.
b) An entirely different approach. Like a task can be claimed by a user in activiti can we model it in a way where actually a machine claims the whole task?
What approach is advisable?

Any help is appreciated.