Bug 1150112 - Remote AddTaskCommand produce NPE when tries to get workItemId, processInstanceId and others
Summary: Remote AddTaskCommand produce NPE when tries to get workItemId, processInstan...
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: ER5
: 6.1.0
Assignee: Marco Rietveld
QA Contact: Ivo Bek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-07 13:06 UTC by Ivo Bek
Modified: 2020-03-27 20:06 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-03-27 20:06:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ivo Bek 2014-10-07 13:06:38 UTC
Description of problem:

When I try to add an adhoc task remotely via AddTaskCommand, I get NPE:

Caused by: java.lang.NullPointerException
	at org.jbpm.services.task.impl.model.xml.JaxbTaskData.getWorkItemId(JaxbTaskData.java:222)
	at org.jbpm.services.task.impl.model.xml.JaxbTask.getTask(JaxbTask.java:309)
	at org.jbpm.services.task.commands.AddTaskCommand.execute(AddTaskCommand.java:96)
	at org.jbpm.services.task.commands.AddTaskCommand.execute(AddTaskCommand.java:53)
	at org.jbpm.services.task.commands.TaskCommandExecutorImpl$SelfExecutionCommandService.execute(TaskCommandExecutorImpl.java:65)
	at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41)
	at org.jbpm.services.task.persistence.TaskTransactionInterceptor.execute(TaskTransactionInterceptor.java:54)
	at org.jbpm.services.task.commands.TaskCommandExecutorImpl.execute(TaskCommandExecutorImpl.java:40)
	at org.jbpm.services.task.impl.command.CommandBasedTaskService.execute(CommandBasedTaskService.java:128)
	at org.jbpm.kie.services.impl.UserTaskServiceImpl.execute(UserTaskServiceImpl.java:876)
	at org.jbpm.services.cdi.impl.UserTaskServiceCDIImpl$Proxy$_$$_WeldClientProxy.execute(UserTaskServiceCDIImpl$Proxy$_$$_WeldClientProxy.java)
	at org.kie.remote.services.cdi.ProcessRequestBean.doTaskOperation(ProcessRequestBean.java:232)



The command requires to have workitemId, processInstanceId, ... configured though they are not necessary.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Marco Rietveld 2014-10-31 00:12:48 UTC
Kris, as far as I know, creation of ad-hoc tasks isn't yet a supported feature. Could you confirm or deny this?

Comment 3 Kris Verlaenen 2014-11-27 14:37:38 UTC
It's a supported feature in the UI, so having that available in the remote API would be useful.  If it's too difficult to do this through the remote API, we should at least make sure it does return a valid error message and document this.

Comment 4 Ivo Bek 2014-11-27 14:54:09 UTC
That's interesting because in BPMS 6.0.x the command worked and it is in the list of supported commands here https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_BPM_Suite/6.0/html-single/Development_Guide/index.html#Execute_calls

The reproducer I mentioned in the previous comment was created for BZ 1069174.

Comment 6 Maciej Swiderski 2015-01-15 12:38:04 UTC
fixed by ensuring null primitive wrappers are not cast to primitives (Long(null) -> long) for JaxbTaskData

jbpm
master:
https://github.com/droolsjbpm/jbpm/commit/0807d631377606fb13c916887f8f6944ede28eda

6.2.x:
https://github.com/droolsjbpm/jbpm/commit/f66226d1a27e758bcd0fcff1898bfe3b5d03582b

Comment 7 Ivo Bek 2015-02-17 15:03:16 UTC
Verified in BPMS 6.1.0.ER5


Note You need to log in before you can comment on or make changes to this bug.