Problems when converting the multi-instance example (chapter 10 ) from activiti in action to camunda bpm

269 views
Skip to first unread message

Stefan Riess

unread,
Oct 2, 2014, 5:16:06 AM10/2/14
to camunda-...@googlegroups.com
Hello everybody!

What I wanted to do is convert the example on the use of multi-instance subtasks from chapter 10 Activiti in Action as a show case to camunda.bpm.
Now I am facing two major problems that I been reorted earlier by others: First is a persistance error for ArrayLists and the second one deals with complex data-types (serializable problem).
I used the Code from activiti in action and exchanges the imports and build the bpmn - diagram newly. I use camunda bpm in Version 7.1.0.Final on 32 bit Windows 7.


Of course am I looking for a solution to get the show-Case running. I thought it would be fairly easy, as in other cases with examples from activiti in action book, that I transformed to Camunda. Strange enough that both problems ere reported earlier and the solutions did not work out for me.

Alternativly is there any workiung excample for a multi-instance subprocess with variale number of assignnes at camundas Github repositories. So far I couldn't find one.

First Problem
============
reported earlier at:
https://groups.google.com/forum/#!topic/camunda-bpm-users/NgWs3vcLMVg

Caused by: org.apache.ibatis.exceptions.PersistenceException:
### Error updating database.  Cause: org.postgresql.util.PSQLException: Can't infer the SQL type to use for an instance of java.util.ArrayList. Use setObject() with an explicit Types value to specify the type to use.

In the reference mentioned above is the following solution mentioned:
use execution.setVariableLocal("assigneeList",...
instead of setVariable(....)    did not work in my case.



extract  from stacktrace:

18:00:39,692 SEVERE [org.camunda.bpm.engine.impl.interceptor.CommandContext] (http-/127.0.0.1:8080-5) Error while closing command context: org.apache.ibatis.exceptions.PersistenceException:
### Error updating database.  Cause: org.postgresql.util.PSQLException: Der in SQL für eine Instanz von java.util.ArrayList zu verwendende Datentyp kann nicht abgeleitet werden. Benutzen Sie 'setObject()' mit einem expliziten Typ, um ihn festzulegen.
### The error may involve org.camunda.bpm.engine.impl.persistence.entity.HistoricDetailEntity.insertHistoricFormPropertyEvent-Inline
### The error occurred while setting parameters

....

18:00:40,102 WARNING [ExceptionHandler] (http-/127.0.0.1:8080-5) org.camunda.bpm.engine.rest.exception.RestException: Cannot submit task form 12022b10-4984-11e4-af42-6e2620524153: Process engine persistence exception
    at org.camunda.bpm.engine.rest.sub.task.impl.TaskResourceImpl.submit(TaskResourceImpl.java:109)

.....

Caused by: org.postgresql.util.PSQLException: Der in SQL für eine Instanz von java.util.ArrayList zu verwendende Datentyp kann nicht abgeleitet werden. Benutzen Sie 'setObject()' mit einem expliziten Typ, um ihn festzulegen.
    at org.postgresql.jdbc2.AbstractJdbc2Statement.setObject(AbstractJdbc2Statement.java:1914)
 
Remark I did not use a complex typ as process variable just a string in order to get the whole thing at least going.

Second Problem:
===============
same as reported in
https://groups.google.com/forum/?fromgroups=#!topic/camunda-bpm-users/5L_PtEI0ej0 and https://app.camunda.com/jira/browse/CAM-907


09:36:08,893 SEVERE [org.camunda.bpm.engine.impl.interceptor.CommandContext] (http-/127.0.0.1:8080-3) Error while closing command context: org.camunda.bpm.engine.ProcessEngineException: Couldn't deserialize object in variable 'voteOutcome'
    at org.camunda.bpm.engine.impl.variable.SerializableType.getValue(SerializableType.java:63) [camunda-engine-7.1.0-Final.jar:7.1.0-Final]

this problem remains when I use the subprocess as modelled in Chapter 10 of activiti in action. Although that should already be solved since I use 7.1.0-Final

Any ideas or suggestions are welcome. I left out the source-code since I thought those are basic probblems that are somehow already known and I just missed the right ansers in my web searches.

Thanks in advance
Stefan

Daniel Meyer

unread,
Oct 2, 2014, 5:34:32 AM10/2/14
to camunda-...@googlegroups.com
Hi Stefan,

thanks for taking the time to report this.

Do you think you could provide us with the sources of your application?
That would make it easier for us to have a look at them and help you out.

Regards,
Daniel

Stefan Riess

unread,
Oct 2, 2014, 8:23:06 AM10/2/14
to camunda-...@googlegroups.com

Hi Daniel,

thanks for the quick response. I have put the exapme (maven based camunda-eclipse SEU) in mi.zip (multiinstance). voteOutcome is the problem for serialisation.
Problem 2 can be triggered when you use content of <class>_p2.java and replace content of corresponding <class>.java

I run the Workflow with the Camunda-provided joboss for 7.1.0-Final and a Postgres database.

cheerio
Stefan
mi.zip

Stefan Riess

unread,
Oct 7, 2014, 8:13:00 AM10/7/14
to camunda-...@googlegroups.com

Hi Daniel,

when reading through the forum over again, I got the idea to switch from embedded (generated) forms to JSF. Interestingly that cured both problems that I described above. I do not know about the maschinery inside the process engine - the crashes accured when accessing the database. Using the JSF-forms is the right way in my case. The problem is solved for me.

cheerio
Stefan
 
 

Daniel Meyer

unread,
Oct 9, 2014, 3:59:20 AM10/9/14
to camunda-...@googlegroups.com
Hi Stefan,

this is a "pure" Tasklist problem. In camunda Tasklist 7.1 it was not yet possible to work with processes which use complex serialized Java Objects. This works if you use JSF.

It will be possible with the upcoming camunda 7.2

Daniel
Reply all
Reply to author
Forward
0 new messages