cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with 5.12 demo

groopk
Champ in-the-making
Champ in-the-making
The Simple Approval Demo example is new in the 5.12 distro, and includes a form type of "user".  When we run a fresh download & install of activiti, we get a console full of errors related to this. Are we missing something or is something missing from the distro?

It also prevents us from accessing the tasklist from the Rest API (i.e http://localhost:8080/activiti-rest/service/tasks?assignee=kermit) - We simply get a 500 error. Apparently an error in one of the deployment forms causes other tasks not to be available:

02:26:26,119 [http-apr-8080-exec-6] ERROR org.activiti.engine.impl.interceptor.CommandContext - Error while closing command context
org.activiti.engine.ActivitiIllegalArgumentException: unknown type 'user' approver
at org.activiti.engine.impl.form.FormTypes.parseFormPropertyType(FormTypes.java:55)
at org.activiti.engine.impl.form.DefaultFormHandler.parseConfiguration(DefaultFormHandler.java:61)
17 REPLIES 17

jbarrez
Star Contributor
Star Contributor
The custom form types are plugged into the engine in the spring config of the Explorer app:

<bean id="formPropertyRendererManager" class="org.activiti.explorer.ui.form.FormPropertyRendererManager" lazy-init="true">
       …
    <property name="propertyRenderers">
      <list>
        …
        <bean class="org.activiti.explorer.ui.form.UserFormPropertyRenderer" />
        ….
      </list>
    </property>
  </bean>

And that bean is plugged into the process engine configuration.

Are you using Explorer with a custom configuration? Because out of the box it should work as far as I can see.

groopk
Champ in-the-making
Champ in-the-making
We have both the activiti-explorer and activiti-rest deployed, pointing at the same database.  Perhaps this is not how they were intended to be used? 

We ended up just turning off the demoProcessDefinition/Model/Report Data generation inside activti-explorer and redeployed everything on a fresh database and now it seems to be fine.

jbarrez
Star Contributor
Star Contributor
Ah yes, I discovered that problem too recently. If you want to point them to the same db, then indeed the rest config must be adapted to also know these form types. Which is not a good thing.

I've got it on my list to fix very soon, as it struck me too.

Indeed disabling the demo data would also do the truck, as it only would be used when you actually have a process with a user form property type (which the demo data has)

rookies
Champ in-the-making
Champ in-the-making
I met this problem today.
error message :
"
2013-05-23 15:37:19 [org.activiti.engine.impl.interceptor.CommandContext]-[ERROR] Error while closing command context
org.activiti.engine.ActivitiIllegalArgumentException: unknown type 'user' approver
"

I fixed the problem by deleting all demo data on activiti-explorer…deploy a process without any form…

suggestion:
1.mention that "activiti-explorer and activiti-rest use different h2 db even though deploy on same webserver(eg.tomcat)" in user guide
2.mention that"activiti-rest rest api just a demo for show, you should modify db.properties to the same db both on activiti-explorer and activiti-rest if you want to get the "correct" result"

ps.
1.when this problem will be fixed?
2.do you fill a little strange when you should delpoy  jar both on activiti-rest and activiti-explorer web app lib?
3.is there a combined version for activiti-rest and activiti-explorer?

non
Champ in-the-making
Champ in-the-making
Any ideas for an absolute beginner to get explorer+rest+demos run?

Got activiti-explorer and activiti-rest up and running sharing a postgresql database, but can't play with REST.

(After a longer reading trip around the camunda fork story, I arrived back at activiti and plan to stay Smiley Wink)

frederikherema1
Star Contributor
Star Contributor
What do you mean by "can't play with rest"?

non
Champ in-the-making
Champ in-the-making
Please see initial question. I'm faced with the same problems:
> unknown type 'user' approver

I think the problem is the missing component from activiti-explorer. But:
* Howto add the missing component to activiti-rest?
* How much sense does it make to add an ui component to the REST API?

At the end I want to have 1 database and 1 process-engine accessed by explorer and rest-api.

jbarrez
Star Contributor
Star Contributor
Are you using 5.12.1? The rest service there contains a DemoDataGenerator bean which installs some demo users.

To work on the same database, simply adapt db.properties on both rest and explorer wars and point them to the same db (eg local mysql)

non
Champ in-the-making
Champ in-the-making
Yes. I'm using the current version.

Let me repeat myself, more verbose this time: I followed the documentation and got activiti-explorer up in a few minutes; with demo data. Everything works as expected.
Then I wanted to test the REST API: I deployed activiti-rest to tomcat and intuitively expected to get access to the same process instances, status, etc.. What I got was a second independent in-memory database. Next step: Set up a postgres user and database and configured those into both: activiti-rest and activiti-explorer. Now I can authenticate as "kermit" and access SOME data from the activiti-explorer, because of the problem from the beginning of this threat:

org.activiti.engine.ActivitiIllegalArgumentException: unknown type 'user' approver

As I understood from above, this is because demo data from activiti-explorer is somehow bound to components that only exist in activiti-explorer and not in activiti-rest:

org.activiti.explorer.ui.form.UserFormPropertyRenderer

Now I could delete demo data and start with a clean database (as suggested). But I got another problem: I'm not feeling comfortable with the idea of running two process engines on the same database (and same data). What I could find in the forums is, that it should be fairly easy to pick the components of both (explorer and rest) and put them in one webapp with only one process engine running. The only thing missing is a description of these easy steps.
And maybe even demo data don't crashes the REST API anymore in this combined webapp.