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

Unable to remove entry criterion from PlanItem using iterator

XMLWordPrintable

    • Icon: Bug Report Bug Report
    • Resolution: Won't Fix
    • Icon: L3 - Default L3 - Default
    • None
    • 7.5.4
    • cmmn model api
    • None

      The code written below executes well, but "criterionIt.remove()" does not remove any criterion from the plan item:

                  for (final Iterator<EntryCriterion> criterionIt =
                          planItem.getEntryCriterions().iterator(); criterionIt.hasNext();) {
                      final EntryCriterion criterion = criterionIt.next();
                      if (<check something>) {
                          criterionIt.remove();
                      }
                  }
      

      The problem is in the implementation of org.camunda.bpm.model.xml.impl.type.child.ChildElementCollectionImpl.get(ModelElementInstance) method. The method "iterator()" of created collection copies its' elements to ArrayList and returns the iterator of this copy.

      You should implements the iterator which either supports "remove" operation, or throws UnsupportedOperationException.

        This is the controller panel for Smart Panels app

              Unassigned Unassigned
              MAK Dmitry
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: