'ActivitiException: Unknown property' usinig Call Activity
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2015 06:11 AM
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.
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2015 04:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2015 06:13 AM
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?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2015 08:36 AM
Best regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2015 10:47 AM
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>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2015 09:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2015 10:08 AM
<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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2015 09:20 AM
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="jdbc

…
</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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2015 09:40 AM
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 …)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2015 04:08 AM
Running the application on WebLogic I have the problem using both the DBMS.
Could you please test it using an application server?
