Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1069174

Summary: Cannot access task not assigned to any process via REST API
Product: [Retired] JBoss BPMS Platform 6 Reporter: Tomas Livora <tlivora>
Component: Business CentralAssignee: Marco Rietveld <mrietvel>
Status: CLOSED CURRENTRELEASE QA Contact: Tomas Livora <tlivora>
Severity: high Docs Contact:
Priority: high    
Version: 6.0.1CC: kverlaen, mbiarnes, rrajasek, smcgowan, tlivora
Target Milestone: CR1   
Target Release: 6.0.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 20:03:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tomas Livora 2014-02-24 12:06:41 UTC
Description of problem:
When a user creates a new task directly through the Tasks List page in the Business Central it is not possible to manipulate this task through the REST API.

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

Steps to Reproduce:
1. Create a new task on the Tasks List page.
2. Try to get task details using REST: http://localhost:8080/business-central/rest/task/{taskId}

Actual results:
You will get a response with status 500 Internal Server Error and the following content:

java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:333)
at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:988)
at org.kie.services.remote.cdi.DeploymentInfoBean.getRuntimeManager(DeploymentInfoBean.java:64)
at org.kie.services.remote.cdi.DeploymentInfoBean.getRuntimeEngine(DeploymentInfoBean.java:95)
at org.kie.services.remote.cdi.DeploymentInfoBean.getRuntimeEngineForTaskCommand(DeploymentInfoBean.java:72)
at org.kie.services.remote.rest.RestProcessRequestBean.doTaskOperationAndSerializeResult(RestProcessRequestBean.java:135)
at org.kie.services.remote.rest.RestProcessRequestBean$Proxy$_$$_WeldClientProxy.doTaskOperationAndSerializeResult(RestProcessRequestBean$Proxy$_$$_WeldClientProxy.java)
at org.kie.services.remote.rest.TaskResource.taskId(TaskResource.java:167)
at org.kie.services.remote.rest.TaskResource$Proxy$_$$_WeldClientProxy.taskId(TaskResource$Proxy$_$$_WeldClientProxy.java)
at sun.reflect.GeneratedMethodAccessor340.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:167)
at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:269)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:227)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:216)
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:847)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.jbpm.designer.web.filter.impl.PluggableFilter.doFilter(PluggableFilter.java:70)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.uberfire.security.server.UberFireSecurityFilter.doFilter(UberFireSecurityFilter.java:266)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:407)
at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)
at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:408)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920)
at java.lang.Thread.run(Thread.java:744)

Expected results:
There should be a response with status 200 containing task details.

Additional info:
It is not possible to do any action with this kind of task like claiming or completing it.

Comment 1 Marco Rietveld 2014-02-24 20:44:40 UTC
Tomas, which operation produced the stack trace?

Comment 2 Tomas Livora 2014-02-25 08:41:11 UTC
Marco, I've already mentioned it in Steps to reproduce. This stack trace was produced by calling GET on http://localhost:8080/business-central/rest/task/2. It is not a problem when you call it on a task that is a part of any process but in this case it returns NullPointerException. The result is exactly the same when you call release or complete on such a task (assuming its status is InProgress for this example).

Comment 3 Marco Rietveld 2014-02-26 11:24:31 UTC
Tomas, sorry for the dumb question: I've been juggling too many issues recently. :/ 

I've actually already "accidentally" fixed this issue with a recent "clean-up" commit. See these changes: 

https://github.com/droolsjbpm/droolsjbpm-integration/commit/2a2b2346#diff-0022a35b5ce02580334d2fa1140f3f3dL164
https://github.com/droolsjbpm/droolsjbpm-integration/commit/2a2b2346#diff-cbe41870ff97498cdd0a09351a2e5edbL123

Commits:

6.0.x: 
https://github.com/droolsjbpm/droolsjbpm-integration/commit/2a2b2346

master: 
https://github.com/droolsjbpm/droolsjbpm-integration/commit/eef36349

Comment 4 Tomas Livora 2014-03-05 10:22:05 UTC
The bug is not fixed in BPMS 6.0.1 ER2. It is now possible to get task content but when you try to claim, start, complete or release the task there is still response with status code 500 (Internal Server Error) and NullPointerException.

Comment 6 Michael 2014-03-14 17:37:28 UTC
Ticket cherry-picked into 6.0.1.CR1. 
Commit: 4247cd07259f2e8355b08f7fd6f1d0db61332c80

Comment 7 Tomas Livora 2014-03-24 09:12:10 UTC
Verified on BPMS 6.0.1 CR1