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

Drag&Drop Modify with collapsed subprocess with more than one process instance don´t work #4322

Open
1 task
venetrius opened this issue May 6, 2024 · 0 comments
Assignees
Labels
group:support All requests that are linked to a customer request. DRI: Tassilo potential:7.20.7 potential:7.21.3 type:bug Issues that describe a user-facing bug in the project. version:7.22.0

Comments

@venetrius
Copy link
Member

venetrius commented May 6, 2024

Environment (Required on creation)

Reproduces issue on Tomcat distro on version 7.20.4, 7.20.5 and 7.21.0

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

User can't use drag and drop functionality for collapsed subprocess to start instance before/after an other step.

Steps to reproduce (Required on creation)

  • Deploy process.bpmn
  • Start a few instances of the process setting a single variable to:
{"var1":
   { "value":0,
     "type":"Integer"
   }
}
  • Go to the process-definition page of this process and select modify
  • Try to drag and drop the three dots to move instances from collapsed subprocess to the user tasks
  • It should create a startBefore and a Cancel action
  • Click on Select Instances and select a few instances
  • Hit modify instances
  • See error: Could not apply modification : For instruction type 'cancel': 'activityId' must be set

Observed Behavior (Required on creation)

After following the above steps, modification/executeAsync endpoint returns

{
    "type": "InvalidRequestException",
    "message": "For instruction type 'cancel': 'activityId' must be set",
    "code": null
}

Expected behavior (Required on creation)

Should successfully send a modification/executeAsync which creates a batch job after the batch job run the tokens are in the user task

Root Cause (Required on prioritization)

webapps/camunda-webapp/plugins/frontend/plugin/cockpit/modification/app/diagramPlugins/definitionModification.js

In onDragAndDrop we are checking if the element.id is present as a key in the activityIdToInstancesMap to see if it is a multi instance and then we set the id. However activityIdToInstancesMap does not contain collapsed subprocess. This id is used to create the cancel action. When creating the request the empty field is filtered out this is how we end up with the For instruction type 'cancel': 'activityId' must be set error.

I think this has never worked.

Solution Ideas

One simple fix is to check if the element type is bpmn:SubProcess then set MI to false and id to element.id

Hints

Links

https://jira.camunda.com/browse/SUPPORT-17986

Breakdown

Pull Requests

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 May 6, 2024
@venetrius venetrius assigned danielkelemen and unassigned venetrius May 23, 2024
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 potential:7.20.7 potential:7.21.3 type:bug Issues that describe a user-facing bug in the project. version:7.22.0
Projects
None yet
Development

No branches or pull requests

3 participants