-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix get historic process instance api orquery for mutiple statues and… #4515
Fix get historic process instance api orquery for mutiple statues and… #4515
Conversation
… withIncidents combined with orQuery
Hello @kmannuru, |
@joaquinfelici This PR is to fix for the issue: #3182 |
Hello @kmannuru , |
Hello @joaquinfelici following up to see if you're able to review the PR. |
@kmannuru, the review is in progress but not completed yet. |
@kmannuru, Are you interested in checking if the issue occurs for the other "Or queries" too (runtime and tasks)? Docs: https://docs.camunda.org/manual/7.21/user-guide/process-engine/process-engine-api/#or-queries |
@yanavasileva Sure. I can look into this. |
@yanavasileva I'm currently working on checking if the same " or Query" issue occurs for runtime and tasks. Meanwhile checking if my current fix can be pushed part of the upcoming camunda release. Thanks. |
Hello @kmannuru , I'm sorry I couldn't review your PR earlier. I'm currently reviewing it and will provide feedback tomorrow. In the meantime, I cloned this PR to launch CI and we have some failing tests here. These are audit tests and the failures are probably due to the history level (audit level doesn't include incidents, more info here). Even some tests that are passing might have an incorrect history level, please check this part when you have the chance. Test failure
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for raising this, the changes look good overall, I added some comments.
|
||
@Test | ||
public void shouldReturnHistoricProcInstWithMatchingState() { | ||
// given |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the whole given
block of this test and the one above is exactly the same, please extract it into a method with a significant name and reuse the code.
@@ -91,7 +91,7 @@ public class HistoricProcessInstanceQueryImpl extends AbstractVariableQueryImpl< | |||
protected boolean isTenantIdSet; | |||
protected String[] executedActivityIds; | |||
protected String[] activeActivityIds; | |||
protected String state; | |||
protected Set<String> state = new HashSet<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All changes related to multiple state handling don't seem to be described or explained in the issue. Only the unexpected behavior of the combination of withIncidents
and orQueries
is described there. Could you please document this as well?
@@ -817,4 +917,89 @@ public void shouldReturnByProcessDefinitionIdOrIncidentType() { | |||
assertThat(processInstances.size()).isEqualTo(2); | |||
} | |||
|
|||
@Test | |||
@Deployment(resources={"org/camunda/bpm/engine/test/api/oneTaskProcess.bpmn20.xml"}) | |||
public void shouldReturnHistoricProcInstWithVarValue1OrVarValue21() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joaquinfelici Thanks for your feedback. I'll work on the changes. |
Hello @kmannuru , I'll be closing this pull request for now. You can re-open it whenever you get the chance to work on the changes. Thanks a lot! |
Related to #3182