Question & Answer
Question
How do you override OMReactive::processEvent in the IBM Rational Rhapsody OXF Framework?
Cause
You wish to add additional processing before and after each event is consumed (destroyed) or to replace the entire event consumption mechanism.
Answer
By creating a local external version of the OMReactive class, you can inherit and override its functionality. Any virtual function defined in OMReactive (or IOxfReactive) can be overridden in a sub class)
You can then add your own pre- or post-processEvent code to the function, along with a call to the OMReactive superclass function:
Note, to ensure that every reactive class in the current project calls your new MyReactive class rather than the default OMReactive class, you must modify the CPP_CG::Framework::ReactiveBase property:
This code is then called every time an event is consumed.
[{"Product":{"code":"SSB2MU","label":"IBM Engineering Systems Design Rhapsody"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General Information","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"8.0;8.0.1;8.0.2;8.0.3;8.0.4;8.0.5;8.0.6;8.1;8.1.1;8.1.2;8.1.2.1;8.1.3;8.1.4;8.1.5;8.2;8.2.1","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]
Product Synonym
Rational Rhapsody
Was this topic helpful?
Document Information
Modified date:
27 May 2022
UID
swg22010094