form caching, modeler and process value problems

231 views
Skip to first unread message

lutz....@googlemail.com

unread,
Jul 18, 2013, 12:57:46 PM7/18/13
to camunda-...@googlegroups.com
Hi, I'm testing out camunda alpha 7 out for a few days now.

I got some issues, which makes working on progress hard.
I'm using the Tomcat "ready to use package" and configured it to use an oracle DB.
I'm using eclipse Indigo SR2 with Camunda Modeler 64-bit

First I have some deployment or caching problems.
When I change an embedded form like the forms from the "Getting Started Tutorial", I often get the old form on the task list from a previous application version.
I checked the webapps/myapp-0.0.1-SNAPSHOT/forms dir and the forms are correct.
Then I try different things like restarting the server, cleaning the database, clear the browser cache. Sometimes it helps and the new form is shown, sometimes not.

Next is a problem using variables. I applied the patches for CAM-973 and the values are shown correctly. But when I leave a value empty, I get a NullPointerException on the server, when I use the same Form on a user task to show the entered values (even if I do not use them on the form).

18.07.2013 18:56:00 org.camunda.bpm.engine.rest.exception.ExceptionHandler toResponse
WARNUNG: java.lang.NullPointerException
at org.camunda.bpm.engine.rest.sub.impl.AbstractVariablesResource.getVariables(AbstractVariablesResource.java:45)
at sun.reflect.GeneratedMethodAccessor259.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:167)
at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)
at org.jboss.resteasy.core.ResourceLocator.invokeOnTargetObject(ResourceLocator.java:159)
at org.jboss.resteasy.core.ResourceLocator.invoke(ResourceLocator.java:107)
at org.jboss.resteasy.core.ResourceLocator.invokeOnTargetObject(ResourceLocator.java:154)
at org.jboss.resteasy.core.ResourceLocator.invoke(ResourceLocator.java:92)
at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:542)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:524)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:126)
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.camunda.bpm.tasklist.AuthenticationFilter.doFilter(AuthenticationFilter.java:32)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:931)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)


For some reason there seems to be an issue with the modeler, too.
2 times, I had the problem that the process was shown correctly in the modeler, but the xml file was empty except of the first line.
Then I had to replace the actual file with a local hisotry to get my process back.

Daniel Meyer

unread,
Jul 19, 2013, 3:58:59 AM7/19/13
to lutz....@googlemail.com, camunda-...@googlegroups.com

Hi Lutz,

 

thank you for sharing your experiences!

 

Let me walk to your points one at a time:

 

> When I change an embedded form like the forms from the "Getting Started Tutorial", I often get the old form on the task list from a previous application version.

 

The forms are plain web resources that are served by the servlet container and retrieved by the tasklist using a HTTP GET request. In this respect, they suffer from the same “caching issues” as any other web resource.

In our web applications we have added a simple servlet filter setting "Cache-Control: no-cache" on all JSON/GET responses coming from the process engine REST API:

https://github.com/camunda/camunda-bpm-platform/commit/0a77a4cd16b39f71a5d3a47a342e6e2f861f76b4

This is a very simplistic solution, a good solution would perform cache control based on the actual content using mechanisms like ETAG.

You could install a similar filter in your process application setting the cache control on the form resources.

 

> 18.07.2013 18:56:00 org.camunda.bpm.engine.rest.exception.ExceptionHandler toResponse

> WARNUNG: java.lang.NullPointerException

 

We will try to reproduce this issue. Do you have any additional details on when it occurs?

 

> For some reason there seems to be an issue with the modeler, too.

> 2 times, I had the problem that the process was shown correctly in the modeler, but the xml file was empty except of the first line.

> Then I had to replace the actual file with a local hisotry to get my process back.

 

Do you remember which elements you were working on before the problem occurred?

 

Cheers,

Daniel

 

 

 

-----Ursprüngliche Nachricht-----
Von: camunda-bpm-u
se...@googlegroups.com [mailto:camunda-...@googlegroups.com] Im Auftrag von lutz....@googlemail.com
Gesendet: Donnerstag, 18. Juli 2013 18:58
An: camunda-...@googlegroups.com
Betreff: form caching, modeler and process value problems

--

You received this message because you are subscribed to the Google Groups "camunda BPM users & process application developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to camunda-bpm-us...@googlegroups.com.

To post to this group, send email to camunda-...@googlegroups.com.

 

 

lutz....@googlemail.com

unread,
Jul 19, 2013, 4:19:19 AM7/19/13
to camunda-...@googlegroups.com, lutz....@googlemail.com
Am Freitag, 19. Juli 2013 09:58:59 UTC+2 schrieb Daniel Meyer:
> Hi Lutz,

Hi, thank you for your quick response, and you can call me Volker ;)
 
> The forms are plain web resources that are served by the servlet container and retrieved by the tasklist using a HTTP GET request. In this respect, they suffer from the same “caching issues” as any other web resource.
> In our web applications we have added a simple servlet filter setting "Cache-Control: no-cache" on all JSON/GET responses coming from the process engine REST API:
> https://github.com/camunda/camunda-bpm-platform/commit/0a77a4cd16b39f71a5d3a47a342e6e2f861f76b4
> This is a very simplistic solution, a good solution would perform cache control based on the actual content using mechanisms like ETAG.
> You could install a similar filter in your process application setting the cache control on the form resources.

For my reasearch, this will be a good solution. For productive environments I would prefere "the good" one ;)
By the way, are your customers (references on the homepage) are using camunda alpha versions for productive environments?

> > 18.07.2013 18:56:00 org.camunda.bpm.engine.rest.exception.ExceptionHandler toResponse
> > WARNUNG: java.lang.NullPointerException
>  
> We will try to reproduce this issue. Do you have any additional details on when it occurs?

I adjusted the getting startet process a little, but basically it is the same process.
I have a start form with string and number fields (one string field is required). Then I have a service task, which is using those values (no error at this point). Last process Element is a User task, which is basically the same form with read only elements. When the user task is shown (klick on the "arrow" in the Tasklist), the NullPointerException is thrown, if one of the values is null (left empty on the start form)

> > For some reason there seems to be an issue with the modeler, too.
> > 2 times, I had the problem that the process was shown correctly in the modeler, but the xml file was empty except of the first line.
> > Then I had to replace the actual file with a local hisotry to get my process back.
>  
> Do you remember which elements you were working on before the problem occurred?

First time, I did not recognize what happened until I deployed the application and the server throwed some exception containing something about XMI:bla
Then I checked the process and the modeler showed the process correctly. Then I opened the plain xml and saw that it was empty.
Second time I played araound with catch event and error definition I think.
(which I could not get to work ;) But I did not read the documentation about error handling in detail yet)

What I do not understand right now, what is camunda fox related to camunda BPN?
The confluence documentation tells me to go to docs.camunda.org but not everything is documented there, right?
For example, the architecture of fox is different to camunda BPN, right?

Thanks in advance
Volker

> Cheers,
> Daniel

Roman Smirnov

unread,
Jul 19, 2013, 9:03:54 AM7/19/13
to camunda-...@googlegroups.com, lutz....@googlemail.com
Hi Volker,

I was able to reproduce the NullPointerException, I created a bug for it in Jira


and I also fixed it:


This fix will be available soon in alpha8!

Thanks for your advice!

Cheers,
Roman
Reply all
Reply to author
Forward
0 new messages