AnsweredAssumed Answered

Deploying a 5.9 activiti-spring app with Eclipse Designer

Question asked by dilipl1 on May 1, 2012
Latest reply on May 2, 2012 by trademak
Hey guys,

I am a java guy and trying to get activiti running and deployed. I downloaded 5.9 and did run ant demo.start and that stuff worked. Now I was trying to develop my own app using Eclipse Indigo, with the help of user-guide and things got a little murky. Here's what I did.

1) Created an Activiti project and "Activiti Diagram" called FinancialProcess. Added various service tasks to this process.
2) Now modified this process to have expressions to call a spring POJO. Created a simple bean StepDetails with printStepDetails method. Also created a activiti-context.xml in src/main/resources (same folder that has the diagrams folder, where the bpm process is stored)
3) After this did a "Create Deployment Artifacts". This generated (with only the bpm process in it) and FinancialProcess.jar (with only the java class StepDetails in it. So far so good, the deployment (using tomcat) is where it gets murky
4) Using activiti-explorer, deployed the first. Next, copied the FinancialProcess.jar file to webapps\activiti-rest\WEB-INF\lib.
**5) According to the user guide, the activiti.cfg.xml should be replaced by my activiti-context.xml in webapps/activiti-rest/lib/activiti-cfg.jar. However there is no activiti-cfg.jar at that location!
6) So I modified the activiti-context.xml under webapps\activiti-rest\WEB-INF\classes by adding my spring beans (pasted in this mail).  I then started tomcat.
7) When I goto activiti explorer and start my process, I get an error.
Caused by: org.activiti.engine.impl.javax.el.PropertyNotFoundException: Cannot r
esolve identifier 'stepDetails'

What am I doing wrong?? I suspect something with step 5 above. My context is not being recognized?? Can someone help?

<beans xmlns=""

   <bean id="stepDetails" class="com.activityone.StepDetails"/>
  <bean id="dbProperties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <property name="location" value="" />
    <!– Allow other PropertyPlaceholderConfigurer to run as well –>
    <property name="ignoreUnresolvablePlaceholders" value="true"/>

  <bean id="dataSource" class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
    <property name="driverClass" value="${jdbc.driver}" />
    <property name="url" value="${jdbc.url}" />
    <property name="username" value="${jdbc.username}" />
    <property name="password" value="${jdbc.password}" />

  <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
    <property name="dataSource" ref="dataSource" />

<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
    <property name="dataSource" ref="dataSource" />
    <property name="transactionManager" ref="transactionManager" />
    <property name="databaseSchemaUpdate" value="true" />
    <property name="mailServerHost" value="localhost" />
    <property name="mailServerPort" value="5025" />
    <property name="jobExecutorActivate" value="true" />
    <property name="deploymentResources" value="classpath*:/org/activiti/spring/test/autodeployment/autodeploy.FinancialProcess.bpmn20.xml" />
     <property name="beans">
         <entry key="stepDetails" value-ref="stepDetails" />

  <bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
    <property name="processEngineConfiguration" ref="processEngineConfiguration" />
  <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" />