cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with activiti-rest.war

wmfinamore
Champ in-the-making
Champ in-the-making
Hi

I tried to deploy the activiti-rest.war with the Tomcat7 but the application does not work. What i could make to fix the problem? I'm using the Activiti 5.12.

Thanks
22 REPLIES 22

b_schnarr
Champ in-the-making
Champ in-the-making
Thank you for your reply. I am new to activiti. Therefore, I don´t understand how to do this. As soon as I finished modelling my process in eclipse (with all classes and definitions), I´d like to deploy it in the activiti explorer. I thought that after that the deployment would be finished? How do I succeed in updating the classpath?

Thank you and best regards
Ben

frederikherema1
Star Contributor
Star Contributor
Updating classpath depends on the container, but the best thing is to include the JAR in the activiti-explorer war, WEB-INF/lib…

Ok, lets say that we define a new process with several java service tasks. We want that this process is available in the activiti explorer and via REST. For both, we´re using Tomcat and a shared MySQL-database. Maybe, I misunderstood your answer. When I want to deploy a new process with java service tasks, do I have to redeploy the activiti-explorer.war and the activiti-rest.war each time for every new process?

Thank ou for your reply.

jbarrez
Star Contributor
Star Contributor
What frederik means is that your custom classes (in a jar) need to be on the classpath of both containers (the container for explorer and for rest).

b_schnarr
Champ in-the-making
Champ in-the-making
Are there any tutorials? That would mean that I have to restart the container after each classpath-update? Maybe I got something wrong but I have the feeling that my deploment (shared state between both apps) is not a standard deployment? Because it sounds very complex to deploy new Process-Definitions in a way that they are available on both apps. What is if I used the same container for both apps, e.g. one Tomcat instance?

frederikherema1
Star Contributor
Star Contributor
You can indeed use the same container for both apps… If you add the classes to the shared classpath, this might work if you also place the actviti-engine.jar on the shared classpath, or the classloading hierarchy will be broken.

Anyway, if you're using tomcat, you ALWAYS need to reboot the container of you add new entries to the classpath. This is the way it is, regardless if you're using Activiti or not…

Thanks for your reply. Lets say we do not combine both apps but we use the same database for shared state. Now, we create a new process definition and deploy this new process via activiti explorer. All java classes involved will be copied to both lib folders (activiti explorer lib folder and rest lib folder). When I start a process instance, does this instance has the same state in both web apps? Lets say, I start the process instance via rest. After that, I interact with the next process step via activiti explorer. After that, I finish the next process step via rest again. Is this possible?

frederikherema1
Star Contributor
Star Contributor
Yes, the state is persisted in the database, between wait-states. So starting process in explorer, completing a task in rest and completing another task in explorer is perfectly fine. It's also best to have only one job-executor active at the same time, or you can get exceptions when 2 of them try to lock the same job…

Thanky for your reply. This is the answer is needed!! How do I achieve this (having only one job-executor active? )

frederikherema1
Star Contributor
Star Contributor
In one of the two apps, set the property "jobExecutorActivate" to false in the activiti.cfg.xml OR in the applicationContext.xml.