Skip to content
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

In Cockpit, filtering by async activities when modifying instances in a batch is broken #4757

Open
5 tasks done
venetrius opened this issue Nov 1, 2024 · 1 comment
Open
5 tasks done
Assignees
Labels
group:support All requests that are linked to a customer request. DRI: Tassilo type:bug Issues that describe a user-facing bug in the project. version:7.22.1 version:7.23.0

Comments

@venetrius
Copy link
Member

venetrius commented Nov 1, 2024

Environment (Required on creation)

reported and verified in Version v7.22.0-ee
(verified this is not an issue in Version v7.21.0-ee)

Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket)

When filtering for process instances in the modify process instances as batch on the process definition runtime view, results are not shown in case all of these three conditions are met:

  • ActivityIdIn filter is used
  • the activity is async or part of a compensation.
  • the process has not been scheduled yet by the executor: job is suspended or executor is suspended or overwhelmed, ( or a race condition, but that would result only in transient inconsistency)

Steps to reproduce (Required on creation)

  • Deploy example BPMN: taksWithAsyncGateway.zip
  • Suspend Gateway job in Process Instance Definition page
  • Start a new process instance
  • Select GateWay to cancel process instances
  • Verify that no process instance is shown in modify filter

Observed Behavior (Required on creation)

No process instance is shown in modify filter

image

Expected behavior (Required on creation)

Relevant Process Instances are always shown in Modify Filter even when ActivityIdIn filter is used

Root Cause (Required on prioritization)

Modify operation has been changed to use the historic API, with this change the ActivityIdIn filter has been added to the historic API. This come with a few limitation as historic PI data is only generated when the job is scheduled:

  • Tokens on Async Tasks: Tokens sitting on an asyncBefore/asyncAfter task will not yield process instances when using the activityIdIn filter, as no history has been produced yet. Filtering here is effectively racing against the job executor. Given the job executor usually processes faster than a user can apply filters, state changes can impact query results. This filter is most applicable for true wait states (e.g., user tasks, external tasks, timers) rather than transaction boundaries.
  • Compensation Scenarios: It is no longer possible to retrieve process instances with the activityIdIn filter on the subprocess "activity". When using activityIdIn filter for compensation scenarios, users need to filter by specific flow nodes rather than the broader subprocess activities.
  • Incident Deletion: When an incident is deleted, the incident filters will still return the process instances that previously had an incident. This behavior aligns with the standalone batch operation page and ensures consistency across the application.

Solution Ideas

When ActivityIdIn filter is used join ACT_RU_EXECUTION table to include process instances in the query result that might not have been scheduled yet.

Hints

Links

Breakdown

Pull Requests

  1. ci:e2e
    venetrius
  2. bot:backport:7.22 ci:all-db
    tasso94
  3. bot:backport:7.22
    tasso94
  4. tasso94

Dev2QA handover

  • Does this ticket need a QA test and the testing goals are not clear from the description? Add a Dev2QA handover comment
@venetrius venetrius added type:bug Issues that describe a user-facing bug in the project. group:support All requests that are linked to a customer request. DRI: Tassilo labels Nov 1, 2024
@venetrius
Copy link
Member Author

Hi @tasso94,
Assigning for prioritisation.

@tasso94 tasso94 removed their assignment Nov 5, 2024
@tasso94 tasso94 changed the title Cockpits: Filer option "Activity ID" is not working Modify PID page In Cockpit, filtering by async activities when modifying instances in a batch is broken Nov 5, 2024
@tasso94 tasso94 assigned tasso94 and venetrius and unassigned tasso94 Nov 6, 2024
@venetrius venetrius assigned tasso94 and unassigned venetrius Nov 13, 2024
@tasso94 tasso94 assigned gbetances089 and unassigned tasso94 Nov 15, 2024
hauptmedia added a commit to hauptmedia/operaton that referenced this issue Nov 18, 2024
related to camunda/camunda-bpm-platform#4757

Backported commit fab81850706 from the camunda-bpm-platform repository.
Original author: tasso94 <[email protected]>
javahippie pushed a commit to operaton/operaton that referenced this issue Nov 19, 2024
…223)

* fix(engine): allow querying for hist pis by async activities (#4769)

related to camunda/camunda-bpm-platform#4757

Backported commit fab81850706 from the camunda-bpm-platform repository.
Original author: tasso94 <[email protected]>

* fix(test): Fixes the HistoricProcessInstanceTest

* fix(test): More fixes for the HistoricProcessInstanceTest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
group:support All requests that are linked to a customer request. DRI: Tassilo type:bug Issues that describe a user-facing bug in the project. version:7.22.1 version:7.23.0
Projects
None yet
Development

No branches or pull requests

3 participants