cancel
Showing results for 
Search instead for 
Did you mean: 

activiti-rest & -explorer sharing process engine? (v5.7)

f3lix
Champ in-the-making
Champ in-the-making
Hello,

in the previous versions of Activiti (<= 5.6) my understanding was that there was one instance of a process engine that was shared using the REST interface; activiti-probe and activiti-explorer would use the REST interface to manipulate the state of the process engine.

Now, in Activity 5.7 it seems to me that both, activiti-rest AND activiti-explorer, have an instance of the process engine running and they share there state via the DB. Is this correct? If yes, I have a feeling that this would cause problem. But my understanding of the inner workings of Activiti are unfortunately still very limited …

BTW, is there something like an architecture diagram of Activiti that would show such interdependencies/relations of modules?

Regards,
Felix
20 REPLIES 20

trademak
Star Contributor
Star Contributor
Hi,

Yes you're right, both web applications have a process engine instance.
In a production setup this is probably not the best setup. But it's really easy to combine the explorer and REST application into one web application using the same process instance.

Best regards,

f3lix
Champ in-the-making
Champ in-the-making
Ok, this information saved me some time. Now, I simply combined activiti-rest and -explorer as you proposed. Works fine as far as I can tell.

Cheers,
Felix

vnama
Champ in-the-making
Champ in-the-making
Can anyone explain how I can combine these two? I am new to web application deployment. I'd like to be able to upload a bpmn20.xml file through the explorer UI and be able to get those process definitions through the REST API. Is there a tutorial on how to combine the web apps so that they use a single process instance?

Hello vnama,

Go to this url, I have written a tutorial that exactly match your requirement. 

How to configure Activiti Explorer and REST to use the same database 

trademak
Star Contributor
Star Contributor
Hi,

I've described it in Activiti in Action with an example project.
But it's really easy, just combine the web.xml and the Spring configurations and combine the classes from both web apps.

Best regards,

vnama
Champ in-the-making
Champ in-the-making
Thank you for the insight. I was hoping the web apps did not each have a process engine, but you were right in that it was fairly easy to combine them. Thank you for the response.

damokles
Champ in-the-making
Champ in-the-making
Hi,

I've described it in Activiti in Action with an example project.
But it's really easy, just combine the web.xml and the Spring configurations and combine the classes from both web apps.

Best regards,

Hi Tijs,

I could not find the example in the svn repo, and in Section 8.1.2 of the book it is only mentioned that it is possible without explaining how. Did I miss something?

b_schnarr
Champ in-the-making
Champ in-the-making
Hi,

same here. I would like to combine the activiti explorer and the rest web application for activiti 5.14. I am very new to activiti. We need a shared state between explorer and rest web app. I bought and read Activiti in Action. There is described that it is possible to combine these two apps, but without further details. It would be a great help if there was a tutorial or an out-of-the-box appliance so that user without so much programming and activiti skill can easier start with activiti. I am of the opinion that this requirement (sharing one process instance for explorer and rest) is needed by nearly all users with a stand alone deployment.

Thanks and best regards
Ben

frederikherema1
Star Contributor
Star Contributor
It's the same as you whould combine ANY 2 webapps. Steps involved (high-level):
1) Expand both war's (if not already exploded)
2) Merge all folders into one (ignoring web.xml), incuding libs, classes, …
3) Create a single web.xml file, containing both the servlets and filters from WEB-INF/web.xml-files from both war-files. normally, this is a straight forward copy-paste action of the relevant sections.
4) Enjoy!