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

UserTask's timeoutListenerDeclaration will be deleted from processDefinitionImpl after migrate #4637

Open
1 task
FeiyuEVE opened this issue Sep 19, 2024 · 1 comment
Assignees
Labels
type:bug Issues that describe a user-facing bug in the project.

Comments

@FeiyuEVE
Copy link

FeiyuEVE commented Sep 19, 2024

Environment (Required on creation)

camunda 7.19.0
springboot 2.7
java 11

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

This line will remove timerDeclaration from processDefinition

TimerDeclarationImpl declaration = activityDeclarations.remove(((TimerJobConfiguration) jobHandlerConfiguration).getTimerElementSecondaryKey());

Because shallow copy at

Map<String, Map<String, TimerDeclarationImpl>> targetTimeoutListenerDeclarationsInEventScope = new HashMap<>(TimerDeclarationImpl.getTimeoutListenerDeclarationsForScope(activityInstance.getTargetScope()));

targetTimeoutListenerDeclarationsInEventScope's inner map —— targetTimerDeclarations points to targetTimerDeclarations which is belong to userTask of processDefinition

Steps to reproduce (Required on creation)

  1. create processDefinition with multi-instance userTask (will produce 2 userTasks at least) and the userTask has a timeoutListener
  2. start it
  3. deploy the processDefinition again to produce a new version
  4. migrate the processInstance to new version
  5. the first userTaskInstance will migrate timeoutJob successfully but the rest of userTaskInstance's timeoutJob will be deleted because timerDeclaration been deleted

Observed Behavior (Required on creation)

Expected behavior (Required on creation)

Root Cause (Required on prioritization)

Solution Ideas

Hints

Links

Breakdown

Pull Requests

No tasks being tracked yet.

Dev2QA handover

  • Does this ticket need a QA test and the testing goals are not clear from the description? Add a Dev2QA handover comment
@FeiyuEVE FeiyuEVE added the type:bug Issues that describe a user-facing bug in the project. label Sep 19, 2024
@venetrius venetrius self-assigned this Sep 20, 2024
@venetrius
Copy link
Member

Hi @FeiyuEVE,

Thanks for raising this bug issue. I will try to reproduce it and will get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Issues that describe a user-facing bug in the project.
Projects
None yet
Development

No branches or pull requests

2 participants