cancel
Showing results for 
Search instead for 
Did you mean: 

Null pointer exception exporting from Explorer

neillamka
Champ in-the-making
Champ in-the-making
I'm new to Activiti so if I'm posting this question in the wrong place, please let me know.

I am trying to create a flow using the Modeler on a Windows 7 X64 system using Activiti 5.14.

The flow is a simple test one with a couple of steps and a boundary timer event trying to model a simple escalation flow.

What I found is that if I create the flow with a boundary timer event but don't have that event connected to anything I can save and then export the flow without error.  If, however, I connect the timer event to a user task, save the flow and then try to export the flow in Explorer I get the following Null Pointer exception.

I'm not sure what I'm doing wrong here or what I'm not understanding but was hoping to get some guidance.

<blockcode>
INFO: 2013-11-17        09:57:07        0:0:0:0:0:0:0:1 -       0:0:0:0:0:0:0:1 8080    PUT     /activiti-explorer/service/model/10973/save
_dc=1384711024305       200     0       93741   3030    http://localhost:8080   Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTM
L, like Gecko) Chrome/31.0.1650.57 Safari/537.36        http://localhost:8080/activiti-explorer/service/editor?id=10973
09:57:14,685 [http-bio-8080-exec-6] ERROR org.activiti.editor.ui.EditorProcessDefinitionDetailPanel  - failed to export model to BPMN XML
java.lang.NullPointerException
        at org.activiti.editor.language.json.converter.BpmnJsonConverter.retrieveAttachedRefObject(BpmnJsonConverter.java:487)
        at org.activiti.editor.language.json.converter.BpmnJsonConverter.postProcessElements(BpmnJsonConverter.java:470)
        at org.activiti.editor.language.json.converter.BpmnJsonConverter.convertToBpmnModel(BpmnJsonConverter.java:373)
        at org.activiti.editor.ui.EditorProcessDefinitionDetailPanel$2.getStream(EditorProcessDefinitionDetailPanel.java:250)
        at com.vaadin.Application.handleURI(Application.java:798)
        at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleURI(AbstractCommunicationManager.java:2289)
        at com.vaadin.terminal.gwt.server.CommunicationManager.handleURI(CommunicationManager.java:377)
        at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.handleURI(AbstractApplicationServlet.java:1099)
        at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:535)
        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.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.activiti.explorer.filter.ExplorerFilter.doFilter(ExplorerFilter.java:44)
        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:502)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:744)
</blockcode>

Thanks
Neil
13 REPLIES 13

tullo1
Champ in-the-making
Champ in-the-making
Have you set the timer duration?
Something in the line of: <code>
<boundaryEvent id="boundryTimerExpiresAfter14Days" attachedToRef="forApprovalTask" cancelActivity="true">
  <timerEventDefinition>
    <timeDuration>P14D</timeDuration>
  </timerEventDefinition>
</boundaryEvent>
</code>

neillamka
Champ in-the-making
Champ in-the-making
Yes, I set the timer duration to PT8H.

I'm only using the KIS BPM modeler but if I setup just the boundary timer and export I get the following.

<blockcode>
<boundaryEvent id="quoteEscalationTimer" attachedToRef="sid-211CCA37-0712-434A-9A94-4E698A486D7A" cancelActivity="true">
      <timerEventDefinition>
        <timeDuration>PT8H</timeDuration>
      </timerEventDefinition>
    </boundaryEvent>
</blockcode>

Adding the user task attached to that timer event then fails to export with the exception. I don't know if there is a way to look at something lower level since I can't export the XML.

In the designer, I captured what I added that causes the failure in case that helps. The image is here http://www.tastingmaster.com/downloads/Activiti_escalation_flow.png

leggebroten
Champ in-the-making
Champ in-the-making
Any news on this?  I am seeing the same problem.
I cannot deploy or export any model with a timerBoundaryEvent

jbarrez
Star Contributor
Star Contributor
No, that is still a bug currently. I believe there is already a jira issue for this.

neillamka
Champ in-the-making
Champ in-the-making
I took a look in Jira but did not see anything that looked like this issue.  Do you happen to have the issue Id for the item you are referencing?

Thanks

leggebroten
Champ in-the-making
Champ in-the-making
Hmmm.  K.

I'm trying to create a reminder e-mail if the user doesn't complete their task in a timely manner.

Is there another BPMN pattern or workaround for this?
Any idea on fix date?

jbarrez
Star Contributor
Star Contributor
Im afraid you'll have to use the Designer or manually write the XML.
Reminder email is basically a timer boundary event on the user task (non-interrupting).

leggebroten
Champ in-the-making
Champ in-the-making
Thanks for the response.  But I must be misunderstanding your reply. 

I cannot deploy any model with a timer BoundaryEvent no matter how I've created it (designer or hand XML) and if I understand your earlier reply from 12/19, this is a known bug.

Therefore, I was looking for a modeling work-around to do something (such as sending a reminder e-mail) if task not done in time.

Thanks,

-Lee

jbarrez
Star Contributor
Star Contributor
The bug I mentioned was Activiti Modeler only.
You do can deploy models to the engine with a timer event (eg create with the Designer).

If I understand you correctly, you are not able to do that. Could you upload your process xml so we can try it ourself?