Interacting with Operator Messages
Operator messages are generated when errors occur, for example when processes reach the status Error
. For processes, this behavior can be customized in chains with status handlers
and with the System_OperatorMessage process definition. Operator messages are used to provide more information about errors that occur and/or ask the operator which steps to take when in a given situation.
tip
You can reply to job-related operator messages from the context-menu of the related process.
The operator messages monitor gives an overview of all operator messages and their statuses. The operator messages monitor consists of two panes:
- The operator message monitor pane displays a list of all operator messages and their status that match a chosen filter. You can delete and reply to operator messages from the context-menu.
- The operator message detail pane displays data of the currently selected operator message and the ability to delete and reply to operator messages.
The operator messages monitor is part of the Monitoring section in the navigation bar.
The possible reply states are:
- NotRequired - The operator message does not require intervention.
- Required - The operator message does require intervention and must be replied to.
- Replied - An operator has replied to the operator message.
note
Empty replies are not accepted.
Reply expressions can be defined as regular expressions, which force the reply to match the regular expression.
Procedure
To monitor an operator message:
- Choose "Monitoring > Operator Messages".
- Choose the Refresh button to update the monitor.
- Choose an operator message that has a
Reply Status
ofRequired
. - Notice that information regarding this operator message is displayed in the detail pane.
- From the context-menu, choose Reply.
- Depending on the operator message, either a word or phrase must be entered or a value must be chosen.
- Choose or enter a reply.
- Choose the Save and Close button to reply to the message and close the window.
- Notice that the
Reply Status
has changed to Replied.
Values
- Full Text - The text of the operator message.
- Reply status - The reply status of the operator message, if it has been replied to or not.
- Reply - The reply the operator chose.
- Sender Object - The object that raised the operator message.
- Creation Time - The time the operator message was generated.
- Last Modification Time - The last modification time.
Example
Example 1
In the first example, an operator message is generated by a chain named EMEA_SALES_RUN
after it reached status Error
, as defined in its default status handler. The operator navigates to the operator messages monitor and sees an operator message with the following information:
- Creation Time - 3:17:34 PM.
- Title Text - Choose restart option.
- Reply Status - Required.
- Reply - [none, yet].
The operator selects the message and the operator message detail pane displays the following data:
- Full Text - Choose restart option.
- Reply Status - Required.
- Sender Object - EMEA_SALES_RUN_STEP_3.
- Creation Time - 3:17:34 PM.
- Last Modification Time - 3:17:34 PM.
The operator now knows that a chain process in step 3 reached status Error
at 3:17:34 PM today, the step contains the name of the chain so the operator knows it is the EMEA_SALES_RUN
chain that failed. The operator would like to know what happened and chooses the Sender Object EMEA_SALES_RUN_STEP_3
. After investigating the log file, the operator finds that the SAP System is down for emergency maintenance. The operator returns to the operator messages monitor once the SAP System is live again and chooses Reply from the context-menu of the operator message.
The operator chooses the following:
- Action - Restart.
- Restart - Entire Step.
- When - Hold Restarted Step.
The operator sees the following in the operator Message detail pane:
- Full Text - Choose restart option.
- Reply Status - Replied.
- Sender Object - EMEA_SALES_RUN_STEP_3.
- Creation Time - 3:17:34 PM.
- Last Modification Time - 3:27:55 PM.
The operator waits for the SAP Basis team to perform the maintenance and once the SAP system is up again, releases the step in the Process Monitor.
Example 2
Reply to multiple operator messages from within RedwoodScript, note that this script only handles default Active Monitoring Module Operator Messages. Retrieve the operator messages using executeObjectQuery.
Note that the setReply()
method can only be called on persisted operator messages.
{
String query = "select OperatorMessage.* from OperatorMessage";
for (OperatorMessage oMessage : jcsSession.executeObjectQuery(OperatorMessage.TYPE, query))
{
//Check the operator message requires a reply
if (oMessage.getReplyStatus() == ReplyStatus.Required)
{
oMessage.setReply("Acknowledge");
jcsSession.persist();
}
}
}
Example 3
Reply to an operator message from within RedwoodScript
{
//Query and bind parameter values
String query = "select OperatorMessage.* from OperatorMessage where OperatorMessage.FirstText = ?";
String param = "This operator message is a somewhat more complex test";
//Retrieve operator message(s) based on full text
for (OperatorMessage oMessage : jcsSession.executeObjectQuery(OperatorMessage.TYPE, query, new Object[] { param }))
{
//Check the operator message requires a reply
if (oMessage.getReplyStatus() == ReplyStatus.Required)
{
oMessage.setReply("That was hard.");
jcsSession.persist();
}
}
}
Example 4
Reply to multiple operator messages, note that this script does not handle all possible reply expressions, for example \d
.
It does handle the following:
^<option1>|<option2>[|option...]$
- for example chain restart requests, or your own.^<string>$
- such as^Acknowledge$
, the default Active Monitoring Module operator messages.<string>
- any string (\
and|
are prohibited).
Depending on your environment, using switch instead of if/else if
may be faster
{
String query = "select OperatorMessage.* from OperatorMessage";
for (OperatorMessage oMessage : jcsSession.executeObjectQuery(OperatorMessage.TYPE, query))
{
//Check the operator message requires a reply
if (oMessage.getReplyStatus() == ReplyStatus.Required)
{
if (oMessage.getReplyExpression().indexOf("^") == 0 && oMessage.getReplyExpression().indexOf("$") == oMessage.getReplyExpression().length() -1 && oMessage.getReplyExpression().indexOf("|") > 0)
{
//Here you use the first valid answer as a reply, chain operator messages (Request Restart) will be rescheduled to Error
String[] ar = oMessage.getReplyExpression().split("\\|");
//Here you remove \ as these are used in some built-in reply expressions
oMessage.setReply(ar[0].replace("^", "").replace("\\", ""));
}
else if (oMessage.getReplyExpression().indexOf("^") == 0 && oMessage.getReplyExpression().indexOf("$") == oMessage.getReplyExpression().length() -1 && oMessage.getReplyExpression().indexOf("|") == -1)
{
//Here you use the only valid answer as a reply
oMessage.setReply(oMessage.getReplyExpression().replace("^", "").replace("$", ""));
}
else if (oMessage.getReplyExpression().indexOf("\\") == -1 && oMessage.getReplyExpression().indexOf("|") == -1)
{
//Here you use the reply expression as string, we filter out \ and | to avoid special regex expressions like \d; they should be skipped
oMessage.setReply(oMessage.getReplyExpression());
}
jcsSession.persist();
}
}
}
Note that the setReply()
method can only be called on persisted operator messages.