cancel
Showing results for 
Search instead for 
Did you mean: 

Can we use activiti-explorer over spring boot activiti engine?

sujeeshsvalath
Champ on-the-rise
Champ on-the-rise
I like the Spring boot version of Activiti since it is seems to be more developer friendly for me as a Spring application developer.
But when using activiti-rest what I really miss is the features of activiti-explorer. Now I have to make a choice between following two options for activiti- development:
1. Traditional activiti-rest.war and activit-explorer.war deployments under tomcat. Package bars and libs and deploy them under libs.
2. Spring boot- my favorite.

If I choose option1, I miss Spring support. For custom end points I have to deploy my war running over activiti-rest.war and activit-explorer.war deployments.Also I can make use of activiti-explorer.
But If I choose option2 (boot support), I have no choice for making use of activiti-explorer. But my boss is asking for interface like activiti-explorer where he can see the diagram of each instance and see where it is now diagrammatically.

My query is whether it is possible to run the activiti-exploreo over spring-boot-activiti-integrated environemnt. Is there any plugin available in Spring OR can we tweak configurations inside activit-explorer to read process instances from spring-boot-embedded activiti-engine? Please share some info.
14 REPLIES 14

warper
Star Contributor
Star Contributor
Hi!
It is possible. Activiti explorer is available in sources. Explode sources jar, make any configuration changes you want, tweak spring configuration, add support for your processes, make new GUI etc.

sujeeshsvalath
Champ on-the-rise
Champ on-the-rise
Hi Warper, thanks for the reply. I am wondering if I add the following maven plugin :
<code>  
<dependency>
    <groupId>org.activiti</groupId>
    <artifactId>activiti-explorer</artifactId>
    <version>5.21.0</version>
</dependency>
</code>
in Spring boot, will I be able to run explorer over my boot process engine?

warper
Star Contributor
Star Contributor
I don't think it's that simple, you have to have web servlet support ready in your spring boot application.

faizal-manan
Champ in-the-making
Champ in-the-making

sujeeshsvalath
Champ on-the-rise
Champ on-the-rise
Thanks Faizal,but the link is broken. I guess that would be the one am looking for. Can you please check..

faizal-manan
Champ in-the-making
Champ in-the-making
what kind of error do you get?
I had no problem with the link

sujeeshsvalath
Champ on-the-rise
Champ on-the-rise
Thanks Faizal, am able  to access it from another machine. Working on it now.

faizal-manan
Champ in-the-making
Champ in-the-making
hmm…
i do nothing

sujeeshsvalath
Champ on-the-rise
Champ on-the-rise
Hi all, I am trying to integrate rest and explorer modules. Following are the steps done:
1. Checked out the whole activiti source
2. Combined rest and explorer sources into a single project.Deleted duplicate files and updated listener in web.xml.
3.Updated pom dependencies, included dependencies from master and another project.

But When I deploy the new war I am getting the following exception:

<code>
Oct 01, 2016 9:39:44 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.activiti.explorer.servlet.WebConfigurer
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'navigatorManager' defined in class path resource [activiti-ui-context.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
at org.activiti.explorer.servlet.WebConfigurer.contextInitialized(WebConfigurer.java:84)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4994)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5492)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1081)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1877)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at org.activiti.explorer.navigation.TaskNavigator.<init>(TaskNavigator.java:51)
at org.activiti.explorer.navigation.NavigatorManager.afterPropertiesSet(NavigatorManager.java:61)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)
… 23 more

Oct 01, 2016 9:39:46 AM org.apache.catalina.core.StandardContext listenerStop
SEVERE: Exception sending context destroyed event to listener instance of class org.activiti.explorer.servlet.WebConfigurer
java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered?
at org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:83)
at org.activiti.explorer.servlet.WebConfigurer.contextDestroyed(WebConfigurer.java:68)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:5035)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5687)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1081)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1877)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Oct 01, 2016 9:39:58 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Oct 01, 2016 9:39:58 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Oct 01, 2016 9:39:58 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@8bc7ad')

</code>

When I checked the source, it seems that exception is because process engine is not initialized.
But I have even uncommneted activiti-custom-context.xml, but it is not working.
Somebody please help in this integration to achieve a single war with full rest and explorer support.