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

User Task: processInstanceId is not propagated when comment is added

      Environment (Required on creation):

      • Any setup with Tasklist

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

      • When adding a task comment via the UI, the Java API for retrieving all comments of the corresponding process instance does not return the task comments

      Steps to reproduce (Required on creation):

      • Create a task comment in tasklist
      • Call TaskService#getProcessInstanceComments with the process instance id

      Observed Behavior (Required on creation):

      • The result is empty

      Expected behavior (Required on creation):

      • The task should be included

      Root Cause (Required on prioritization):

      • The underlying REST and Java API for creating comments does not set the process instance id
      • This is expected behavior on the API level, however on tasklist level it should be possible to set the process instance id

      Solution Ideas (Optional):

      • REST API: expose a process instance id parameter when creating a task comment so that the process instance id can be set along with it
      • Tasklist: Create a tasklist configuration setting that toggles if task comments are also assigned the process instance id (let's not change the default behavior since using task comments without the process instance id is a valid use case as well)

      Hints (Optional):

        This is the controller panel for Smart Panels app

            [CAM-13156] User Task: processInstanceId is not propagated when comment is added

            Michal Dytko created issue -
            Michal Dytko made changes -
            Mentioned Roles
            Michal Dytko made changes -
            Mentioned Groups
            Michal Dytko made changes -
            Assignee New: Thorben Lindhauer [ thorben.lindhauer ]
            Michal Dytko made changes -
            Link New: This issue is related to SUPPORT-10000 [ SUPPORT-10000 ]
            Thorben Lindhauer made changes -
            Description Original: *When*
            * Add a comment to the User Task in Tasklist

            *Then*
            * The processInstanceId is not propagated and the ACT_HI_COMMENT.PROC_INST_ID_ column contains {{null}}

            It affects the usage of the below API:
            {code}
            execution.getProcessEngineServices().getTaskService().getProcessInstanceComments(execution.getProcessInstanceId())
            {code}

            *Hint*
            {{null}} is propagated during the comment creation in TaskCommentResourceImpl [#createComment|https://github.com/camunda/camunda-bpm-platform/blob/143937f3802650dd351e621804b54fc3e925e180/engine-rest/engine-rest/src/main/java/org/camunda/bpm/engine/rest/sub/task/impl/TaskCommentResourceImpl.java#L87] method.
            New: h4. Environment (Required on creation):

            * Any setup with Tasklist

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

            * When adding a task comment via the UI, the Java API for retrieving all comments of the corresponding process instance does not return the task comments

            h4. Steps to reproduce (Required on creation):

            * Create a task comment in tasklist
            * Call {{TaskService#getProcessInstanceComments}} with the process instance id

            h4. Observed Behavior (Required on creation):

            * The result is empty

            h4. Expected behavior (Required on creation):

            * The task should be included

            h4. Root Cause (Required on prioritization):

            * THe underlying REST and Java API for creating comments does not set the process instance
            * This is expected behavior on the API level, however on tasklist level it should be possible to set the process instance id

            h4. Solution Ideas (Optional):

            * REST API: expose a process instance id parameter when creating a task comment so that the process instance id can be set along with it
            * Tasklist: Two options:
            # End users decide: Add a check box that allows end users to specify if the comment should be added to the process instance
            # Global setting: Create a tasklist configuration setting that toggles if task comments are also assigned the process instance id (let's not change the default behavior since using task comments without the process instance id is a valid use case as well)

            h4. Hints (Optional):
            Thorben Lindhauer made changes -
            Mentioned Roles
            Thorben Lindhauer made changes -
            Mentioned Groups
            Thorben Lindhauer made changes -
            Description Original: h4. Environment (Required on creation):

            * Any setup with Tasklist

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

            * When adding a task comment via the UI, the Java API for retrieving all comments of the corresponding process instance does not return the task comments

            h4. Steps to reproduce (Required on creation):

            * Create a task comment in tasklist
            * Call {{TaskService#getProcessInstanceComments}} with the process instance id

            h4. Observed Behavior (Required on creation):

            * The result is empty

            h4. Expected behavior (Required on creation):

            * The task should be included

            h4. Root Cause (Required on prioritization):

            * THe underlying REST and Java API for creating comments does not set the process instance
            * This is expected behavior on the API level, however on tasklist level it should be possible to set the process instance id

            h4. Solution Ideas (Optional):

            * REST API: expose a process instance id parameter when creating a task comment so that the process instance id can be set along with it
            * Tasklist: Two options:
            # End users decide: Add a check box that allows end users to specify if the comment should be added to the process instance
            # Global setting: Create a tasklist configuration setting that toggles if task comments are also assigned the process instance id (let's not change the default behavior since using task comments without the process instance id is a valid use case as well)

            h4. Hints (Optional):
            New: h4. Environment (Required on creation):

            * Any setup with Tasklist

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

            * When adding a task comment via the UI, the Java API for retrieving all comments of the corresponding process instance does not return the task comments

            h4. Steps to reproduce (Required on creation):

            * Create a task comment in tasklist
            * Call {{TaskService#getProcessInstanceComments}} with the process instance id

            h4. Observed Behavior (Required on creation):

            * The result is empty

            h4. Expected behavior (Required on creation):

            * The task should be included

            h4. Root Cause (Required on prioritization):

            * THe underlying REST and Java API for creating comments does not set the process instance
            * This is expected behavior on the API level, however on tasklist level it should be possible to set the process instance id

            h4. Solution Ideas (Optional):

            * REST API: expose a process instance id parameter when creating a task comment so that the process instance id can be set along with it
            * Tasklist: Two options:
            ## End users decide: Add a check box that allows end users to specify if the comment should be added to the process instance
            ## Global setting: Create a tasklist configuration setting that toggles if task comments are also assigned the process instance id (let's not change the default behavior since using task comments without the process instance id is a valid use case as well)

            h4. Hints (Optional):
            Thorben Lindhauer made changes -
            Mentioned Roles
            Thorben Lindhauer made changes -
            Mentioned Groups

              michael.schoettes Michael Schoettes
              michal.dytko Michal Dytko
              Tassilo Weidner Tassilo Weidner
              Michael Schoettes Michael Schoettes
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: