Bug 1062859
| Summary: | NPE in GetTaskContentCommand.java:37 when trying to get task content for second human task in own web app | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Retired] JBoss BPMS Platform 6 | Reporter: | Jiri Svitak <jsvitak> | ||||||
| Component: | jBPM Core | Assignee: | Maciej Swiderski <mswiders> | ||||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Jiri Svitak <jsvitak> | ||||||
| Severity: | low | Docs Contact: | |||||||
| Priority: | high | ||||||||
| Version: | 6.0.0 | CC: | mbaluch, rrajasek | ||||||
| Target Milestone: | ER2 | ||||||||
| 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:26 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: | |||||||||
| Attachments: |
|
||||||||
|
Description
Jiri Svitak
2014-02-08 09:37:01 UTC
Created attachment 860855 [details]
rewards-1.0.jar
Install this artifact to your local .m2 repo
Additional info: The task can be normally completed after the NPE, and it passes output data (filled from user-defined form) correctly to process variables. Jiri, the problem is that you should use task id and not documentContentId when calling getTaskContent method: https://github.com/jsvitak/jbpm-6-examples/blob/master/rewards-jsf/src/main/java/org/jbpm/examples/ejb/TaskBean.java#L97 so it might work for the first or some execution when taskId and documentContentId will somehow match but it's very dangerous as you might end up having incorrect information - taken from other task than you expect. added check if task was found to avoid NPE and produce meaningful exception jbpm master: https://github.com/droolsjbpm/jbpm/commit/880b099f9448d3bf11a2e2b25322d500d093624e 6.0x: https://github.com/droolsjbpm/jbpm/commit/49448fe2830b5440351e4f2a87135935ecdae6b6 Thanks Maciej for explanation. You are correct, I have changed my code and now it works well. You've still fixed the NPE, so I'll verify this BZ later. NPE was just a result of a bad API usage, so I am lowering the severity. Verified in BPMS 6.0.1.ER2. NPEs are not serious, so no regression test required. |