AnsweredAssumed Answered

Integrating REST interface / explore into an existing webapp

Question asked by sebastian.s on Feb 25, 2012
Latest reply on Aug 17, 2017 by kgastaldo
Hello everybody,

I am struggling integrating the Activiti REST interface into an existing web application since the REST interface is already an .war-artifact itself. For this reason I would like to propose to change the way the REST interface is build in the following way.

What about creating a .jar with the actual API and servlet classes and then creating a web-app (.jar) which references the .jar with the actual API classes. The .war would then contain the rest-api.jar plus the configuration files / examples. In my opinion this would ease the integration and usage of the REST interface since you could use the "rest-api.jar" in your own web application.

Any opinions on this?

EDIT: The same goes for the explorer. Anyway, I managed to pack a jar for the explorer and to add it to the dependencies of my webapp. The problem I am facing now however is that I cannot convince the explorer to use my process engine instance which has been created by a Spring configuration file already because it is in the contextConfigLocation. The explorer always tries to get the default Process Engine by using the ProcessEngines-class. This fails due to my process engine not beeing the static list of Process Engines which this class maintains and due to the property "initialized" being set to false. This makes the ProcessEngines-class try to create a new default process engine which fails due to a missing dataSource.

Cheers
Sebastian

Outcomes