cancel
Showing results for 
Search instead for 
Did you mean: 

Questions about Activiti

andreyilyin
Champ in-the-making
Champ in-the-making
Hi all,

I am currently evaluating Activiti for building soft collection software and have a few questions:

1) I want to break the whole process into several smaller process definitions, e.g.
    1st phase: Classification - check what's the debt age, amount etc and select collection strategy.
    2nd phase: Run specific process for entity
    N-th phase: run specific process (e.g. Client communication)

The reason of this I want to break whole process into small bpmn files and do not change whole process while deployment to production.

2) Is there a concept of work list? E.g. once entity arrives to specific state, I need to specify the list of activities user can perform. E.g. in pre-sms work list I want use to be able to a) check current balance b) Write comment c) Complete work on the client. I am not sure how to model this in BPMN 2.0.

3) Once some action (automatic or user) is triggered, the process instance should go to the start of whole workflow again. How do you model this?

4) Even if process instance reaches the end state (e.g. if client has no outstanding debt), once client delays his payments, I need to start the process again, but not as new process instance, but continuing the same (process instance is identified by client id) to retain the history. Does that mean that I have to keep all my process instances alive at all time or I can somehow finish the current process instance and once some event happens I can resume same process instance

5) Total amount of clients is about 20 millions with 2 millions requiring work. I don't want to have 20 millions constantly running in activiti, how can I suspend the 18 mil and only run them if some event occurs?

6) Is that possible to update process definition in runtime? Do I have to shut down activity engine?

7) What happens if new version of process definition will not contain the state from old version of process definition? How do I define the mapping?

8 ) Can I have several activiti engines running? E.g. if one instance goes down, it should automatically fail over. Does activity lock the process instance using database?

9) What happens if there is a error in either condition or task? E.g. java exception. I want to be able either move the process instance to error work list or depending on error (e.g. deadlock or database error) move process instance to the start of process definition and retry whole process again.

10) Is that possible to acquire list of permitted tasks for process instance that user can do using engine API?

11) How does activiti stores the process instance data? E.g. as I understood, process instance is the state of business entity in the workflow and you add the actual data as attributes. I am not sure if activiti actually serializes the whole entity as stores it as BLOB in the database?

12) How activity handles the timers? E.g. let's say I send sms for 200,000 clients and want the process to sleep for 2 days before
Does activity do some polling in the database or keeps timers in memory?

13) How many activiti engines I can keep running? Can I run 10 activiti engines in parallel? Also, If I need to run new process instance, is there a way to load balance between engines?

Thank you.
3 REPLIES 3

jbarrez
Star Contributor
Star Contributor
This does sound awfully like you are filling in a RFP and you want us to do your homework. Some questions make me get the feeling you didn 't invest much time into Activiti yet. So my answers will be concise.

1) Yes, possible. Use a call activity and subprocesses

2) Yes possible. This is basically the task system in Activiti. In BPMN this is a UserTask

3) By wrapping steps in an embedded subprocess and attaching a boundary event to act upon the receival of the event.

4) That will be the same process instance. See next question too.

5) That is the default Activiti behaviour. We *never* keep something in memory unless it is actively continuing process execution. If your process instance is waiting on external events, it is in the database persisted (until forever if you want that).

6) You can deploy a new process definition. Any new process instance started now runs against the new version. In-flight changing the process definition is tricky and hard (but can be done with some complex coding). I wouldn't advise it though.

7) See previous question

😎 Yes. Activiti does not lock anything.

9) Then you need to model this explicitly in your process definition.

10) Yes. See TaskQuery Api.

11) No. Serializing it as a BLOB would be going against all that Activiti stands for. Check the database schema. Each variable type is seperatly stored, well typed and all.

12) Timers go into the database. The Job Executors polls regularly (configurable) to see if any of them fires.

13) Activiti is stateless. You can have as many as you want.

andreyilyin
Champ in-the-making
Champ in-the-making
Thank you for answers, I physically do not have time to investigate all this stuff now, so that's why I am asking. Would be nice to have some kind of architectural document to show everyone how activiti works internally and some examples. Unfortunately I do not have BPM background and having issues trying to understand how to model the business process correctly.

jbarrez
Star Contributor
Star Contributor