Deleting all instances of a concept (similar to truncate in databases) with minimal overhead/processing time.
book
Article ID: KB0091969
calendar_today
Updated On:
Products
Versions
TIBCO BusinessEvents Enterprise Edition
-
Not Applicable
-
Description
Resolution: Description: ========= Under some circumstances there may be a requirement to delete all instances of a concept (similar to truncate in databases) in a TIBCO BusinessEvents (BE) project with minimal overhead/processing time. This article explains on how to achieve this.
Environment: ========== TIBCO BusinessEvents - Version 3.x, 4.x All OS
Cause: ===== Requirement calls for deletion of all instances of a concept (similar to truncate in databases) in a TIBCO BusinessEvents (BE) project. Some implementations/logic may take more overhead/processing time.
Resolution: ========= * You can create a Rule function that can be used as a filter to selectively delete the Concepts or pass null to delete all instances of the Concept.
* If you plan to use a Rule function filter then you will have to make the return value as Boolean for the function. This function will get invoked for each Concept in the Cache, so keep this quick and simple.
Return true to delete. False to retain the instance.
* This does not take care of contained or parent Concepts. It deletes the instance and nothing else. You will have to handle the relationships of contained or parent concepts yourself.
* It would be good to perform this operation quickly as you might not be able to lock anything in particular.
Sample delete Rule that deletes instance of a Concept "/Main": --------------------------------------------------------------