cancel
Showing results for 
Search instead for 
Did you mean: 

Exception when multiple activiti engines up and running

ganeshr
Champ in-the-making
Champ in-the-making
Hi,

  I'm facing an issue when one of  my process contains timer boundary events. Here is the description of my issue.
  I have 3 different standalone applications and 3 business processes, and in each of these applications activiti engine is up and running connecting to the same database.  These application runs as a services, so each of these services listens to the incoming request and initiates the business process specific to that service. As I have created timer boundary event for one of my business process, so whenever timer boundary event is fired, the activiti engine running in the application for this specific business process is not executing this time event, instead sometimes another activiti engine running in different application is executing and throwing exception as it is unable to find the classes in the classpath.  Is there anyway where we can configure activiti engine to execute events related to that specific business process?
4 REPLIES 4

mmaker1234
Champ in-the-making
Champ in-the-making
My experience with the workflow engines shows that the demonstrated behavior is the most common one. Once the process definition is deployed in the DB the workflow engine works with, the process definition is "visible" to the engine regardless the manner, subject, or object that deployed it there.

Regarding the above, if the applications are different you shouldn't share the process definitions among them, i.e. you should not deploy them in the same DB. Probably the easiest way to avoid the problem is to use separate DBs (users, schemata) for the different applications/Activiti engines.

You could still try to configure your engines with different names for the different applications but from what I know about Acitviti I doubt this approach will work with it, although it works with some other engines.

ganeshr
Champ in-the-making
Champ in-the-making
could you provide the details of how to configure the engines with different names, may be I will try that approach and will check if that works or not.

mmaker1234
Champ in-the-making
Champ in-the-making
There is a property of the <code>processEngineConfiguration</code> bean in the Activiti Engine configuration file (activiti.cfg.xml in this example):<code>  <bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
    <property name="processEngineName" value="ActivitiEngineForApp1"/>

</code>Of course you can also set it at run-time.

ganeshr
Champ in-the-making
Champ in-the-making
I will try the proposed approach and will check if that works.Thank you for providing response.