cancel
Showing results for 
Search instead for 
Did you mean: 

Embedding Activiti

wolpert
Champ in-the-making
Champ in-the-making
I have a variety of questions about developing and deploying with Activiti. We are planning on using Activiti in a re-write of our existing software. I'm trying to figure out the best way to start the software development process. The current proposed architecture is for us to use a grails application that runs on multiple servers behind a load balancer. We'd like to avoid the activiti stand-alone server and instead embed the activiti engine into our grails application, with the deployed processes (bar files) in the grails application war file. If we use the engine in an embedded fashion, is there any issue with having a standalone tomcat instance with the same bar files connected to the same database to monitor job progress?

Given the above deployment environment, would it be reasonable to do application upgrades in a rolling fashion, provided the new application code didn't conflict with the old ? (shutdown server 1, update code, restart server 1, shutdown server 2, update code, restart server 2, etc…)  Or is this a problem for activiti if there are potentially different version of the same deployed processes (bar files) acting against the database?

Also, what are the main issues with this type of deployment, considering the load-balanced environment? Are there any issues we need to be aware of in regard to transactions from these servers?

Thanks again
Ned
4 REPLIES 4

wolpert
Champ in-the-making
Champ in-the-making
Don't mean to reply to my own message, but I did find the grails activiti plugin which answered most of my questions. I do want to clarify a question though…

Are there any guidelines to updating an existing production environment when dealing with modifying an existing workflow that could be in play? Are there any conditions that need to be considered when starting a software project that uses activiti that would make updating a production environment easier?

In our specific case, we will have a cluster running a grails application that uses the activiti plugin, as well as several other applications outside of the cluster for handling some of the activiti tasks. All applications will embed the activiti process engine, as opposed to using the standalone server. The issue I'm trying to address is the deployment of the new or updated bar files and code that is referenced in those xml files, or code that is expecting specific BPMN tasks. I'm not sure I understand how processes are version'ed in activiti and if that could be made of use in our code to reduce headaches as well.

Thanks,
Ned

bernd_ruecker
Champ in-the-making
Champ in-the-making
Hi Ned.

I am not sure if I completely understand your questions, but I try to give you an answer…

For the versioning: If you think of process definition versioning (a new version of the process is deployed while you still have running instances of old versions), that is easily supported by Activiti. You just create a new process deployment, which leads in a new process version in the database. Classes are by the way not included (yet), so they must be on your classpath and versioned separately there (naming convention?). That could be more tricky in a highly ckustered environment (but not unsolvable, we have customer doing something comparable in comparable environments).

For updating the Engine it gets a bit tricky, since the database contains the Activiti version number. So as soon as the database is updated to a new Activiti version, other cluster nodes must be updated as well. Actually we should discuss that scenario in the Activiti team a bit more, but currently there are other topics with a higher priority 😕 But you can always hire some consultants for helping you out there ;-))

Hope that helps a bit?

Cheers
Bernd

wolpert
Champ in-the-making
Champ in-the-making
You answered my question just fine. It sounds like if a new version of a process definition is deployed, the currently executing processes that were using the older version of that definition will complete with the older version, and all new processes will use the new version of the process definition. This is also my desired impact.  (The solution to the class issues you mention makes sense.)

Changing the engine itself (say from 5.0 to 5.1) sounds like a downtime event, which is not unexpected.

bernd_ruecker
Champ in-the-making
Champ in-the-making
Perfect. I am always glad if I could help 🙂 And always good to hear for us, that the design of Activiti fits to your needs…