Use Case:A parent concept with several contained concept arrays is deleted in PreProcessor RuleFunction using "Instance.deleteInstance(parent)". One of the child concepts has a reference concept array. Each of that referenced concepts added is a contained concept in a contained concept array of the parent as well.
The parent concept will be deleted in the PreProcessor RuleFunction, but the deleted child (with referenced concept arrays) can still be loaded using Cluster.DataGrid.CacheLoadConceptByExtIdByUri() or Instance.getByExtIdByUri().
That child is internally marked as deleted, that's why a NullPointerException is thrown when update the child in a Rule/RuleFunction.
Concept Structure for the use case:parent p --> CONTAINS concept c1 array AND concept c2 array AND concept c3 array
concept c2 --> REFERENCES concept c3 array
<timestamp> <agentname> Error [$default.be.mt$.Thread.7] - [runtime.service] [inference-class] Got runtime exception while executing Rule <Rule> Action <entities>
java.lang.NullPointerException
at com.tibco.cep.kernel.helper.BitSet.setBit(SourceFile:16)
at com.tibco.cep.runtime.model.element.impl.ConceptImpl.modifyConcept(ConceptImpl.java:645)
at com.tibco.cep.runtime.model.element.impl.ConceptImpl.modifyConcept(ConceptImpl.java:638)
at com.tibco.cep.runtime.model.element.impl.property.PropertyImpl.setConceptModified(PropertyImpl.java:72)
at com.tibco.cep.runtime.model.element.impl.property.simple.PropertyArrayConceptReferenceSimple.addToEnd(PropertyArrayConceptReferenceSimple.java:64)
at com.tibco.cep.runtime.model.element.impl.property.simple.PropertyArrayConceptReferenceSimple.add(PropertyArrayConceptReferenceSimple.java:70)
at com.tibco.cep.runtime.model.element.impl.property.simple.PropertyArrayConceptReferenceSimple.set(PropertyArrayConceptReferenceSimple.java:91)
at be.gen.Rules.rTestSupport$rTestSupport_a.execute(rTestSupport.java:51)
Note: Issue occurs only for persistence type Shared Nothing.