cancel
Showing results for 
Search instead for 
Did you mean: 

Re-engineering a legacy state machine with built in rules ...

rkarnam
Champ in-the-making
Champ in-the-making
Hi,

I have prototyped a simple app with a groovy script, a RESTService call using Service Task and mail task to send the user status. This is a prototype to propose using Activiti BPM to replace the legacy system. This legacy system can have a campaign similar to a workflow. This campaign can execute events and rules and based on certain parameters can persist the state of the campaign. lets say half a million members can be paneled into the campaign. Like wise there could 1000's of campaigns, where each campaign can panel half million members into it. The way each campaign wakes up is by a batch process that runs everyday. If the date is reached those campaigns continue to execute.

We have 36 instances of the server and it relies on 64 partitions of sybase database to store the customer info and each customer campaign state. Each customer can be part of serveral campaigns and each campaign can have hundreds of thousands to customers.

Is Activiti a viable solution for such an implementation ? I know it has state but mostly from a workflow perspective… will each customers workflow state be saved. Will all these millions of users be part of identity tables in activiti ?

I looked at jorambarrez performance article. The performance is driven by number of process per thread.  I am looking at 1000's of threads executing same workflow. I know we can create a cluster of servers. I am guessing database needs to be partitioned to support a large number of customer base. I need to run some load tests doing these.

Any thoughts ? Ideas ?

Also I was looking for enterprise support for Activiti. Signed up online did not get any reply. Although it said a download link with documentation was sent.
4 REPLIES 4

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

will each customers workflow state be saved.

If you will execute process instance for each customer, yes. May be another approach could be consider too. (e.g. one process instance - (campaign) can change state of  1000's of objects (customers).

Will all these millions of users be part of identity tables in activiti ?
It depends on your solution. How you will design processes.

Also I was looking for enterprise support for Activiti.
http://activiti.org/enterprise-support.html
Try to contact: activiti@edorasware.com

Regards
Martin

rkarnam
Champ in-the-making
Champ in-the-making
Thanks for your answers:

I have done a POC with activiti. Here are my technical questions.

1) We will have 1000's of marketing campaigns which is your workflow processes.
2) Each workflow process can panel 2 or 3 million customers out of 30 million AIM users
3) So my question is how the datastore is managed …will activiti support multiple instances of dbs with some RANGE or HASH or KEY partitioning based on guid or userId.
4) The state management for each of the customer can process a lot data. Does all the data get stored in the ACT_RU_VARIABLE table ? is there a compress algorithm being using to store variables in TEXT_VARCHAR and TEXT2_VARCHAR. How can we avoid that storage and instead always get the data ?

jbarrez
Star Contributor
Star Contributor
> will activiti support multiple instances of dbs with some RANGE or HASH or KEY partitioning based on guid or userId.

No, Activiti does not do that. You will need to manage that on the db level. Or on the application level and have multiple Activiti engines.

4) No, there is no compression being done. All process data will be in the ACT_RU_VARIABLE table.
To avoid that, use an external data storage, and only store references in the process.

rkarnam
Champ in-the-making
Champ in-the-making
Thanks Joram!

I have integrated with the profile service which is couchbase cluster. I get the profile information when the REST service is called. I inject that profile Object into the startProcessInstanceByKey call.
<java>
  CpsResponse profileResponse = cpsService.getProfile((String) nameValuePairs.get("userId"));
  nameValuePairs.put("profileObject", profileResponse);
  ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(
    processKey, nameValuePairs);
</java>
I also have a  groovy script task. Which parses the data.
<javascript>
   <script>
    outSmiley Tonguerintln "validating order for name " + userId;
    def subs = profileObject.nameValuePairs.subs;
   
    subs.each{ k, v -> outSmiley Tonguerintln " Subs List size : ${v.size}";
       v.each { sub ->
          outSmiley Tonguerintln " Sub: ${sub.svuProdId}, ${sub.name}, ${sub.status}, ${sub.productClass}";
         }
      }
</javascript>
Here is my question if there is a timer event in it then it will get stored into the database. How can I avoid storing it into db. Can I declare the object as transient ?

Also is there a way to call this service again when the timer event triggers ? I am looking into execution listener event.

Any insights will be helpful.

Thanks

Raghav.