The following is a proposal of features of the Plugin-based framework.
The Plugin Context is composed of two sub-components, namely the PreProcessPluginContext
and the PostProcessPluginContext
.
PreProcessPluginContext
The PreProcessPluginContext
is constructed each time rule execution is requested. The following data components are contained within the context:
evalTime
clientLanguage
clientTimeZoneOffset
focalPersonId
assertions
Set<String>
, and is a placeholder for assertions and is instantiated and given to Drools as a global variable. Drools may write to this set to provide the calling code with the information about the inferencing performed on the input data. (As of today--2014-09-20) the assertions object is not being used external to Drools, as there is a rule that is commonly being used which assembles the assertions into a comma-delimited list, as part of the vMR output.)globals
Map<String, Object>
. The key of each map entry may be any given String, which is typically used as a Global within the Drools context. Names are restricted to any value other than the following: evalTime
, clientLanguage
, clientTimeZoneOffset
, focalPersonId
assertions
, and namedObjects
allFactLists
Map<Class<?>, List<?>>
. The key of each map entry may be a Class
of any given type, though Plugins should restrict the types to OpenCDS-internal components of the vMR.ClinicalStatement
fields: clinicalStatementToBeRoot
and/or toBeReturned
; a ClinicalStatement
marked as clinicalStatementToBeRoot
and toBeReturned
will return all child elements).Map<String, Object>
. The key of each map entry may be any given String, which is typically used within Drools.allFactLists
.PostProcessPluginContext
The PostProcessPluginContext
is constructed each time rule execution has completed. The following data components are contained within the context:
evalTime
clientLanguage
clientTimeZoneOffset
focalPersonId
assertions
Set<String>
, and is a placeholder for assertions and is instantiated and given to Drools as a global variable. Drools may write to this set to provide the calling code with the information about the inferencing performed on the input data. (As of today--2014-09-20) the assertions object is not being used external to Drools, as there is a rule that is commonly being used which assembles the assertions into a comma-delimited list, as part of the vMR output.)globals
PreProcessPluginContext
) is a Map of String to Object, or more specifically, Map<String, Object>
. The key of each map entry may be any given String, which is typically used as a Global within the Drools context. Names are restricted to any value other than the following: evalTime
, clientLanguage
, clientTimeZoneOffset
, focalPersonId
assertions
, and namedObjects
resultFactLists
Map<String, List<?>>
. Data contained by this map are the result fact lists, which are the final return value of the DroolsAdapter.getOneResponse method and OpenCDS post processing.allFactLists
(above) with any changes made by Drools, and the contents of namedObjects
(added by OpenCDS after Drools processing).namedObjects
informs the output XML generator to determine which elements should be included in the output XML.(Supporting Data)
(Sandboxing)
(Configuration)
(Loading & Sandboxing)
(To be continued...)