Bug 975798
Summary: | Cannot get process instance details via REST API when the instance is completed | ||
---|---|---|---|
Product: | [Retired] JBoss BPMS Platform 6 | Reporter: | Ivo Bek <ibek> |
Component: | Business Central | Assignee: | Marco Rietveld <mrietvel> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Ivo Bek <ibek> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.0.0 | CC: | kverlaen, rzhang, smcgowan |
Target Milestone: | ER2 | ||
Target Release: | 6.0.0 | ||
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:06:38 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
Ivo Bek
2013-06-19 11:30:34 UTC
But the bug is general. It's not just about REST API, also the GetProcessInstance command doesn't work when the instance is completed. The observed behaviour is the intended behaviour. The GetProcessInstanceCommand (and the REST API that is using this underneath) is querying the runtime data for this information. Runtime data only contains the current state of active instances, it doesn't contain history information. Information about completed instances (or completed nodes of an active instance) can be found in the history log. This information is however not (yet) exposed through REST for the 6.0 release. I do believe that the NPE should be resolved of course, and an appropriate error message should be returned to the user. Hi Kris, I think it would be better to not return any error because nothing is wrong when a user just want to get information about process instance, which was only completed or aborted and probably the user doesn't know that, so he asks. Would it be problem to get the information from history data in the getProcessInstance method when the process instance isn't found in the runtime data? Because when the user gets the error that the process instance doesn't exist, he must asks again for history information to just find out result of process instance, which seems to me redundant. Thanks Ivo, Yes, I meant make sure no error is thrown internally, and in this case probably just return null (as no active ProcessInstance with that id was found). The REST API just mirrors the behaviour of the ksession, so I don't think we can change it. But in general queries about which process instances are active and what their state is should go to the history log (as that also has all the information about active process instances). This way, the user will get the information he needs in one invocation (and by using the history log, these queries won't impact runtime performance). This information is however currently not yet exposed through REST. Kris Oh ok then. For the performance it makes sense to ask just the history log when it's separate from the runtime. So, for our tests it will be enough to use the operation, using history log. That's helpful, thanks. Verified in BPMS 6.0.0.ER2 |