The message log action is used to write messages into an application log. Messages are created from the message class definition in the backend or by entering free text with parameters. The parameters of the messages are filled directly or derived either from context data objects or a nested expression at runtime.
Open the application in the Object Manager
panel.
Under the Detail
section, choose the Contained Objects
tab.
The Contained Objects
tab page opens.
Choose Action
from the Type
field and choose Create Object
.
In the Object Creation
dialog that appears, choose Message Log (Actn)
from the Type
field.
Enter the name of the action.
Choose Create and navigate to object
.
You are directly navigated to the action object that you created.
Note
If you choose Create
, the action object appears under the Contained Objects
tab.
Under the Detail
section, enter the application log object and sub-object.
The Application log object
field and the Application log subobject
field indicate the location
in which the object and the sub-object reside.
Select the external identification type. You can choose from the following:
No External Identification in log
Choose No External Identification in log
External Identification as Free Text Input
Choose External Identification as Free Text Input
.
The free text field appears.
Enter text in the Free Text
field.
External Identification as Reference Object
Choose External Identification as Reference Object
.
The reference object field appears.
Assign reference object. You can select a standard type, an existing data object or an existing expression.
Select a Standard Type
Choose (Graphical Access
).
In the context menu, choose Default Objects
and select the standard type.
Select an Existing Data Object
Choose (Graphical Access
).
In the context menu, choose Other Context Parameter...
In the Context Query
dialog box that appears, select the data object.
Select an Existing Expression
Choose (Graphical Access
).
In the context menu, choose Expressions...
In the Object Query
dialog box that appears, enter the name of the application in the Object Name
field and choose Search
.
The expression appears below the Search
button.
Select the expression.
To save the messages in the database, select the Persist
checkbox.
Choose (Edit
).
A message template appears.
You can use an existing message or create a new message.
Create a New Message
Enter the text for the message.
Choose the type of action message from the Type
field.
The different types of action messages are:
Information
Abort
Error
Status
Warning
Exit
Use an Existing Message
Choose the User Predefined Message
button.
Enter the message class, number and type.
If the message contains any dynamic placeholders, enter the value either directly or use the reference.
Activate the action.
Save the action.
Note
If you want to assign a message with parameters to a message log action, make sure that the parameters used in the message short text are numbered (&1, &2, &3, &4
). Although it is syntactically allowed to omit the numbers, BRFplus will not recognize
such unqualified parameters as a parameter and will display them literally as “&” instead of replacing them with a value.