cancel
Showing results for 
Search instead for 
Did you mean: 

Error: unknown property used in expression.

kairos
Champ in-the-making
Champ in-the-making
Hi,

I have my XXXX.bpmn20.xml file as shown below

<process id="SProcess">
<startEvent id="start"/>
<sequenceFlow id="flow1" sourceRef="start" targetRef="createApplication" />
<serviceTask id="createApplication" activiti:expression="#{printer.printMessage()}" />
<sequenceFlow id="flow2" sourceRef="createApplication" targetRef="end" />
<endEvent id="end" />
</process>

and I have a Class as shown below

public class Printer {
public void printMessage()
{ System.out.println("hello world………………");
}
}


and I have a bean as shown below

<bean id="printer" class="org.activiti.Printer" />



Error with Explorer:

unknown property used in expression.


Also i am unable to access the bean…..
Can anybody help why it is showing this error.
2 REPLIES 2

nils1
Champ in-the-making
Champ in-the-making
Hi,

here is a simple working example: https://svn.camunda.com/fox/deprecated/demo/activiti5-spring-example/

It is a bit outdated (using Activiti 5.6) but as far a s I know there were no major changes to the spring integration in Activiti since then.

To understand what exactly went wrong in your case, you would have to provide some more infos about how you deployed the process. However, I suppose you are trying to use Spring and tried to deploy your example to the Activiti Explorer, right? If so, the reason you got the exception is that the Activiti Explorer (and the activiti engine which runs inside the explorer) doesn't know your application context.

Cheers,
Nils

kairos
Champ in-the-making
Champ in-the-making
That's right Nils, i tried with using spreng to deploy the process to the activiti Explorer, buti don't know, what should i do to make Activiti Explorer or engine deploying my process, I always get this error in Explorer : unknown property used in expression.

I tried to deploy the process with deploymentResources property, thats the spring konfiguration file:


<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans   http://www.springframework.org/schema/beans/spring-beans.xsd
                           http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
                           http://www.springframework.org/schema/tx      http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">

  <bean id="dataSource" class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
    <property name="driverClass" value="org.h2.Driver" />
    <property name="url" value="jdbc:h2:mem:activiti;DB_CLOSE_DELAY=1000" />
    <property name="username" value="sa" />
    <property name="password" value="" />
  </bean>

  <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
    <property name="dataSource" ref="dataSource" />
  </bean>
 
  <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="jobExecutorActivate" value="false" />
    <property name="deploymentResources" value="classpath*:/diagrams/SProcess.bpmn20.xml" />
  </bean>
 
  <bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
    <property name="processEngineConfiguration" ref="processEngineConfiguration" />
  </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" />
 
  <bean id="printer" class="org.activiti.Printer" />
</beans>


I am looking for the error since two days, it's really important to me, to find this error.