Petals SE Activiti

NPE on event listener about service task started event

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 0.5.0
  • Fix Version/s: 0.9.0
  • Component/s: Process service
  • Security Level: Public
  • Description:
    Hide

    The following NPE occurs in the processing of the Activiti event listener associated to the service task started event:

    2015/05/26 14:36:24,555 GMT+0200 WARNING [org.activiti.engine.delegate.event.impl.ActivitiEventSupport] : Exception while executing event-listener, which was ignored
    java.lang.NullPointerException
    	at org.ow2.petals.activitibpmn.event.ProcessInstanceCompletedEventListener.createLogData(ProcessInstanceCompletedEventListener.java:55)
    	at org.ow2.petals.activitibpmn.event.AbstractMonitLoggerEventListener.processEvent(AbstractMonitLoggerEventListener.java:47)
    	at org.ow2.petals.activitibpmn.event.AbstractEventListener.onEvent(AbstractEventListener.java:56)
    	at org.activiti.engine.delegate.event.impl.ActivitiEventSupport.dispatchEvent(ActivitiEventSupport.java:105)
    	at org.activiti.engine.delegate.event.impl.ActivitiEventSupport.dispatchEvent(ActivitiEventSupport.java:98)
    	at org.activiti.engine.delegate.event.impl.ActivitiEventDispatcherImpl.dispatchEvent(ActivitiEventDispatcherImpl.java:65)
    	at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityEnd.eventNotificationsCompleted(AtomicOperationActivityEnd.java:74)
            ...
    Show
    The following NPE occurs in the processing of the Activiti event listener associated to the service task started event:
    2015/05/26 14:36:24,555 GMT+0200 WARNING [org.activiti.engine.delegate.event.impl.ActivitiEventSupport] : Exception while executing event-listener, which was ignored
    java.lang.NullPointerException
    	at org.ow2.petals.activitibpmn.event.ProcessInstanceCompletedEventListener.createLogData(ProcessInstanceCompletedEventListener.java:55)
    	at org.ow2.petals.activitibpmn.event.AbstractMonitLoggerEventListener.processEvent(AbstractMonitLoggerEventListener.java:47)
    	at org.ow2.petals.activitibpmn.event.AbstractEventListener.onEvent(AbstractEventListener.java:56)
    	at org.activiti.engine.delegate.event.impl.ActivitiEventSupport.dispatchEvent(ActivitiEventSupport.java:105)
    	at org.activiti.engine.delegate.event.impl.ActivitiEventSupport.dispatchEvent(ActivitiEventSupport.java:98)
    	at org.activiti.engine.delegate.event.impl.ActivitiEventDispatcherImpl.dispatchEvent(ActivitiEventDispatcherImpl.java:65)
    	at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityEnd.eventNotificationsCompleted(AtomicOperationActivityEnd.java:74)
            ...
  • Environment:
    -

Activity

Hide
Christophe DENEUX added a comment - Tue, 26 May 2015 - 14:35:00 +0200 - edited

This problem occurs when a service task just follows the start event of the process definition.

See the Activiti thread to get more information: http://forums.activiti.org/comment/29475.

So, a workaround to this problem is to force the use of activiti:async="true" of the service task. We are thinking that is not the right way to solve the problem because the process definition has not to be fixed for a technical problem. We are thinking that the variables should be added to the fired event on the Activiti engine side.

Show
Christophe DENEUX added a comment - Tue, 26 May 2015 - 14:35:00 +0200 - edited This problem occurs when a service task just follows the start event of the process definition. See the Activiti thread to get more information: http://forums.activiti.org/comment/29475. So, a workaround to this problem is to force the use of activiti:async="true" of the service task. We are thinking that is not the right way to solve the problem because the process definition has not to be fixed for a technical problem. We are thinking that the variables should be added to the fired event on the Activiti engine side.
Christophe DENEUX made changes - Tue, 26 May 2015 - 14:35:00 +0200
Field Original Value New Value
Status New [ 10000 ] Open [ 10002 ]
Priority Major [ 3 ]
Assignee Christophe DENEUX [ cdeneux ]
Christophe DENEUX made changes - Tue, 26 May 2015 - 15:53:10 +0200
Status Open [ 10002 ] In Progress [ 10003 ]
Hide
Christophe DENEUX added a comment - Mon, 8 Jun 2015 - 11:13:32 +0200

Another solution was proposed by Activiti team: The attribute 'activiti:async="true"' can be force programmatically using a post BpmnParseHandler.
This proposition works fine. The user documentation should be updated to tell that at least one async job executor is required to process these asynchronous service tasks.

Show
Christophe DENEUX added a comment - Mon, 8 Jun 2015 - 11:13:32 +0200 Another solution was proposed by Activiti team: The attribute 'activiti:async="true"' can be force programmatically using a post BpmnParseHandler. This proposition works fine. The user documentation should be updated to tell that at least one async job executor is required to process these asynchronous service tasks.
Hide
Christophe DENEUX added a comment - Mon, 8 Jun 2015 - 11:15:26 +0200 - edited

Fixed in branch PETALSSEACTIVITI-4. To merge in branch petals-4.3.x and master.

Show
Christophe DENEUX added a comment - Mon, 8 Jun 2015 - 11:15:26 +0200 - edited Fixed in branch PETALSSEACTIVITI-4. To merge in branch petals-4.3.x and master.
Hide
Christophe DENEUX added a comment - Mon, 8 Jun 2015 - 11:57:38 +0200

Merged in petals-4.3.x

Show
Christophe DENEUX added a comment - Mon, 8 Jun 2015 - 11:57:38 +0200 Merged in petals-4.3.x
Christophe DENEUX made changes - Mon, 8 Jun 2015 - 11:57:38 +0200
Status In Progress [ 10003 ] Resolved [ 10004 ]
Fix Version/s 0.9.0 [ 10545 ]
Resolution Fixed [ 1 ]
Hide
Christophe DENEUX added a comment - Mon, 8 Jun 2015 - 11:57:51 +0200

Merged in master

Show
Christophe DENEUX added a comment - Mon, 8 Jun 2015 - 11:57:51 +0200 Merged in master
Christophe DENEUX made changes - Fri, 5 Aug 2016 - 12:02:11 +0200
Component/s Process service [ 10400 ]
Transition Status Change Time Execution Times Last Executer Last Execution Date
New New Open Open
1m 24s
1
Christophe DENEUX
Tue, 26 May 2015 - 14:35:00 +0200
Open Open In Progress In Progress
1h 18m
1
Christophe DENEUX
Tue, 26 May 2015 - 15:53:10 +0200
In Progress In Progress Resolved Resolved
12d 20h 4m
1
Christophe DENEUX
Mon, 8 Jun 2015 - 11:57:38 +0200

People

Dates

  • Created:
    Tue, 26 May 2015 - 14:33:36 +0200
    Updated:
    Fri, 5 Aug 2016 - 12:02:11 +0200
    Resolved:
    Mon, 8 Jun 2015 - 11:57:38 +0200