cancel
Showing results for 
Search instead for 
Did you mean: 

Deployment thro' API

rajendiran
Champ in-the-making
Champ in-the-making
Hi,

I tried to deploy and start a process instance thro' ProcessEngine and ProcessEngineConfiguration APIs. My java code doesn't throw any exception. But there is no deployment happening in the engine. I herewith attached my java code, bpmn file and activiti-cfg.file.

Can anyone please suggest to fix this issue?

Thanks and Regards,
Rajendiran R
13 REPLIES 13

rajendiran
Champ in-the-making
Champ in-the-making
Sorry. Missed to copy activiti-ui-context.xml.

<bean name="explorerApp" class="org.activiti.explorer.ExplorerApp" scope="session">
    <property name="environment" value="${activiti.ui.environment}" />
    <property name="useJavascriptDiagram" value="${activiti.ui.jsdiagram}" />
    <property name="i18nManager" ref="i18nManager" />
    <property name="viewManager" ref="viewManager" />
    <property name="notificationManager" ref="notificationManager" />
    <property name="attachmentRendererManager" ref="attachmentRendererManager" />
    <property name="formPropertyRendererManager" ref="formPropertyRendererManager" />
    <property name="variableRendererManager" ref="variableRendererManager" />
    <property name="applicationMainWindow" ref="mainWindow" />
    <property name="componentFactories" ref="componentFactories" />
    <property name="workflowDefinitionConversionFactory" ref="workflowDefinitionConversionFactory" />
    <property name="loginHandler" ref="activitiLoginHandler" />
    <property name="simpleWorkflowJsonConverter" ref="simpleWorkflowJsonConverter" />
  </bean>

rajendiran
Champ in-the-making
Champ in-the-making
Thanks Mr. Martin.

I did sync the h2 data base between my activiti API and the explorer one. I am able to deploy the process definition from Activiti API and aable to see the same in h2 database. I ran the h2 database server on server mode which solved my problem.

I am now facing another issue. Though I am able to see the deployed process definition in h2 database (thro' API), I tried to see the same in Activiti Explorer. I am not even getting the login page loaded. I got the below HTTP 505 exception.

Exception
==========

javax.servlet.ServletException: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.activiti.explorer.ExplorerApp] is defined
com.vaadin.terminal.gwt.server.AbstractApplicationServlet.handleServiceException(AbstractApplicationServlet.java:1010)
com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:548)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.activiti.explorer.filter.ExplorerFilter.doFilter(ExplorerFilter.java:44)



Root Cause
===========

org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.activiti.explorer.ExplorerApp] is defined
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:295)
org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1125)
org.activiti.explorer.servlet.ExplorerApplicationServlet.getNewApplication(ExplorerApplicationServlet.java:55)
com.vaadin.terminal.gwt.server.AbstractApplicationServlet.createApplication(AbstractApplicationServlet.java:984)
com.vaadin.terminal.gwt.server.AbstractApplicationServlet.findApplicationInstance(AbstractApplicationServlet.java:807)
com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:456)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.activiti.explorer.filter.ExplorerFilter.doFilter(ExplorerFilter.java:44)

My activiti-ui-context.xml has the bean declaration as follows.

<bean name="explorerApp" class="org.activiti.explorer.ExplorerApp" scope="session">
    <property name="environment" value="${activiti.ui.environment}" />
    <property name="useJavascriptDiagram" value="${activiti.ui.jsdiagram}" />
    <property name="i18nManager" ref="i18nManager" />
    <property name="viewManager" ref="viewManager" />
    <property name="notificationManager" ref="notificationManager" />
    <property name="attachmentRendererManager" ref="attachmentRendererManager" />
    <property name="formPropertyRendererManager" ref="formPropertyRendererManager" />
    <property name="variableRendererManager" ref="variableRendererManager" />
    <property name="applicationMainWindow" ref="mainWindow" />
    <property name="componentFactories" ref="componentFactories" />
    <property name="workflowDefinitionConversionFactory" ref="workflowDefinitionConversionFactory" />
    <property name="loginHandler" ref="activitiLoginHandler" />
    <property name="simpleWorkflowJsonConverter" ref="simpleWorkflowJsonConverter" />
  </bean>

rajendiran
Champ in-the-making
Champ in-the-making
Dear Mr. Martin,

I solved the above mentioned servlet error. I created ExplorerApp servlet and did onload startup at explorer's web.xml. Now I am able to see the deployed process definitions (thro' activiti api) at explorer along with the form data. Thanks a lot for your support.

Regards,
Rajendiran R