Defining Custom GenEvent Messages
You can define custom GenEvent messages using placeholder strings, which allows you to populate those messages with actual values upon generation. If you do not customize a message, GenEvent uses the default message. You cannot localize custom GenEvent messages.
Some actions, including write, data set update, method call, and procedure call, may require authorization upon execution. When authorization is required, the Performer and the Verifier must each provide a user name, password, and description message. You can include this additional information in the GenEvent messages. For more information, see Authorization in Global Settings.
To define a custom GenEvent message:
-
Using a text editor, browse to the C:\ProgramData\ICONICS folder and open the FwxServer.Network.config file.
-
In the FwxServer.Network.config file, locate the <AuditLog><MessageOverride> section.
-
Standard: Locate the desired tag in the action section (<Write>, <HistoryWrite>, <HistoryDeleteRaw>, etc.).
For example, to customize a standard message for a successful write, locate the following tag:
<Write>
<SucceededMessageFormat /> -
Authorization: Locate the desired tag in the <ExtraAuthorization> section.
For example, to customize an authorization message for a method call, locate the following tag:
<ExtraAuthorization>
<MethodCallMessageFormat />
-
-
Rewrite the tag containing one or more parameters, as well as static descriptive text and punctuation that provides information or context for each parameter:
<TagName>Description1 is {parameter1} and Description2 is {parameter2} ...</TagName>
Click a link below to view the available parameters:
Standard Parameters
-
General/All Actions
-
{Result}: The result of the action (for example,
Good
orBad - Server Failed
) -
{PointName}: The name of the point where the action was executed
-
{Source}: The name of the application that executed the action (for example, GraphWorX)
-
{MachineName}: The name of the client's computer where the user started the action
-
{ProcessName}: The process on the client's computer (for example, GwxConfigApp.exe) where the user started the action
-
{IPAddress}: The IP address of the client's computer, which may not be accessible
-
{UserName}: The name of the user (if logged in) that launched or started the action
-
-
Write Actions
-
{PrevValue}: The previous value before it was written; for authorization, this is the value prior to the time that the Authorization dialog is displayed
-
{NewValue}: The value that is newly written
-
-
Dataset Update Actions
-
{PrevValue}: The set of values that identify the row to be updated; when adding a new row, this might be empty
-
{NewValue}: The set of newly written values that might update an existing row or an added row; when empty, the existing row might be deleted
-
-
Method/Procedure Call Actions
-
{MethodName}: The called method or procedure name
-
{InputArguments}: The set of input arguments for a called method or procedure
-
{OutputArguments}: The set of output arguments for a called method or procedure
-
-
HistoryDeleteRaw Actions
-
{StartTime}: The start time of a deleted interval or an interval that is being deleted
-
{EndTime}: The end time of a deleted interval or an interval that is being deleted
-
-
HistoryDeleteAtTime Actions
-
{Time}: The time stamp when the sample was deleted
-
-
History InsertReplace Actions
-
{Value}: The inserted value
-
-
Alarm/Set State Acknowledgment Actions
-
{Comment}: The comment from the user, if available
-
{Acknowledger): The user that is providing the acknowledgment
-
{SourcePointName}: The name of the Point where the alarm was generated
-
{Severity}: The ranking from 0 to 1000
-
{State}: The state of the acknowledgment when it was set
-
Authorization Parameters
-
General/All Actions
-
{Result}: The result of the action (for example,
Good
orBad - Server Failed
) -
{PointName}: The name of the point where the action was executed
-
{MachineName}: The name of the client's computer where the user started the action
-
{ProcessName}: The process on the client's computer (for example, GwxConfigApp.exe) where the user started the action
-
{Performer}: The name of the Performer and the message entered in the authorization dialog
-
{PerformerUserName}: The name of the Performer
-
{PerformerMessage}: The message the Performer entered into the authorization dialog; the message can be localized
-
{Verifier}: The name of the Verifier and the message entered into the authorization dialog
-
{VerifierUserName}: The name of the Verifier
-
{VerifierMessage}: The message of the Verifier entered into the authorization dialog; the message can be localized
-
-
Write Actions
-
{PrevValue}: The previous value before it was written; for authorization, this is the value prior to the time that the Authorization dialog is displayed
-
{NewValue}: The value that is newly written
-
{Comment}: The comment from the writing user, if available
-
-
Dataset Update Actions
-
{PrevValue}: The set of values that identify the row to be updated; when adding a new row, this might be empty
-
{NewValue}: The set of newly written values that might update an existing row or an added row; when empty, the existing row might be deleted
-
-
Method/Procedure Call Actions
-
{MethodName}: The called method or procedure name
-
{InputArguments}: The set of input arguments for a called method or procedure
-
GenEvent Message Examples:
-
Standard
To customize <SucceededMessageFormat /> with Result, PreviousValue, NewValue, and Source, enter the following:
<SucceededMessageFormat>The result: {result}; Previous Value = {prevValue} and New Value = {newValue}; SOURCE {source}.</SucceededMessageFormat>
Which writes the following message:
The result: Good; Previous Value = 12 and New Value = 14; SOURCE GraphWorX.</SucceededMessageFormat>
-
Authorization
To customize <WriteMessageFormat /> with NewValue, PrevValue, PerformerUserName, and MachineName, enter the following:
<WriteMessageFormat>FDA Write: New={NewValue} Previous={PrevValue} Performer={PerformerUserName} Machine={MachineName}.</WriteMessageFormat>
Which writes the following message:
FDA Write: New=55 Previous=0 Performer=icoadmin Machine=icoadmincomputer.
-
-
In your text editor, save the changes.
-
Restart FrameWorX Server.
See Also: