Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Data extension configuration: ExtWriteAction

Description:
Data extension configuration ExtWriteAction - An extension for invoking an event when writing a value
Configuration items:
Data extension identifierSystem text (without spaces and diacritics). It is used for unambiguous identification of data extension in data item (e.g. in the Extension method).

The default value is "wact".

Event "onItemBeforeWrite"Option when the onItemBeforeWrite event is triggered.

It is recommended to use this event only for special cases. When this event is enabled, the values are written in a more complex way. If the writing is called in the main thread then the event is called synchronously and the writing is also finished synchronously. If the writing is called from another thread (web, sequncer, communication) then the event is called asynchronously, i.e. this event does not execute the variable write command instantly, but later, after the active script is finished. The delayed asynchronous writing causes the variable to contain the original value even after the writing is reportedly complete, so if such value is then read (script, trends) it still contains the original value.

NEVER call for this item
call before EVERY CHANGE of this item value
call before EVERY WRITE to this item
Event "onItemAfterWrite"Option when the onItemAfterWrite event is triggered.
NEVER call for this item
call after EVERY CHANGE of this item value
call after EVERY WRITE to this item
Note:
This configuration window can be opened from the "Data extensions" configurator in the variable of the PmaData object.
 
If calling the onItemBeforeWrite event is enabled, then the event is triggered for this variable always closely before writing or before the change of the variable value. Unconsidered enabling for all variables can cause unnecessary utilization of the processor. For example if the object includes 1000 variables and each one has calling enabled then by writing new values into all variables of the object can cause calling the onItemBeforeWrite event 1000 times (each time with another pEvent.Item parameter value). It is also better (if it is required to react to writing or the change of the variable) to enable the onItemAfterWrite event instead of onItemBeforeWrite. Enabling onItemBeforeWrite is useful only if, for example, you need to test the written value and in a necessity to change it (to filter it). The onItemBeforeWrite property in the onItemBeforeWrite event is defined for reading and writing and thus it is possible in the event to enforce another value than the one that is really written.

If calling the onItemAfterWrite event is enabled, then the event is triggered for this variable always after writing or the change of the variable. For enabling this event similar remarks are valid for the onItemBeforeWrite event. Enabling the onItemAfterWrite is useful for variables that change their value not too ofter and then is it suitable to enable calling 'after the change'.

Caution: The onItemBeforeWrite event and the onItemAfterWrite event is not triggered if it isn't written into the variable directly, i.e. if the variable is bind to another value.


History:
Pm8.03.00: Created
PROMOTIC 9.0.10 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice