All concepts contained in a concept are not deleted when they are deleted in a forwarding or ascending loop.

All concepts contained in a concept are not deleted when they are deleted in a forwarding or ascending loop.

book

Article ID: KB0085061

calendar_today

Updated On:

Products Versions
TIBCO BusinessEvents Enterprise Edition -
Not Applicable -

Description

Resolution:
Description:
============
Deleting contained concept is skipping one concept when using function
Instance.PropertyArray.removeContainedConcept and traversing in ascending for loop


Environment:
==========
TIBCO BusinessEvents 3.x,4.x,5.x



Symptoms:
=========
All concepts contained in a concept are not deleted when they are deleted in a forwarding or ascending loop.


Cause:
=====
Array identifier numbers are positional. Deleting Contained Concepts shrinks the property array so the indexes in the for loop are incorrect.


Resolution:
==========
When you delete multiple items in an array using a for loop, start with the highest identifier number and work down to the lower numbers sequentially. For example, if you want to delete items in positions 1, 2, and 4, delete them in the order: 4, 2, then 1. The reason is that if you delete items with lower position numbers first, the array shrinks and the remaining lower numbers are then occupied by different items. For example, if you delete the item in position 1, then the item that was in position 2 will now occupy position 1.

Issue/Introduction

All concepts contained in a concept are not deleted when they are deleted in a forwarding or ascending loop.