Question & Answer
Question
How to configure the Java Remedy Gateway to retrieve extra fields from Update Notifications within Remedy ?
Cause
Users of the Java Remedy Gateway may wish to retrieve extra field data back from Remedy when updates are made and have them populate or update their corresponding associated alerts in Omnibus.
Answer
In order to do this the user would need to
Edit the Omnibus Modify Filter in the Remedy Developer Studio and also the Javascript file located in
$OMNIHOME/gates/bmc_remedy/bmc_remedy.notification.js
Example Demonstration
In this example we want to send back the Modified Date values and the Acknowledged Field (typically Yes or No ) values from Remedy back to Omnibus when an update is made to a ticket in Remedy.
In order to do this we need to first edit the Omnibus Modify filter Notification text located in the Developer Studio
from
[M]['$Last-modified-by$'] Node = "$Node$" Serial=$Serial$ Severity=$Status$
to
[M]['$Last-modified-by$'] Node = "$Node$" Serial=$Serial$ Severity=$Status$ RDate= $Modified-date$ RemAck=$Acknowledged$
Notice : how we have added two variables to contain the Remedy Fields $Modified-date$ $Acknowledged$
they are called RDate and RemAck in this example
The user then needs to edit the update function part of the js script file
located in
$OMNIHOME/gates/bmc_remedy/bmc_remedy.notification.js
from this
function update(alert,inputs)
{
try {
// Dates can be parsed using dateformat.parse.
// The format used is as used by the Java SimpleDateFormat class.
//
// Example:
// var resolvetime = dateformat.parse("dd/MM/yyyy' 'HH:mm:ss", inputs.get("ResolveTime"));
values = sog.newrow();
values.put("Severity", inputs.get("Severity"));
alert.update(values);
addJournal(alert, "Ticket updated in Remedy");
} catch(err) {
logError(alert, "Unable to update alert in OMNIbus: " + err);
}
}
to this
function update(alert,inputs)
{
try {
// Dates can be parsed using dateformat.parse.
// The format used is as used by the Java SimpleDateFormat class.
//
// Example:
// var resolvetime = dateformat.parse("dd/MM/yyyy' 'HH:mm:ss", inputs.get("ResolveTime"));
values = sog.newrow();
values.put("Severity", inputs.get("Severity"));
var RemModDate = dateformat.parse("dd/MM/yyyy' 'HH:mm:ss", inputs.get("RDate"));
values.put("RemAckTicket",inputs.get("RemAck"));
alert.update(values);
addJournal(alert, "Ticket updated in Remedy");
} catch(err) {
logError(alert, "Unable to update alert in OMNIbus: " + err);
}
}
Once you make the modifications in the Developer Studio (BMC side) .
This is what you will see in the Alert Text field for that Remedy Ticket Id in Remedy (event that was updated on Remedy side )
[M]['Demo'] Node = "Moscow" Serial=637 Severity=Minor RDate= 14/02/2015 13:04:04 RemAck=No
and what is sent to the Alerts Events Notification Table and also what the Remedy Java Gateway reads data from.
This is what you will see in the gateway log
15/02/15 11:01:45: Debug: [Notifications] Notification text: [M]['Demo'] Node = "Moscow" Serial=637 Severity=Minor RDate= 14/02/2015 13:04:04 RemAck=No
15/02/15 11:01:45: Debug: [Notifications] Notification for request id: 000000000002497
15/02/15 11:01:45: Debug: [Notifications] Update by user Demo
15/02/15 11:01:45: Debug: [Notifications] Node = Moscow
15/02/15 11:01:45: Debug: [Notifications] Serial = 637
15/02/15 11:01:45: Debug: [Notifications] Severity = Minor
15/02/15 11:01:45: Debug: [Notifications] RDate = 14/02/2015 13:04:04
15/02/15 11:01:45: Debug: [Notifications] RemAck = No
15/02/15 11:01:45: Debug: [Notifications] Processing notification.
Product Synonym
nco_g_remedy
Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
swg21697754