Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-13830

Wrong error message on process deletion

XMLWordPrintable

    • Icon: Bug Report Bug Report
    • Resolution: Fixed
    • Icon: L3 - Default L3 - Default
    • None
    • 7.14.0
    • None
    • None

      Environment (Required on creation):

      Embedded process engine -  SpringBootApp with Camunda 7.14 run on Windows 10/SpringBoot app running in a Docker container

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

      In case of deleting a running process instance that has an unknown identifier in the process output mapping of the activity a token is at, Process not found message is returned instead of a proper error message.
      This was discovered during deleting a process Instance with an incident on an external task with outbound mapping that was accessing a variable that external task was supposed to create, but failed to due to the incident. But this is also reproducible with a simple user task - attached a diagram and a stacktrace of the actual error.

      Steps to reproduce (Required on creation):

      1. Deploy attached model to a running Camunda instance

      2. Start process through rest/from tasklist

      3. Check through rest or in cockpit that the instance exists, token is waiting at User task and copy instance ID

      4. Try to delete the instance through rest api calling baseUrl/rest/process-instance/:id
      WITHOUT skipIoMapping or any other parameters (so in effect skipIoMapping=false)

      Observed Behavior (Required on creation):

      API returns 404:

      {     "type": "InvalidRequestException",     "message": "Process instance with id d4782928-01ac-11ec-9f4c-fc7774acb395 does not exist" }

      Expected behavior (Required on creation):

       

      API returns message with the actual root cause - in this case Cannot resolve identifier 'nonexistent'

      Root Cause (Required on prioritization):

      Solution Ideas (Optional):

      Hints (Optional):

      Error handling in ProcessInstanceResourceImpl.deleteProcessInstance seems to be faulty - it catches any ProcessEngineException and rethrows the exception with misleading message.

        This is the controller panel for Smart Panels app

              Unassigned Unassigned
              bwrobel Bogna Wrobel
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: