AnsweredAssumed Answered

Some doubts in Activiti while implementing :

Question asked by arunkumar1 on Aug 28, 2015
1. I Have generated a  process flow diagram form Eclipse editor and placed in an resource folder as bpmn.xml. The process flow can have various steps and observed java code             has been written for each step.
Suppose if there are 5 steps in a processflow1 : 5 times we have to do task query based on task name or id . Check for some extra custom logic or embed in flow  diagram and  then end the process.  
Suppose if there are 3 steps in a processflow2 : Each an every time we have to  write the above same procedure. Or if there any way to abstract the functionality ?
So for each process flow we have to write some or the other code. Is my understanding correct ?

2. For a given processflow ,Can we find where the current processflow stands and what are the stages that have/haven't been completed . I didn't find any API or Do we have to         query explicitly to the database for this use case.

3. Can we dynamically generate a processflow though an modeler and insert into our application and  how about processing that part of code in server side?

4. A process flow can have n stages .Can we add custom data or attributed to a process stage (i.e a property on Task like G1) ?