company logo

DataSource :: contextEnabled - ENABLE_CONTEXT handler option

Database context functions (business rules) are executed always, when data is being accessed, i.e. when the data state changes or process events are generated. In order to disable event handling (e.g. for maintenance purposes), business rules can be disabled.

Since context can be disabled temporarily by the application, this option only indicates the general settings when a database is going to be opened. When being disabled, context cannot be enabled by the application later on.

true - context functionality is enabled

false - context functionality is disabled

Default: true

ENABLE_CONTEXT=YES

Return value:  Success ( bool  )

The value is true when the function was executed successfully. Otherwise the value is set to false .

Implementation overview

Implementation details

  1. Is context enabled?
    bool DataSource  :: contextEnabled (  )

    The function returns true , when context is enabled and business rules are executed, and false otherwise.

  2. to list
  3. Enable or disable context
    bool DataSource  :: contextEnabled ( bool bState )

    In order to disable context feature and not running business rules, false has to be passed in bState . Passing true , which has been set as default, will enable context features.

    The setting has an effect only, when being set before opening the data source (database). Changing this settings will not affect data sources already opened.

    • bState - Success

      The value is true when the function was executed successfully. Otherwise the value is set to false .

  4. to list