04-19-2014 09:04 AM
org.activiti.engine.ActivitiObjectNotFoundException: no processes deployed with key 'BusinessApproval'
I am using SpringMVC+Activiti....
Web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="voiceBank" version="3.0">
<session-config>
<session-timeout>60</session-timeout>
</session-config>
<servlet>
<servlet-name>Spring_Activiti</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Spring_Activiti</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<context-param>
<!-- Specifies the list of Spring Configuration files in comma separated format.-->
<param-name>contextConfigLocation</param-name>
<param-value> /WEB-INF/Spring_Activiti-servlet.xml</param-value>
</context-param>
<listener>
<!-- Loads your Configuration Files-->
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
</web-app>
Spring_Activiti-servlet.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"xmlns:security="http://www.springframework.org/schema/security"
xmlns:tx="http://www.springframework.org/schema/tx"xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/mvchttp://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/securityhttp://www.springframework.org/schema/security/spring-security-3.1.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/contexthttp://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="org.gambia" />
<context:annotation-config />
<mvc:annotation-driven />
<!-- Handles GET requests for /resources/** by efficiently serving static
content in the ${webappRoot}/resources dir -->
<mvc:resources mapping="/resources/**" location="/resources/" />
<!-- Forwards requests to the "/" resource to the "welcome" view -->
<mvc:view-controller path="/" view-name="enter" />
<!-- TILES Configuration -->
<bean id="viewResolver"
class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass">
<value>
org.springframework.web.servlet.view.tiles2.TilesView
</value>
</property>
</bean>
<bean id="tilesConfigurer"
class="org.springframework.web.servlet.view.tiles2.TilesConfigurer">
<property name="definitions">
<list>
<value>/WEB-INF/tiles/main-tiles.xml</value>
</list>
</property>
</bean>
<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="classpath:Approval.bpmn" />
<property name="valueSeparator" value="?" />
</bean>
<bean id="internalViewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/views/" />
<property name="suffix" value=".jsp" />
<property name="order" value="1" />
</bean>
<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
<property name="dataSource" ref="dataSource" />
<property name="databaseSchemaUpdate" value="true" />
<property name="jobExecutorActivate" value="false" />
<property name="transactionManager" ref="transactionManager"></property>
<!-- <propety name="beans"> <map> <entry key="printer" value-ref="printer"/>
</map> </property> -->
<property name="deploymentResources" value="classpath*:/diagrams.*.bpmn20.xml" />
</bean>
<bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
<property name="processEngineConfiguration" ref="processEngineConfiguration" />
</bean>
<bean id="dataSource"
class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
<property name="driverClass" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost:3333/activiti" />
<property name="username" value="root" />
<property name="password" value="" />
</bean>
<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
<bean id="repositoryService" factory-bean="processEngine"
factory-method="getRepositoryService" />
<bean id="runtimeService" factory-bean="processEngine"
factory-method="getRuntimeService" />
<bean id="taskService" factory-bean="processEngine"
factory-method="getTaskService" />
<bean id="historyService" factory-bean="processEngine"
factory-method="getHistoryService" />
<bean id="managementService" factory-bean="processEngine"
factory-method="getManagementService" />
</beans>
Here My Controller's Method
@RequestMapping("/SaveUserInfo")
public String Registration(@ModelAttribute(value="reg") Registration reg,HttpServletRequest request) {
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("nameOfBusiness", reg.getNameOfBusiness());
variables.put("address",reg.getAddress());
variables.put("mangingDirector", reg.getMangingDirector());
variables.put("telephone",reg.getTelephone());
variables.put("fax", reg.getFax());
variables.put("email",reg.getEmail());
variables.put("wwwAddress", reg.getWwwAddress());
variables.put("parentCompanyOrOtherBusinessNames", reg.getParentCompanyOrOtherBusinessNames());
variables.put("subsidiaries",reg.getSubsidiaries());
variables.put("mangingDirector", reg.getMangingDirector());
variables.put("typeOfBusiness",reg.getTypeOfBusiness());
variables.put("natureOfBusiness", reg.getNatureOfBusiness());
variables.put("email",reg.getEmail());
variables.put("nameOfCustomer1", reg.getNameOfCustomer1());
variables.put("address1",reg.getAddress1());
variables.put("nameOfCustomer2", reg.getNameOfCustomer2());
variables.put("address2",reg.getAddress2());
variables.put("yearBusinessEstablished", reg.getYearBusinessEstablished());
variables.put("numberOfFullTimeEmployees",reg.getNumberOfFullTimeEmployees());
variables.put("businessRegistrationNumber", reg.getBusinessRegistrationNumber());
ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
RuntimeService runtimeService = processEngine.getRuntimeService();
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("BusinessApproval", variables);
return "";
}
Here Am getting this error....... org.activiti.engine.ActivitiObjectNotFoundException: no processes deployed with key 'BusinessApproval' After by using this above method
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("BusinessApproval", variables);
Even am configured the *.bpmn.xml in Spring_Activiti-servlet.xml as follows
<property name="deploymentResources" value="classpath*:/diagrams.*.bpmn20.xml" />
Even though am getting the exception, Then where i require configure or access the *.bpmn.xml ???????
Pls Reply Fast
04-21-2014 04:20 AM
04-21-2014 06:12 AM
04-22-2014 04:33 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.