Uploaded image for project: 'Activiti'
  1. ACT-4127

Fix (or remove) JobEntityManagerImpl#removeExectutionLink

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Lowest
    • Resolution: Fixed
    • Affects versions: None
    • Fix versions: 6.0
    • Components: Engine
    • Labels:
      None
    • Sprint:

      Description

      The JobEntityManagerImpl#removeExecutionLink method is essentially a no-op, as it's trying to remove this, a JobEntityManagerImpl, from a List<JobEntity>. Here's the code:

      protected void removeExecutionLink(JobEntity jobEntity) {
        if (jobEntity.getExecutionId() != null) {
          ExecutionEntity execution = getExecutionEntityManager().findById(jobEntity.getExecutionId());
          execution.getJobs().remove(this);
        }
      }

      That method should be changed to:

      execution.getJobs().remove(jobEntity);
      

      or, preferably, ExecutionEntity#getJobs should be completely removed (and just replaced with a findJobsByExecutionId call if needed perhaps?).

      Link to code in GitHub:
      https://github.com/Activiti/Activiti/blob/activiti6/modules/activiti-engine/src/main/java/org/activiti/engine/impl/persistence/entity/JobEntityManagerImpl.java#L293

        Attachments

          Activity

            People

            • Assignee:
              joram.barrez Joram Barrez (Inactive)
              Reporter:
              lwc Logan Chadderdon
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: