Anda di halaman 1dari 5

Gentran:Server for Windows

White Paper
Using the AuditLog Extended Rule
Last revised: November 10, 2005

The information contained in this document represents the current view of Sterling Commerce on the issue discussed as of the date of publication. Because Sterling Commerce must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Sterling Commerce, and Sterling Commerce cannot guarantee the accuracy of any information presented after the date of publication. This document is for informational purposes only. STERLING COMMERCE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. 2002 Sterling Commerce. All rights reserved.

Page 1 of 5

2005 Sterling Commerce. All rights reserved.

Last Revised: November 10, 2005 Author: Amy Peters

Gentran:Server for Windows

TABLE OF CONENTS OVERVIEW.............................................................................................................3


HOW TO CREATE A USER-DEFINED AUDIT LOG MESSAGE..................................................................3 USING THE AUDITLOG EXTENDED RULE.............................................................................................5 MessageID...............................................................................................................................5 Type.........................................................................................................................................5 Key...........................................................................................................................................5 Parameters 4 through 10.........................................................................................................5

Page 2 of 5

2005 Sterling Commerce. All rights reserved.

Last Revised: November 10, 2005 Author: Amy Peters

Gentran:Server for Windows

Overview
The Audit Notification system allows you to create an audit message when you need a message to record a system activity for which Gentran:Server does not have a systemdefined audit message. Audit messages you create are referred to as user-defined audit messages. The AuditLog function enables you to write user-defined audit messages to the GENTRAN:Server Audit Log. When an extended rule that calls an AuditLog operation is executed, it writes the specified user-defined audit message to the Audit Log. How to create a User-Defined Audit Log Message 1. 2. 3. 4. Open GENTRAN Server Configuration. Click the Audit/Notification tab. In the Audit Messages section, click the Messages button. System Response: The Gentran Audit Messages Dialog is displayed. From the File menu select New Audit Message. System Response: Audit Message Definition dialog is displayed.

Page 3 of 5

2005 Sterling Commerce. All rights reserved.

Last Revised: November 10, 2005 Author: Amy Peters

Gentran:Server for Windows Note: The Audit Number is made up of three different numbers: Source, Component, and Message ID. For a user defined Audit Message, the Source and Component are always set to 99, and you supply the Message ID number. 5. Enter a Message ID for your new Audit Message. 6. Select the Location where you want the Audit Message to be written: a. Audit Log b. NT Application Event log c. or both. 7. Select the Severity for this message. 8. Select the Audit Message Type for this message. 9. Enter the Message Text for the Audit Message. If you wish to pass specific information to the Audit Message during translation, then you have to include variables in your message text. An example message text that contains variables to receive data passed to it is: Data for element %1 does not meat criteria. Note: If you need to pass more than on specific item, the next variable used would be %2. The number will increment for each piece of specific information you need to pass in one audit message. Place the variable in the text where you would want the specific information to appear. The AuditLog Extended rule will only pass information up to 7 different variables. Note: The Message ID of a User Defined Audit Message cannot exceed 49999.

Note: Information on creating user-defined audit messages can be found in the AdminGuide.pdf on the Gentran Documentation CD.

Page 4 of 5

2005 Sterling Commerce. All rights reserved.

Last Revised: November 10, 2005 Author: Amy Peters

Gentran:Server for Windows Using the AuditLog Extended Rule The Syntax for this extended rule is as follows: auditlog(MessageID, Type, Key, [, string1] [, string2] [, string3] [, string4] [, string5] [, string6] [, string7]; MessageID The first parameter, MessageID, is the user-defined audit message identifier, which must be an integer value. Type The second parameter, Type, is a keyword that identifies the type of audit message. These pre-defined keywords are valid for GENTRAN:Server: AL_PROC (processing) AL_MSG (message) Note: You may also supply an integer value to account for a type for which a keyword is not currently defined. Key The third parameter, Key, is a keyword that is either zero (if the type of parameter two is AL_PROC) or the identification of a piece of data of the specified type. These predefined keywords are valid for GENTRAN:Server: AL_KEY_INPUT AL_KEY_OUTPUT Note: You may also supply an integer value to account for a key for which a keyword is not currently defined. Parameters 4 through 10 Parameters four through ten are optional string values that the user-defined message may require to fill in variables defined in the audit message. Example1 - Issues a processing message in any map Passes specific information to Audit Message. a. auditlog(MessageID, AL_PROC, 0, N101); Does not pass specific information to Audit Message b. auditlog(MessageID, AL_PROC, 0); Example2 - Issues a data audit for the message, which is currently processing. a. auditlog(MessageID, AL_MSG, 0atoi(param(1)), ...); Note: The AuditLog extended rule is also documented in the Alphabetical Language Reference section of the On-Line Help for mapper.
Page 5 of 5
2005 Sterling Commerce. All rights reserved.

Last Revised: November 10, 2005 Author: Amy Peters

Anda mungkin juga menyukai