cancel
Showing results for 
Search instead for 
Did you mean: 

'ActivitiException: Unknown property' usinig Call Activity

alef
Champ in-the-making
Champ in-the-making
Hi all,
I'm using a Call Activity element in order define a reusable process definition which is common to several process.
This subprocess try to execute an operation, an in case of failure it retries the action until success.
The problem is that after some retries the following exception is thrown:
org.activiti.engine.ActivitiException: Unknown property used in expression: #{msisdnLockManager.lockMSISDN(action)} 


Invocation of msisdnLockManager.lockMSISDN(action) method works for some times before have the exception.
As you can see below
msisdnLockManager
bean  is correctly declared and passed to
ProcessEngineConfiguration
.

<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
      <property name="dataSource" ref="dataSource" />
      <property name="transactionManager" ref="dbTransactionManager" />
      <property name="databaseSchemaUpdate" value="true" />
      <property name="asyncExecutorEnabled" value="false" />
      <property name="asyncExecutorActivate" value="false" />   
      <property name="jobExecutorActivate" value="true" />      
      <property name="beans">
         <map>
            <entry key="msisdnLockManager" value-ref="msisdnLockManager" />
            <entry key="wfCreateOrder" value-ref="wfCreateOrder" />
         </map>
      </property>
   </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" />

   <!– BEGIN:Workflow components –>
   <bean id="msisdnLockManager" class="my.package.workflow.MSISDNLockManager" />
   <bean id="wfCreateOrder" class="my.package.workflow.processor.WFCreateOrder" />
   <!– END:Workflow components –>

</beans>


Both the diagram are uploaded below. Subprocess is LockMSISDNProcess.bpmn file.

Could anyone help me to understand where is the problem?
Thanks in advance.


13 REPLIES 13

jbarrez
Star Contributor
Star Contributor
That looks allright. Are you sure the 'action' variable is present?

alef
Champ in-the-making
Champ in-the-making
Thanks for the answer.
Yes, I'm sure. I start the workflow in this way:
<java>Map<String, Object> variableMap = new HashMap<String, Object>();
variableMap.put("action", action);
runtimeService.startProcessInstanceByKey("WFCreateWWSIOrder", variableMap);</java>

I've also set source and target for callActivity like this:
<code><activiti:in source="action" target="action"></activiti:in></code>

Lastly, the Call Activity is successfully retried two/three times before the exception is thrown.

I don't know if this can help you. The subprocess performs actions on DB within a transaction.
Could this be the cause of the problem?

trademak
Star Contributor
Star Contributor
If you have any way to reproduce this please let us know. We haven't experienced this behaviour yet.

Best regards,

alef
Champ in-the-making
Champ in-the-making
Hi, I've created a simple project with the configuration used above. See the attachement.
You can build it with Maven. Before run it you have to configure the datasource in "resources/datasource.xml" file.
To test it you can invoke a servlet like this:
<code>[ip]:[port]/test/WorkflowServlet</code>

You can see the output in you app server log.
As you'll can see the subtask retries some times and then you'll get the following exception:
<code>org.activiti.engine.impl.javax.el.PropertyNotFoundException: Cannot resolve identifier 'subProcess'</code>

alef
Champ in-the-making
Champ in-the-making
Any news about this issue?

jbarrez
Star Contributor
Star Contributor
I've tried it here. Changed the jndi datasource to a local one and used a main:

<code>
public static void main(String[] args) {
     ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");

     RepositoryService repositoryService = applicationContext.getBean(RepositoryService.class);
     repositoryService.createDeployment().addClasspathResource("Mainprocess.bpmn").addClasspathResource("SubProcess.bpmn").deploy();
    
     applicationContext.getBean(ProcessActivator.class);
     ProcessActivator processActivator = applicationContext.getBean(ProcessActivator.class); 
  processActivator.startProcess();
    }
</code>

I am not seeing your error. I'm seeing

<code>
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Starting activiti process…
SubProcess: Action: someValue
Activiti process started with id 8
SubProcess: Action: someValue
SubProcess: Action: someValue
SubProcess: Action: someValue
SubProcess: Action: someValue
SubProcess: Action: someValue
SubProcess: Action: someValue
SubProcess: Action: someValue
SubProcess: Action: someValue
SubProcess: Action: someValue
SubProcess: Action: someValue
</code>

So … anything that would be different for my setup and why it could be failing for you?

alef
Champ in-the-making
Champ in-the-making
Which DBMS did you use?
I did the same test of you and it seems that with Oracle the process remains blocked on the first execution of SubProcess.
Instead with MySQL it retries forever, as expected!

In both cases I used a direct connection toward the DB like this:

<code>
       <!– ORACLE –>
        <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
     <property name="driverClassName" value="oracle.jdbc.OracleDriver" />
     <property name="url" value="jdbcSmiley Surprisedracle:thin:@//localhost:1521/ORCL" />
     …
</bean>
      
        <!– MySQL –>
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
     <property name="driverClassName" value="com.mysql.jdbc.Driver" />
     <property name="url" value="jdbc:mysql://localhost:3306/test" />
     …
</bean></code>

From your point of view, can be this the problem?
Thanks again for your support!

jbarrez
Star Contributor
Star Contributor
I did use MySQL indeed.

Theoretically, there should not be a difference between oracle and mysql, from the Activiti point of view. Is the Oracle configured with the same isolation level? (really guessing here …)

alef
Champ in-the-making
Champ in-the-making
Same code. I changed just the datasource configuration.
Running the application on WebLogic I have the problem using both the DBMS.

Could you please test it using an application server?