5950d7444f2231000e9fa88ca310c78cxMattersx_xma_xmatters3.7.12Add on to include the Inform with xMatters functionalityInform with xMatters89eb07610fb3320037edb97ce1050e24loadedsys_remote_update_setadmin2017-07-06 22:40:325b0c83ed0f73320037edb97ce1050e2d0admin2017-07-06 22:40:32INSERT_OR_UPDATE5950d7444f2231000e9fa88ca310c78ccustomersys_documentation_x_xma_xmatters_inform_with_xmatters_services_enservicesenx_xma_xmatters_inform_with_xmattersServicessys_documentationadmin2017-03-07 17:59:32false9f5347a2dbd1b200a34fd421cf9619160Services5950d7444f2231000e9fa88ca310c78cfalse5950d7444f2231000e9fa88ca310c78csys_documentation_x_xma_xmatters_inform_with_xmatters_services_enadmin2017-03-07 17:59:32]]>5b0c83ed0f73320037edb97ce1050e2dfalseadmin2017-07-06 22:40:32130c07610fb3320037edb97ce1050ef80admin2017-07-06 22:40:32
x_xma_xmatters_inform_with_xmatters
Inform with xMatters.ServicesField LabelglobalINSERT_OR_UPDATE5950d7444f2231000e9fa88ca310c78ccustomersys_script_0039cb62dbd1b200a34fd421cf961980<?xml version="1.0" encoding="UTF-8"?><record_update sys_domain="global" table="sys_script"><sys_script action="INSERT_OR_UPDATE"><abort_action>false</abort_action><access>package_private</access><action_delete>false</action_delete><action_insert>true</action_insert><action_query>false</action_query><action_update>false</action_update><active>true</active><add_message>false</add_message><advanced>true</advanced><change_fields>false</change_fields><client_callable>false</client_callable><collection>x_xma_xmatters_inform_with_xmatters</collection><condition/><description/><execute_function>false</execute_function><filter_condition/><is_rest>false</is_rest><message/><name>xMatters Inform</name><order>100</order><priority>100</priority><rest_method/><rest_method_text/><rest_service/><rest_service_text/><rest_variables/><role_conditions/><script><![CDATA[(function executeRule(current, previous /*null when async*/) {
var config = new xMattersConfigExtended(),
log = new xMattersLogger( config.LOGLEVEL, 'xMatters Inform BR');
log.debug( 'Sending xM Inform on insert.' );
var xMInform = new xMattersInform();
var result = xMInform.sendInform( current );
})(current, previous);]]></script><sys_class_name>sys_script</sys_class_name><sys_created_by>admin</sys_created_by><sys_created_on>2017-03-07 18:26:05</sys_created_on><sys_customer_update>true</sys_customer_update><sys_domain>global</sys_domain><sys_domain_path>/</sys_domain_path><sys_id>0039cb62dbd1b200a34fd421cf961980</sys_id><sys_mod_count>2</sys_mod_count><sys_name>xMatters Inform</sys_name><sys_overrides/><sys_package display_value="xMatters" source="x_xma_xmatters">5950d7444f2231000e9fa88ca310c78c</sys_package><sys_policy/><sys_replace_on_upgrade>false</sys_replace_on_upgrade><sys_scope display_value="xMatters">5950d7444f2231000e9fa88ca310c78c</sys_scope><sys_update_name>sys_script_0039cb62dbd1b200a34fd421cf961980</sys_update_name><sys_updated_by>admin</sys_updated_by><sys_updated_on>2017-03-07 19:05:02</sys_updated_on><template/><when>async</when></sys_script><sys_translated_text action="delete_multiple" query="documentkey=0039cb62dbd1b200a34fd421cf961980"/></record_update>5b0c83ed0f73320037edb97ce1050e2dfalseadmin2017-07-06 22:40:32130c07610fb3320037edb97ce1050ef90admin2017-07-06 22:40:32
Inform with xMattersForm LayoutglobalINSERT_OR_UPDATE5950d7444f2231000e9fa88ca310c78ccustomersys_dictionary_x_xma_xmatters_inform_with_xmatters_services<?xml version="1.0" encoding="UTF-8"?><record_update><sys_dictionary action="INSERT_OR_UPDATE" element="services" table="x_xma_xmatters_inform_with_xmatters"><active>true</active><array>false</array><attributes/><audit>false</audit><calculation><![CDATA[(function calculatedFieldValue(current) {
// Add your code here
return ''; // return the calculated value
})(current);]]></calculation><choice/><choice_field/><choice_table/><column_label>Services</column_label><comments/><create_roles/><default_value/><defaultsort/><delete_roles/><dependent/><dependent_on_field/><display>false</display><dynamic_creation>false</dynamic_creation><dynamic_creation_script/><dynamic_default_value/><dynamic_ref_qual/><element>services</element><element_reference>false</element_reference><foreign_database/><internal_type display_value="String">string</internal_type><mandatory>false</mandatory><max_length>1000</max_length><name>x_xma_xmatters_inform_with_xmatters</name><next_element/><primary>false</primary><read_only>false</read_only><read_roles/><reference/><reference_cascade_rule/><reference_floats>false</reference_floats><reference_key/><reference_qual/><reference_qual_condition/><reference_type/><sizeclass/><spell_check>false</spell_check><staged>false</staged><sys_class_name>sys_dictionary</sys_class_name><sys_created_by>admin</sys_created_by><sys_created_on>2017-03-07 17:59:31</sys_created_on><sys_customer_update>true</sys_customer_update><sys_id>6ab2cb62dbd1b200a34fd421cf96194c</sys_id><sys_mod_count>0</sys_mod_count><sys_name>Services</sys_name><sys_package display_value="xMatters" source="x_xma_xmatters">5950d7444f2231000e9fa88ca310c78c</sys_package><sys_policy/><sys_replace_on_upgrade>false</sys_replace_on_upgrade><sys_scope display_value="xMatters">5950d7444f2231000e9fa88ca310c78c</sys_scope><sys_update_name>sys_dictionary_x_xma_xmatters_inform_with_xmatters_services</sys_update_name><sys_updated_by>admin</sys_updated_by><sys_updated_on>2017-03-07 17:59:31</sys_updated_on><table_reference>false</table_reference><text_index>false</text_index><unique>false</unique><use_dependent_field>false</use_dependent_field><use_dynamic_default>false</use_dynamic_default><use_reference_qualifier>simple</use_reference_qualifier><virtual>false</virtual><widget/><write_roles/><xml_view>false</xml_view></sys_dictionary></record_update>5b0c83ed0f73320037edb97ce1050e2dfalseadmin2017-07-06 22:40:321b0c07610fb3320037edb97ce1050ef70admin2017-07-06 22:40:32
x_xma_xmatters_inform_with_xmatters
x_xma_xmatters_inform_with_xmatters.servicesDictionaryglobalINSERT_OR_UPDATE5950d7444f2231000e9fa88ca310c78ccustomersys_properties_a3bf9655db1d3200a34fd421cf961964Semicolon separated list of available servicesfalsefalsex_xma_xmatters.inform.servicesinform.servicessys_propertiesadmin2017-03-03 18:11:40truea3bf9655db1d3200a34fd421cf9619641x_xma_xmatters.inform.services5950d7444f2231000e9fa88ca310c78cfalse5950d7444f2231000e9fa88ca310c78csys_properties_a3bf9655db1d3200a34fd421cf961964admin2017-03-08 23:58:12stringService1;Service2;Email;Chat;Support site]]>5b0c83ed0f73320037edb97ce1050e2dfalseadmin2017-07-06 22:40:321b0c07610fb3320037edb97ce1050ef80admin2017-07-06 22:40:32
x_xma_xmatters.inform.servicesSystem PropertyglobalINSERT_OR_UPDATE5950d7444f2231000e9fa88ca310c78ccustomersys_security_acl_c75307a2dbd1b200a34fd421cf9619f4truetruefalseDefault access control on x_xma_xmatters_inform_with_xmattersx_xma_xmatters_inform_with_xmattersreadsys_security_acladmin2017-03-07 17:59:31truec75307a2dbd1b200a34fd421cf9619f40x_xma_xmatters_inform_with_xmatters5950d7444f2231000e9fa88ca310c78cfalse5950d7444f2231000e9fa88ca310c78csys_security_acl_c75307a2dbd1b200a34fd421cf9619f4admin2017-03-07 17:59:31record]]>5b0c83ed0f73320037edb97ce1050e2dfalseadmin2017-07-06 22:40:321b0c07610fb3320037edb97ce1050ef90admin2017-07-06 22:40:32
x_xma_xmatters_inform_with_xmatters.itilAccess RolesglobalINSERT_OR_UPDATE5950d7444f2231000e9fa88ca310c78ccustomersys_app_module_835307a2dbd1b200a34fd421cf9619f1true1b9f490f7b02f1008e0b707d784d4d81LISTInform with xMattersMobilex_xma_xmatters_inform_with_xmatters611falseitiltruesys_app_moduleadmin2017-03-07 17:59:31trueglobal/835307a2dbd1b200a34fd421cf9619f12Inform with xMatters Records5950d7444f2231000e9fa88ca310c78cfalse5950d7444f2231000e9fa88ca310c78csys_app_module_835307a2dbd1b200a34fd421cf9619f1admin2017-03-08 18:57:53Inform with xMatters Recordsfalse]]>5b0c83ed0f73320037edb97ce1050e2dfalseadmin2017-07-06 22:40:321f0c83ed0f73320037edb97ce1050e2d0admin2017-07-06 22:40:32
x_xma_xmatters_inform_with_xmatters
Inform with xMatters RecordsModuleglobalINSERT_OR_UPDATE5950d7444f2231000e9fa88ca310c78ccustomersys_documentation_x_xma_xmatters_inform_with_xmatters_update_enupdateenx_xma_xmatters_inform_with_xmattersUpdatessys_documentationadmin2017-03-07 17:59:32falsed75347a2dbd1b200a34fd421cf9619170Update5950d7444f2231000e9fa88ca310c78cfalse5950d7444f2231000e9fa88ca310c78csys_documentation_x_xma_xmatters_inform_with_xmatters_update_enadmin2017-03-07 17:59:32]]>5b0c83ed0f73320037edb97ce1050e2dfalseadmin2017-07-06 22:40:32530c07610fb3320037edb97ce1050ef80admin2017-07-06 22:40:32
x_xma_xmatters_inform_with_xmatters
Inform with xMatters.UpdateField LabelglobalINSERT_OR_UPDATE5950d7444f2231000e9fa88ca310c78ccustomersys_script_include_1ea6139ddb5d3200a34fd421cf9619d1<?xml version="1.0" encoding="UTF-8"?><record_update table="sys_script_include"><sys_script_include action="INSERT_OR_UPDATE"><access>package_private</access><active>true</active><api_name>x_xma_xmatters.xMattersAjaxExtended</api_name><client_callable>true</client_callable><description/><name>xMattersAjaxExtended</name><script><![CDATA[gs.include("xMattersConfigExtended");
gs.include( "xMattersAjaxEngage" );
var xMattersAjaxExtended = Class.create();
// Object.extendsObject apparently only takes 2 parameters,
// so to add more than two objects, we call this twice.
xMattersAjaxExtended.prototype = Object.extendsObject( global.AbstractAjaxProcessor, Object.extendsObject( new xMattersAjaxEngage(), {
/**
* Submits a new Inform with xMatters record in ServiceNow (note that this does not perform any communication between ServiceNow and xMatters)
* When called from glide ajax, must have a stringified "form_data" parameter. This parameter should look like the following:
* {
* }
*
* @return {String} A stringified JSON object with the following details:
* {
* "success": true or false depending on whether the submission was successful,
* "error": only present if "success" = false - a string describing what went wrong,
* "data": only present if "success" = true - an object with the following properties:
* {
* "sys_id": the id of the new Engage with xMatters record
* }
* }
*/
submitInformWithXMatters: function() {
var response;
try {
var form_data = this.getParameter( 'form_data' );
var formData = new global.JSON().decode( form_data );
var informRequest = new GlideRecord( 'x_xma_xmatters_inform_with_xmatters' );
informRequest.initialize();
informRequest.business_impact = formData.business_impact;
informRequest.first_reported = formData.first_reported.replace( /T/g, ' ' );
informRequest.locations = formData.locations;
informRequest.services = formData.services;
informRequest.update = formData.update;
informRequest.update_type = formData.update_type;
informRequest.parent_incident = formData.parent_incident;
informRequest.insert();
response = {
success: true,
data: { sys_id: String( informRequest.sys_id ) }
};
} catch( e ) {
response = {
success: false,
error: String( e )
};
}
return new global.JSON().encode( response );
},
getLocations: function() {
var conf = new xMattersConfigExtended();
response = {
success: true,
data: conf.INFORM.LOCATIONS.LIST
};
return new global.JSON().encode( response );
},
getServices: function() {
var conf = new xMattersConfigExtended();
response = {
success: true,
data: conf.INFORM.SERVICES.LIST
};
return new global.JSON().encode( response );
},
getIncident: function() {
var sys_id = this.getParameter( 'sysparm_sys_id' );
var rec = new GlideRecord( 'incident' );
rec.get( sys_id );
var fields = [ 'number', 'short_description' ];
response = {
success: true,
data: this._getIncFields( fields, rec )
};
return new global.JSON().encode( response );
},
// There isn't a GlideRecord.toJSON function, so
// we'll fake it by just grabbing a handful of fields
_getIncFields: function( fields, rec ) {
var resp = {};
for( var f in fields ) {
key = fields[f];
val = rec[ fields[f] ].getDisplayValue();
gs.info( 'Key: ' + key + '. Val: ' + val );
resp[ key ] = val;
}
return resp;
},
type: 'xMattersAjaxExtended'
}));]]></script><sys_class_name>sys_script_include</sys_class_name><sys_created_by>admin</sys_created_by><sys_created_on>2017-03-03 22:31:13</sys_created_on><sys_customer_update>true</sys_customer_update><sys_id>1ea6139ddb5d3200a34fd421cf9619d1</sys_id><sys_mod_count>36</sys_mod_count><sys_name>xMattersAjaxExtended</sys_name><sys_package display_value="xMatters" source="x_xma_xmatters">5950d7444f2231000e9fa88ca310c78c</sys_package><sys_policy/><sys_replace_on_upgrade>false</sys_replace_on_upgrade><sys_scope display_value="xMatters">5950d7444f2231000e9fa88ca310c78c</sys_scope><sys_update_name>sys_script_include_1ea6139ddb5d3200a34fd421cf9619d1</sys_update_name><sys_updated_by>admin</sys_updated_by><sys_updated_on>2017-03-08 19:09:48</sys_updated_on></sys_script_include></record_update>5b0c83ed0f73320037edb97ce1050e2dfalseadmin2017-07-06 22:40:32530c07610fb3320037edb97ce1050ef90admin2017-07-06 22:40:32
xMattersAjaxExtendedScript IncludeglobalINSERT_OR_UPDATE5950d7444f2231000e9fa88ca310c78ccustomersys_ui_page_ac8a4a09dbd53200a34fd421cf961974<?xml version="1.0" encoding="UTF-8"?><record_update table="sys_ui_page"><sys_ui_page action="INSERT_OR_UPDATE"><category>general</category><client_script/><description>This is just the wrapper page. The angular in the xm_inform_with_xmatters_content ui page interferes(?) with other angular? so we wrap it in an iframe. </description><direct>false</direct><endpoint>x_xma_xmatters_xm_inform_with_xmatters.do</endpoint><html><![CDATA[<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<style>
/* Extra small devices (phones, less than 768px) */
/* No media query since this is the default in Bootstrap */
.xm-dialog-form {
width: 400px;
height: 650px;
}
/* Small devices (tablets, 768px and up) */
@media (min-width: 768px) {
.xm-dialog-form {
width: 500px;
height: 650px;
}
}
/* Medium devices (desktops, 992px and up) */
@media (min-width: 992px) {
.xm-dialog-form {
width: 700px;
height: 650px;
}
}
/* Large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
.xm-dialog-form {
width: 750px;
height: 650px;
}
}
.xm-embed-iframe {
height: 100%;
}
</style>
<div class="xm-dialog-form">
<div class="embed-responsive xm-embed-iframe">
<iframe name="dialog_frame" id="dialog_frame" src="/x_xma_xmatters_xm_inform_with_xmatters_content.do?sysparm_nostack=true&incident_id=${HTML:sysparm_sysID}" class="embed-responsive-item"></iframe>
</div>
</div>
<script>
(function() {
var childMessageListener = function(event) {
if( event.origin !== window.location.origin ) {
console.log("Received message from unexpected origin: " + event.origin);
return;
} else {
var data = event.data;
if(data.type === 'DIALOG_CLOSE') {
if(data.message) {
g_form.addInfoMessage(data.message);
console.log( 'addInfoMessage sent' );
}
GlideDialogWindow.get().destroy();
} else {
console.log("Unhandled message type: " + data.type);
}
}
}
if(window.addEventListener) {
addEventListener('message', childMessageListener, false);
} else {
attachEvent("onmessage", childMessageListener);
}
})();
</script>
</j:jelly>]]></html><name>xm_inform_with_xmatters</name><processing_script/><sys_class_name>sys_ui_page</sys_class_name><sys_created_by>admin</sys_created_by><sys_created_on>2017-03-02 22:04:05</sys_created_on><sys_customer_update>true</sys_customer_update><sys_id>ac8a4a09dbd53200a34fd421cf961974</sys_id><sys_mod_count>18</sys_mod_count><sys_name>xm_inform_with_xmatters</sys_name><sys_package display_value="xMatters" source="x_xma_xmatters">5950d7444f2231000e9fa88ca310c78c</sys_package><sys_policy/><sys_replace_on_upgrade>false</sys_replace_on_upgrade><sys_scope display_value="xMatters">5950d7444f2231000e9fa88ca310c78c</sys_scope><sys_update_name>sys_ui_page_ac8a4a09dbd53200a34fd421cf961974</sys_update_name><sys_updated_by>admin</sys_updated_by><sys_updated_on>2017-03-08 23:26:19</sys_updated_on></sys_ui_page></record_update>5b0c83ed0f73320037edb97ce1050e2dfalseadmin2017-07-06 22:40:32530c07610fb3320037edb97ce1050efa0admin2017-07-06 22:40:32
xm_inform_with_xmattersUI PageglobalINSERT_OR_UPDATE5950d7444f2231000e9fa88ca310c78ccustomersys_dictionary_x_xma_xmatters_inform_with_xmatters_null<?xml version="1.0" encoding="UTF-8"?><record_update><sys_dictionary action="INSERT_OR_UPDATE" element="" table="x_xma_xmatters_inform_with_xmatters"><active>true</active><array>false</array><attributes/><audit>false</audit><calculation><![CDATA[(function calculatedFieldValue(current) {
// Add your code here
return ''; // return the calculated value
})(current);]]></calculation><choice/><choice_field/><choice_table/><column_label/><comments/><create_roles/><default_value/><defaultsort/><delete_roles/><dependent/><dependent_on_field/><display>false</display><dynamic_creation>false</dynamic_creation><dynamic_creation_script/><dynamic_default_value/><dynamic_ref_qual/><element/><element_reference>false</element_reference><foreign_database/><internal_type display_value="Collection">collection</internal_type><mandatory>false</mandatory><max_length>40</max_length><name>x_xma_xmatters_inform_with_xmatters</name><next_element/><primary>false</primary><read_only>false</read_only><read_roles/><reference/><reference_cascade_rule/><reference_floats>false</reference_floats><reference_key/><reference_qual/><reference_qual_condition/><reference_type/><sizeclass/><spell_check>false</spell_check><staged>false</staged><sys_class_name>sys_dictionary</sys_class_name><sys_created_by>admin</sys_created_by><sys_created_on>2017-03-07 17:59:32</sys_created_on><sys_customer_update>true</sys_customer_update><sys_id>435307a2dbd1b200a34fd421cf9619f9</sys_id><sys_mod_count>0</sys_mod_count><sys_name>x_xma_xmatters_inform_with_xmatters</sys_name><sys_package display_value="xMatters" source="x_xma_xmatters">5950d7444f2231000e9fa88ca310c78c</sys_package><sys_policy/><sys_replace_on_upgrade>false</sys_replace_on_upgrade><sys_scope display_value="xMatters">5950d7444f2231000e9fa88ca310c78c</sys_scope><sys_update_name>sys_dictionary_x_xma_xmatters_inform_with_xmatters_null</sys_update_name><sys_updated_by>admin</sys_updated_by><sys_updated_on>2017-03-07 17:59:32</sys_updated_on><table_reference>false</table_reference><text_index>false</text_index><unique>false</unique><use_dependent_field>false</use_dependent_field><use_dynamic_default>false</use_dynamic_default><use_reference_qualifier>simple</use_reference_qualifier><virtual>false</virtual><widget/><write_roles/><xml_view>false</xml_view></sys_dictionary></record_update>5b0c83ed0f73320037edb97ce1050e2dfalseadmin2017-07-06 22:40:32530c83ed0f73320037edb97ce1050e2e0admin2017-07-06 22:40:32
x_xma_xmatters_inform_with_xmatters
Inform with xMattersDictionaryglobalINSERT_OR_UPDATE5950d7444f2231000e9fa88ca310c78ccustomersys_properties_184f9255db1d3200a34fd421cf9619feInform with xMatters Form Endpoint: specifies the REST URL endpoint for the ServiceNow Communication Plan's Inform with xMatters form
falsefalsex_xma_xmatters.inform.endpointinform.endpointsys_propertiesadmin2017-03-03 18:09:52true184f9255db1d3200a34fd421cf9619fe3x_xma_xmatters.inform.endpoint5950d7444f2231000e9fa88ca310c78cfalse5950d7444f2231000e9fa88ca310c78csys_properties_184f9255db1d3200a34fd421cf9619feadmin2017-03-08 23:58:12stringhttps://yourinstance.hosted.xmatters.com/reapi/2015-04-01/forms/UUID/triggers]]>5b0c83ed0f73320037edb97ce1050e2dfalseadmin2017-07-06 22:40:32570c07610fb3320037edb97ce1050ef80admin2017-07-06 22:40:32
x_xma_xmatters.inform.endpointSystem PropertyglobalINSERT_OR_UPDATE5950d7444f2231000e9fa88ca310c78ccustomersys_security_acl_035307a2dbd1b200a34fd421cf9619f6truetruefalseDefault access control on x_xma_xmatters_inform_with_xmattersx_xma_xmatters_inform_with_xmatterswritesys_security_acladmin2017-03-07 17:59:31true035307a2dbd1b200a34fd421cf9619f60x_xma_xmatters_inform_with_xmatters5950d7444f2231000e9fa88ca310c78cfalse5950d7444f2231000e9fa88ca310c78csys_security_acl_035307a2dbd1b200a34fd421cf9619f6admin2017-03-07 17:59:31record]]>5b0c83ed0f73320037edb97ce1050e2dfalseadmin2017-07-06 22:40:32570c07610fb3320037edb97ce1050ef90admin2017-07-06 22:40:32
Inform with xMatters.LocationsField LabelglobalINSERT_OR_UPDATE5950d7444f2231000e9fa88ca310c78ccustomersys_properties_category_m2m_b97f1ed1db1d3200a34fd421cf96190d562f1255db1d3200a34fd421cf9619a5200e26f1655db1d3200a34fd421cf961921sys_properties_category_m2madmin2017-03-03 18:10:17falseb97f1ed1db1d3200a34fd421cf96190d1x_xma_xmatters.inform.locations.xMInformProperties5950d7444f2231000e9fa88ca310c78cfalse5950d7444f2231000e9fa88ca310c78csys_properties_category_m2m_b97f1ed1db1d3200a34fd421cf96190dadmin2017-03-03 18:11:12]]>5b0c83ed0f73320037edb97ce1050e2dfalseadmin2017-07-06 22:40:325f0c07610fb3320037edb97ce1050ef80admin2017-07-06 22:40:32
x_xma_xmatters.inform.locations.xMInformPropertiesCategory PropertyglobalINSERT_OR_UPDATE5950d7444f2231000e9fa88ca310c78ccustomersys_ui_action_93801289dbd53200a34fd421cf9619e3<?xml version="1.0" encoding="UTF-8"?><record_update sys_domain="global" table="sys_ui_action"><sys_ui_action action="INSERT_OR_UPDATE"><action_name/><active>true</active><client>true</client><comments>Send Inform with xMatters update</comments><condition/><form_action>true</form_action><form_button>true</form_button><form_context_menu>false</form_context_menu><form_link>false</form_link><hint/><list_action>false</list_action><list_banner_button>false</list_banner_button><list_button>false</list_button><list_choice>false</list_choice><list_context_menu>false</list_context_menu><list_link>false</list_link><list_save_with_form_button>false</list_save_with_form_button><name>Inform with xMatters</name><onclick>informWithXMatters()</onclick><order>106</order><script><![CDATA[var xmInform = {};
function informWithXMatters() {
var incidentId = g_form.getUniqueValue();
// console.log( 'dialog: ' + g_scratchpad.appPrefix + '_xm_inform_with_xmatters' );
xmInform.incident = incidentId;
var dialog = new GlideDialogWindow( 'x_xma_xmatters_xm_inform_with_xmatters' );
dialog.setTitle( "" );
dialog.setPreference( "sysparm_nostack", true );
dialog.setPreference( "sysparm_sysID", incidentId );
dialog.setPreference( "incident.number" );
dialog.render();
}]]></script><show_insert>false</show_insert><show_multiple_update>false</show_multiple_update><show_query>false</show_query><show_update>true</show_update><sys_class_name>sys_ui_action</sys_class_name><sys_created_by>admin</sys_created_by><sys_created_on>2017-03-02 22:30:22</sys_created_on><sys_customer_update>true</sys_customer_update><sys_domain>global</sys_domain><sys_domain_path>/</sys_domain_path><sys_id>93801289dbd53200a34fd421cf9619e3</sys_id><sys_mod_count>15</sys_mod_count><sys_name>Inform with xMatters</sys_name><sys_overrides/><sys_package display_value="xMatters" source="x_xma_xmatters">5950d7444f2231000e9fa88ca310c78c</sys_package><sys_policy/><sys_replace_on_upgrade>false</sys_replace_on_upgrade><sys_scope display_value="xMatters">5950d7444f2231000e9fa88ca310c78c</sys_scope><sys_update_name>sys_ui_action_93801289dbd53200a34fd421cf9619e3</sys_update_name><sys_updated_by>admin</sys_updated_by><sys_updated_on>2017-03-07 02:17:53</sys_updated_on><table>incident</table><ui11_compatible>true</ui11_compatible><ui16_compatible>false</ui16_compatible></sys_ui_action></record_update>5b0c83ed0f73320037edb97ce1050e2dfalseadmin2017-07-06 22:40:325f0c07610fb3320037edb97ce1050ef90admin2017-07-06 22:40:32
incident
Inform with xMattersUI ActionglobalINSERT_OR_UPDATE5950d7444f2231000e9fa88ca310c78ccustomersys_db_object_30a1cb62dbd1b200a34fd421cf961949publicfalsefalsefalsefalsetruetruefalsefalsefalsex_xma_xmatters_inform_with_xmatters575347a2dbd1b200a34fd421cf96192dtruesys_db_objectadmin2017-03-07 17:59:31true30a1cb62dbd1b200a34fd421cf9619491Inform with xMatters5950d7444f2231000e9fa88ca310c78cfalse5950d7444f2231000e9fa88ca310c78csys_db_object_30a1cb62dbd1b200a34fd421cf961949admin2017-03-07 17:59:33true282bf1fac6112285017366cb5f867469true]]>5b0c83ed0f73320037edb97ce1050e2dfalseadmin2017-07-06 22:40:325f0c83ed0f73320037edb97ce1050e2d0admin2017-07-06 22:40:32
x_xma_xmatters_inform_with_xmatters
Inform with xMattersTableglobalINSERT_OR_UPDATE5950d7444f2231000e9fa88ca310c78ccustomersys_documentation_x_xma_xmatters_inform_with_xmatters_update_type_enupdate_typeenx_xma_xmatters_inform_with_xmattersUpdate Typessys_documentationadmin2017-03-07 17:59:32false135347a2dbd1b200a34fd421cf9619180Update Type5950d7444f2231000e9fa88ca310c78cfalse5950d7444f2231000e9fa88ca310c78csys_documentation_x_xma_xmatters_inform_with_xmatters_update_type_enadmin2017-03-07 17:59:32]]>5b0c83ed0f73320037edb97ce1050e2dfalseadmin2017-07-06 22:40:32930c07610fb3320037edb97ce1050ef80admin2017-07-06 22:40:32
x_xma_xmatters_inform_with_xmatters
Inform with xMatters.Update TypeField LabelglobalINSERT_OR_UPDATE5950d7444f2231000e9fa88ca310c78ccustomersys_script_include_624ba141dbd53200a34fd421cf96194b<?xml version="1.0" encoding="UTF-8"?><record_update table="sys_script_include"><sys_script_include action="INSERT_OR_UPDATE"><access>public</access><active>true</active><api_name>x_xma_xmatters.xMattersConfigExtended</api_name><client_callable>false</client_callable><description/><name>xMattersConfigExtended</name><script><![CDATA[gs.include("xMattersConfig");
var xMattersConfigExtended = Class.create();
// We'll extend the xMattersConfig class so that we can inherit all
// the good stuff there. We can then reference like so:
// 'SNAPI.hostname: ' + this.SNAPI.hostname
xMattersConfigExtended.prototype = Object.extend( new xMattersConfig(), {
initialize: function() {
var prefix = gs.getCurrentScopeName();
this.INFORM = {
ENABLED: true,
FORM: gs.getProperty(prefix + '.inform.endpoint'),
LOCATIONS: {
LIST: gs.getProperty(prefix + '.inform.locations'),
UUID: gs.getProperty(prefix + '.inform.locations.uuid')
},
SERVICES: {
LIST: gs.getProperty(prefix + '.inform.services'),
UUID: gs.getProperty(prefix + '.inform.services.uuid')
}
};
},
type: 'xMattersConfigExtended'
});
]]></script><sys_class_name>sys_script_include</sys_class_name><sys_created_by>admin</sys_created_by><sys_created_on>2017-03-02 20:12:44</sys_created_on><sys_customer_update>true</sys_customer_update><sys_id>624ba141dbd53200a34fd421cf96194b</sys_id><sys_mod_count>3</sys_mod_count><sys_name>xMattersConfigExtended</sys_name><sys_package display_value="xMatters" source="x_xma_xmatters">5950d7444f2231000e9fa88ca310c78c</sys_package><sys_policy/><sys_replace_on_upgrade>false</sys_replace_on_upgrade><sys_scope display_value="xMatters">5950d7444f2231000e9fa88ca310c78c</sys_scope><sys_update_name>sys_script_include_624ba141dbd53200a34fd421cf96194b</sys_update_name><sys_updated_by>admin</sys_updated_by><sys_updated_on>2017-03-06 22:24:09</sys_updated_on></sys_script_include></record_update>5b0c83ed0f73320037edb97ce1050e2dfalseadmin2017-07-06 22:40:32930c07610fb3320037edb97ce1050ef90admin2017-07-06 22:40:32
xMattersConfigExtendedScript IncludeglobalINSERT_OR_UPDATE5950d7444f2231000e9fa88ca310c78ccustomersys_ui_script_2e509281dbd53200a34fd421cf961966<?xml version="1.0" encoding="UTF-8"?><record_update table="sys_ui_script"><sys_ui_script action="INSERT_OR_UPDATE"><active>true</active><description>
INFORM!</description><global>false</global><name>x_xma_xmatters.xm_app_inform_xmatters</name><script><![CDATA[var informApp = angular.module('xm.inform-xm', [ 'ngTagsInput', 'ngMessages', 'pascalprecht.translate', 'xm.xmatters-service', 'xm.location-service', 'xm.glide-ajax', 'ui.bootstrap' ]);
// Global configuration for ng tags input module
informApp.config(function(tagsInputConfigProvider) {
tagsInputConfigProvider.setDefaults('tagsInput', {
replaceSpacesWithDashes: false,
addFromAutocompleteOnly: true
}).setDefaults('autoComplete', {
minLength: 1
});
});
// Configuration for translations
informApp.config(function ($translateProvider) {
$translateProvider.translations('en', {
INFORM_XM: {
TITLE: 'Inform with xMatters',
LABEL: {
UPDATE_TYPE: 'Update Type',
PARENT_INCIDENT: 'Parent Incident',
BUSINESS_IMPACT: 'Business Impact',
UPDATE: 'Update',
FIRST_REPORTED: 'First Reported',
LOCATIONS: 'Locations',
SERVICES: 'Services'
},
BUTTON: {
SUBMIT: 'Submit',
CANCEL: 'Cancel'
},
ERROR: {
REQUIRED: 'Required field',
MAX_LENGTH: 'Maximum length {{max_length}} characters'
},
MESSAGE: {
SUCCESS: 'Your request has been submitted successfully. To track the progress of this request in ServiceNow, view the Inform with xMatters record.'
},
OPTIONS: {
}
}
});
$translateProvider.preferredLanguage('en');
});
informApp.controller('informCtlr',
function($scope, $window, $translate, $q, $filter, XMService, LocationService, GlideAjax) {
// Core scope variables
$scope.is_finished = false;
$scope.is_invalid = false;
$scope.global_errors = [];
// form model scope variables and default values
$scope.business_impact = '';
$scope.update = '';
$scope.first_reported = '';
// result scope variable
$scope.engage_url = '';
// behind the scenes scope variables used for options/state
$scope.xm_search_state = XMService.searchState;
$scope.update_type_options = [
{ "label": "-- None --", "value": null },
{ "label": "Initial", "value": "Initial" },
{ "label": "Bridge", "value": "Bridge" },
{ "label": "Update", "value": "Update" },
{ "label": "Resolved", "value": "Resolved" }
];
$scope.locations = [];
$scope.services = [];
$scope.allLocations = [];
$scope.allServices = [];
// Set the incident id scope variable based on search parameters in the url
$scope.incident_id = LocationService.searchParams.incident_id;
if( typeof $scope.incident_id === 'undefined' || $scope.incident_id === null || $scope.incident_id === '' ) {
console.log( 'No incident identifier was defined' );
$scope.global_errors.push( 'Missing "incident_id" parameter: A valid ServiceNow Incident system id must be set to continue' );
}
var retrieveIncident = new GlideAjax( 'xMattersAjaxExtended' );
retrieveIncident.addParam( 'sysparm_name', 'getIncident' );
retrieveIncident.addParam( 'sysparm_sys_id', $scope.incident_id );
retrieveIncident.send().then( function( resp ) {
if( resp.success ) {
$scope.incident = resp.data;
} else {
console.log( 'Error getting Incident: ' + JSON.stringify( resp ) );
}
});
// Options for the date picker
// See here for details: https://angular-ui.github.io/bootstrap/#!#datepicker
$scope.dateOptions = {
//maxDate: new Date(), // Set min and max selectable dates
//minDate: new Date()
};
$scope.first_reported = new Date();
$scope.openCalendarPopup = function() {
$scope.calendarPopup.opened = true;
};
$scope.calendarPopup = {
opened: false
};
var retrieveLocations = new GlideAjax( 'xMattersAjaxExtended' );
retrieveLocations.addParam( 'sysparm_name', 'getLocations' );
retrieveLocations.send().then( function( resp ){
if( resp.success ) {
var locationsTemp = resp.data.split( ';' );
for( var i = 0; i < locationsTemp.length; i++ ) {
if( locationsTemp[i].trim().length > 0 ) {
$scope.allLocations.push( {"text": locationsTemp[i] } );
}
}
} else {
console.log( 'Error getting Locations: ' + resp );
}
} );
//$scope.allLocations = OptionsProviderExtended.locations;
var retrieveServices = new GlideAjax( 'xMattersAjaxExtended' );
retrieveServices.addParam( 'sysparm_name', 'getServices' );
retrieveServices.send().then( function( resp ){
if( resp.success ) {
var servicesTemp = resp.data.split( ';' );
for( var i = 0; i < servicesTemp.length; i++ ) {
if( servicesTemp[i].trim().length > 0 ) {
$scope.allServices.push( {"text": servicesTemp[i] } );
}
}
} else {
console.log( 'Error getting Services: ' + resp );
}
} );
$scope.getLocations = function( query ) {
var deferred = $q.defer();
deferred.resolve( $filter('filter')($scope.allLocations, query) );
return deferred.promise;
};
$scope.getServices = function( query ) {
var deferred = $q.defer();
deferred.resolve( $filter('filter')($scope.allServices, query) );
return deferred.promise;
};
/**
* Submits the engageXMForm form, and if valid, tries to create a new Engage with xMatters record via
* the xMattersAjaxEngage client callable script include.
*/
$scope.submit = function() {
$scope.informXMForm.$setSubmitted( true );
if( $scope.informXMForm.$invalid ) {
console.log( 'The form will not be submitted in an invalid state' );
console.log( $scope.informXMForm );
} else {
var formData = {
"business_impact": $scope.business_impact,
"first_reported": $scope.first_reported,
"locations": $scope.locations.map( function( item ){ return item.text; }).join( ';' ),
"services": $scope.services.map( function( item ){ return item.text; }).join( ';' ),
"update": $scope.update,
"update_type": $scope.update_type,
"parent_incident": $scope.incident_id
};
// console.log( 'formData: ' + JSON.stringify( formData ) );
var ga = new GlideAjax( 'xMattersAjaxExtended' );
ga.addParam( 'sysparm_name', 'submitInformWithXMatters' );
ga.addParam( 'form_data', JSON.stringify( formData ) );
ga.send().then( function( resp ) {
if( resp.success ) {
$scope.is_finished = true;
//$scope.engage_url = '/nav_to.do?uri=x_xma_xmatters_engage_with_xmatters.do?sys_id=' + resp.data.sys_id;
//var gdw = GlideDialogWindow.get();
//console.log( 'GDW: ' + gdw );
//gdw.destroy();
$translate('INFORM_XM.MESSAGE.SUCCESS').then(function(successMsg){
closeDialog(successMsg);
});
} else {
console.log( resp );
}
} ).catch( function( resp ){
console.log( resp );
} );
}
};
var closeDialog = function(optionalMessage) {
var data = {
type: "DIALOG_CLOSE"
};
if(optionalMessage) {
data.message = optionalMessage;
}
$window.parent.postMessage(data, window.location.origin);
};
$scope.cancel = function() {
closeDialog();
};
});
]]></script><script_name>xm_app_inform_xmatters</script_name><sys_class_name>sys_ui_script</sys_class_name><sys_created_by>admin</sys_created_by><sys_created_on>2017-03-02 22:26:24</sys_created_on><sys_customer_update>true</sys_customer_update><sys_id>2e509281dbd53200a34fd421cf961966</sys_id><sys_mod_count>97</sys_mod_count><sys_name>x_xma_xmatters.xm_app_inform_xmatters</sys_name><sys_package display_value="xMatters" source="x_xma_xmatters">5950d7444f2231000e9fa88ca310c78c</sys_package><sys_policy/><sys_replace_on_upgrade>false</sys_replace_on_upgrade><sys_scope display_value="xMatters">5950d7444f2231000e9fa88ca310c78c</sys_scope><sys_update_name>sys_ui_script_2e509281dbd53200a34fd421cf961966</sys_update_name><sys_updated_by>admin</sys_updated_by><sys_updated_on>2017-07-06 22:29:42</sys_updated_on><use_scoped_format>false</use_scoped_format></sys_ui_script></record_update>5b0c83ed0f73320037edb97ce1050e2dfalseadmin2017-07-06 22:40:32930c07610fb3320037edb97ce1050efa0admin2017-07-06 22:40:32
x_xma_xmatters.xm_app_inform_xmattersUI ScriptglobalINSERT_OR_UPDATE5950d7444f2231000e9fa88ca310c78ccustomersys_dictionary_x_xma_xmatters_inform_with_xmatters_number<?xml version="1.0" encoding="UTF-8"?><record_update><sys_dictionary action="INSERT_OR_UPDATE" element="number" table="x_xma_xmatters_inform_with_xmatters"><active>true</active><array>false</array><attributes/><audit>false</audit><calculation><![CDATA[(function calculatedFieldValue(current) {
// Add your code here
return ''; // return the calculated value
})(current);]]></calculation><choice/><choice_field/><choice_table/><column_label>Number</column_label><comments/><create_roles/><default_value>javascript:global.getNextObjNumberPadded();</default_value><defaultsort/><delete_roles/><dependent/><dependent_on_field/><display>false</display><dynamic_creation>false</dynamic_creation><dynamic_creation_script/><dynamic_default_value/><dynamic_ref_qual/><element>number</element><element_reference>false</element_reference><foreign_database/><internal_type display_value="String">string</internal_type><mandatory>false</mandatory><max_length>40</max_length><name>x_xma_xmatters_inform_with_xmatters</name><next_element/><primary>false</primary><read_only>false</read_only><read_roles/><reference/><reference_cascade_rule/><reference_floats>false</reference_floats><reference_key/><reference_qual/><reference_qual_condition/><reference_type/><sizeclass/><spell_check>false</spell_check><staged>false</staged><sys_class_name>sys_dictionary</sys_class_name><sys_created_by>admin</sys_created_by><sys_created_on>2017-03-07 17:59:33</sys_created_on><sys_customer_update>true</sys_customer_update><sys_id>575347a2dbd1b200a34fd421cf96192e</sys_id><sys_mod_count>0</sys_mod_count><sys_name>Number</sys_name><sys_package display_value="xMatters" source="x_xma_xmatters">5950d7444f2231000e9fa88ca310c78c</sys_package><sys_policy/><sys_replace_on_upgrade>false</sys_replace_on_upgrade><sys_scope display_value="xMatters">5950d7444f2231000e9fa88ca310c78c</sys_scope><sys_update_name>sys_dictionary_x_xma_xmatters_inform_with_xmatters_number</sys_update_name><sys_updated_by>admin</sys_updated_by><sys_updated_on>2017-03-07 17:59:33</sys_updated_on><table_reference>false</table_reference><text_index>false</text_index><unique>false</unique><use_dependent_field>false</use_dependent_field><use_dynamic_default>false</use_dynamic_default><use_reference_qualifier>simple</use_reference_qualifier><virtual>false</virtual><widget/><write_roles/><xml_view>false</xml_view></sys_dictionary></record_update>5b0c83ed0f73320037edb97ce1050e2dfalseadmin2017-07-06 22:40:32970c07610fb3320037edb97ce1050ef70admin2017-07-06 22:40:32
x_xma_xmatters_inform_with_xmatters
Inform with xMatters.NumberDictionaryglobalINSERT_OR_UPDATE5950d7444f2231000e9fa88ca310c78ccustomersys_properties_38dfd655db1d3200a34fd421cf961930UUID for Affected Services property in Inform with xMatters formfalsefalsex_xma_xmatters.inform.services.uuidinform.services.uuidsys_propertiesadmin2017-03-03 18:12:04true38dfd655db1d3200a34fd421cf9619300x_xma_xmatters.inform.services.uuid5950d7444f2231000e9fa88ca310c78cfalse5950d7444f2231000e9fa88ca310c78csys_properties_38dfd655db1d3200a34fd421cf961930admin2017-03-03 18:12:04string]]>5b0c83ed0f73320037edb97ce1050e2dfalseadmin2017-07-06 22:40:32970c07610fb3320037edb97ce1050ef80admin2017-07-06 22:40:32
x_xma_xmatters.inform.services.uuidSystem PropertyglobalINSERT_OR_UPDATE5950d7444f2231000e9fa88ca310c78ccustomersys_security_acl_4b5307a2dbd1b200a34fd421cf9619f7truetruefalseDefault access control on x_xma_xmatters_inform_with_xmattersx_xma_xmatters_inform_with_xmattersdeletesys_security_acladmin2017-03-07 17:59:32true4b5307a2dbd1b200a34fd421cf9619f70x_xma_xmatters_inform_with_xmatters5950d7444f2231000e9fa88ca310c78cfalse5950d7444f2231000e9fa88ca310c78csys_security_acl_4b5307a2dbd1b200a34fd421cf9619f7admin2017-03-07 17:59:32record]]>5b0c83ed0f73320037edb97ce1050e2dfalseadmin2017-07-06 22:40:32970c07610fb3320037edb97ce1050ef90admin2017-07-06 22:40:32
x_xma_xmatters_inform_with_xmatters
x_xma_xmatters_inform_with_xmattersAccess ControlglobalINSERT_OR_UPDATE5950d7444f2231000e9fa88ca310c78ccustomersys_dictionary_x_xma_xmatters_inform_with_xmatters_update_type<?xml version="1.0" encoding="UTF-8"?><record_update><sys_dictionary action="INSERT_OR_UPDATE" element="update_type" table="x_xma_xmatters_inform_with_xmatters"><active>true</active><array>false</array><attributes/><audit>false</audit><calculation><![CDATA[(function calculatedFieldValue(current) {
// Add your code here
return ''; // return the calculated value
})(current);]]></calculation><choice/><choice_field/><choice_table/><column_label>Update Type</column_label><comments/><create_roles/><default_value/><defaultsort/><delete_roles/><dependent/><dependent_on_field/><display>false</display><dynamic_creation>false</dynamic_creation><dynamic_creation_script/><dynamic_default_value/><dynamic_ref_qual/><element>update_type</element><element_reference>false</element_reference><foreign_database/><internal_type display_value="String">string</internal_type><mandatory>false</mandatory><max_length>40</max_length><name>x_xma_xmatters_inform_with_xmatters</name><next_element/><primary>false</primary><read_only>false</read_only><read_roles/><reference/><reference_cascade_rule/><reference_floats>false</reference_floats><reference_key/><reference_qual/><reference_qual_condition/><reference_type/><sizeclass/><spell_check>false</spell_check><staged>false</staged><sys_class_name>sys_dictionary</sys_class_name><sys_created_by>admin</sys_created_by><sys_created_on>2017-03-07 17:59:30</sys_created_on><sys_customer_update>true</sys_customer_update><sys_id>29a14fa6db91b200a34fd421cf9619b6</sys_id><sys_mod_count>0</sys_mod_count><sys_name>Update Type</sys_name><sys_package display_value="xMatters" source="x_xma_xmatters">5950d7444f2231000e9fa88ca310c78c</sys_package><sys_policy/><sys_replace_on_upgrade>false</sys_replace_on_upgrade><sys_scope display_value="xMatters">5950d7444f2231000e9fa88ca310c78c</sys_scope><sys_update_name>sys_dictionary_x_xma_xmatters_inform_with_xmatters_update_type</sys_update_name><sys_updated_by>admin</sys_updated_by><sys_updated_on>2017-03-07 17:59:30</sys_updated_on><table_reference>false</table_reference><text_index>false</text_index><unique>false</unique><use_dependent_field>false</use_dependent_field><use_dynamic_default>false</use_dynamic_default><use_reference_qualifier>simple</use_reference_qualifier><virtual>false</virtual><widget/><write_roles/><xml_view>false</xml_view></sys_dictionary></record_update>5b0c83ed0f73320037edb97ce1050e2dfalseadmin2017-07-06 22:40:329b0c07610fb3320037edb97ce1050ef70admin2017-07-06 22:40:32
Integration - xMattersApplication MenuglobalINSERT_OR_UPDATE5950d7444f2231000e9fa88ca310c78ccustomersys_dictionary_x_xma_xmatters_inform_with_xmatters_business_impact<?xml version="1.0" encoding="UTF-8"?><record_update><sys_dictionary action="INSERT_OR_UPDATE" element="business_impact" table="x_xma_xmatters_inform_with_xmatters"><active>true</active><array>false</array><attributes/><audit>false</audit><calculation><![CDATA[(function calculatedFieldValue(current) {
// Add your code here
return ''; // return the calculated value
})(current);]]></calculation><choice/><choice_field/><choice_table/><column_label>Business Impact</column_label><comments/><create_roles/><default_value/><defaultsort/><delete_roles/><dependent/><dependent_on_field/><display>false</display><dynamic_creation>false</dynamic_creation><dynamic_creation_script/><dynamic_default_value/><dynamic_ref_qual/><element>business_impact</element><element_reference>false</element_reference><foreign_database/><internal_type display_value="String">string</internal_type><mandatory>false</mandatory><max_length>2000</max_length><name>x_xma_xmatters_inform_with_xmatters</name><next_element/><primary>false</primary><read_only>false</read_only><read_roles/><reference/><reference_cascade_rule/><reference_floats>false</reference_floats><reference_key/><reference_qual/><reference_qual_condition/><reference_type/><sizeclass/><spell_check>false</spell_check><staged>false</staged><sys_class_name>sys_dictionary</sys_class_name><sys_created_by>admin</sys_created_by><sys_created_on>2017-03-07 17:59:31</sys_created_on><sys_customer_update>true</sys_customer_update><sys_id>82c283a2dbd1b200a34fd421cf961942</sys_id><sys_mod_count>0</sys_mod_count><sys_name>Business Impact</sys_name><sys_package display_value="xMatters" source="x_xma_xmatters">5950d7444f2231000e9fa88ca310c78c</sys_package><sys_policy/><sys_replace_on_upgrade>false</sys_replace_on_upgrade><sys_scope display_value="xMatters">5950d7444f2231000e9fa88ca310c78c</sys_scope><sys_update_name>sys_dictionary_x_xma_xmatters_inform_with_xmatters_business_impact</sys_update_name><sys_updated_by>admin</sys_updated_by><sys_updated_on>2017-03-07 17:59:31</sys_updated_on><table_reference>false</table_reference><text_index>false</text_index><unique>false</unique><use_dependent_field>false</use_dependent_field><use_dynamic_default>false</use_dynamic_default><use_reference_qualifier>simple</use_reference_qualifier><virtual>false</virtual><widget/><write_roles/><xml_view>false</xml_view></sys_dictionary></record_update>5b0c83ed0f73320037edb97ce1050e2dfalseadmin2017-07-06 22:40:329f0c83ed0f73320037edb97ce1050e2d0admin2017-07-06 22:40:32
x_xma_xmatters_inform_with_xmatters
x_xma_xmatters_inform_with_xmatters.business_impactDictionaryglobalINSERT_OR_UPDATE5950d7444f2231000e9fa88ca310c78ccustomersys_documentation_x_xma_xmatters_inform_with_xmatters__enenx_xma_xmatters_inform_with_xmattersInform with xMatterssys_documentationadmin2017-03-07 17:59:32false9f5347a2dbd1b200a34fd421cf9619130Inform with xMatters5950d7444f2231000e9fa88ca310c78cfalse5950d7444f2231000e9fa88ca310c78csys_documentation_x_xma_xmatters_inform_with_xmatters__enadmin2017-03-07 17:59:32]]>5b0c83ed0f73320037edb97ce1050e2dfalseadmin2017-07-06 22:40:32d30c07610fb3320037edb97ce1050ef80admin2017-07-06 22:40:32
x_xma_xmatters_inform_with_xmatters
Inform with xMattersField LabelglobalINSERT_OR_UPDATE5950d7444f2231000e9fa88ca310c78ccustomersys_script_include_9033b141dbd53200a34fd421cf961934<?xml version="1.0" encoding="UTF-8"?><record_update table="sys_script_include"><sys_script_include action="INSERT_OR_UPDATE"><access>package_private</access><active>true</active><api_name>x_xma_xmatters.xMattersEventExtended</api_name><client_callable>false</client_callable><description/><name>xMattersEventExtended</name><script><![CDATA[gs.include( 'xMattersEvent' );
var xMattersEventExtended = Class.create();
xMattersEventExtended.prototype = Object.extend( new xMattersEvent(), {
initialize: function( config, dataHelper ) {
// The parent xMatterEvent initialize gets called
// before this child one, so we are confident in
// overwritting any values set in there.
if( config )
this.config = config;
if( dataHelper )
this.dataHelper = dataHelper;
this.priority = 'medium';
this.log = new xMattersLogger( this.config.LOGLEVEL, 'xMattersEventExtended' );
},
// Methods that interact with xMatters syste via the Data Helper
/**
* Sends the event -- will attempt a set number of times based on configured
* maximum attempts.
* @return {string} The event id or requestId of the request to xMatters
*/
send: function() {
this.log.info( 'xMattersEventExtended: Starting send...' );
var attempts = 0;
var isSuccess = false;
var message = '';
var id = null;
while( !isSuccess && attempts < this.config.EVENTS.MAX_ATTEMPTS ) {
attempts += 1;
try {
var resp = this.dataHelper.sendRequest( {
"method": "POST",
"endpoint": this.webserviceURL,
"path": this.webserviceURL, //added for logging
"headers": {
"Content-Type": "application/json"
},
"body": this.getEventBody()
} );
this.response = resp;
if( resp.status >= 200 && resp.status < 300 ) {
isSuccess = true;
body = this.json.decode( resp.body );
if( body.id ) {
id = body.id;
}
else if ( body.requestId )
id = body.requestId;
message = "[xMatters] - created xMatters event with eventID " + id + " " + this.getTargetDescription();
} else {
if( this.recipients.length <= 0 && resp.status === 400 ) {
if( this.isResponseMissingRecipients( resp ) ) {
// there was no default recipient.
this.log.error( "[xMatters] - failed to create event " + this.getTargetDescription() +
" | status: " + resp.status + " | body: " + resp.body );
message = "[xMatters] - creation of xMatters event FAILED " + this.getTargetDescription() +
" after " + attempts + " attempts, no recipients were specified. To avoid this error, set default recipients" +
" within xmatters. please refer to logs for more details";
break;
}
}
// if didn't break, catch errors through regular error handling
this.log.error( "[xMatters] - failed to create event " + this.getTargetDescription() +
" | status: " + resp.status + " | body: " + resp.body );
}
} catch( e ) {
this.log.error( "[xMatters] - failed to create event " + this.getTargetDescription() +
" | error: " + String( e ) );
}
}
if( !isSuccess && message === '' ) {
message = "[xMatters] - creation of xMatters event FAILED " + this.getTargetDescription() +
" after " + attempts + " attempts, please refer to logs for more details";
}
this.log.info( message );
this.xMattersId = id;
return id;
},
type: 'xMattersEventExtended'
});
]]></script><sys_class_name>sys_script_include</sys_class_name><sys_created_by>admin</sys_created_by><sys_created_on>2017-03-02 20:18:57</sys_created_on><sys_customer_update>true</sys_customer_update><sys_id>9033b141dbd53200a34fd421cf961934</sys_id><sys_mod_count>9</sys_mod_count><sys_name>xMattersEventExtended</sys_name><sys_package display_value="xMatters" source="x_xma_xmatters">5950d7444f2231000e9fa88ca310c78c</sys_package><sys_policy/><sys_replace_on_upgrade>false</sys_replace_on_upgrade><sys_scope display_value="xMatters">5950d7444f2231000e9fa88ca310c78c</sys_scope><sys_update_name>sys_script_include_9033b141dbd53200a34fd421cf961934</sys_update_name><sys_updated_by>admin</sys_updated_by><sys_updated_on>2017-03-07 18:58:17</sys_updated_on></sys_script_include></record_update>5b0c83ed0f73320037edb97ce1050e2dfalseadmin2017-07-06 22:40:32d30c07610fb3320037edb97ce1050ef90admin2017-07-06 22:40:32
x_xma_xmatters.xm_mod_options_provider_eUI ScriptglobalINSERT_OR_UPDATE5950d7444f2231000e9fa88ca310c78ccustomersys_dictionary_x_xma_xmatters_inform_with_xmatters_parent_incident<?xml version="1.0" encoding="UTF-8"?><record_update><sys_dictionary action="INSERT_OR_UPDATE" element="parent_incident" table="x_xma_xmatters_inform_with_xmatters"><active>true</active><array>false</array><attributes/><audit>false</audit><calculation><![CDATA[(function calculatedFieldValue(current) {
// Add your code here
return ''; // return the calculated value
})(current);]]></calculation><choice/><choice_field/><choice_table/><column_label>Parent Incident</column_label><comments/><create_roles/><default_value/><defaultsort/><delete_roles/><dependent/><dependent_on_field/><display>false</display><dynamic_creation>false</dynamic_creation><dynamic_creation_script/><dynamic_default_value/><dynamic_ref_qual/><element>parent_incident</element><element_reference>false</element_reference><foreign_database/><internal_type display_value="String">string</internal_type><mandatory>false</mandatory><max_length>40</max_length><name>x_xma_xmatters_inform_with_xmatters</name><next_element/><primary>false</primary><read_only>false</read_only><read_roles/><reference display_value="Incident" name="incident">incident</reference><reference_cascade_rule/><reference_floats>false</reference_floats><reference_key/><reference_qual/><reference_qual_condition/><reference_type/><sizeclass/><spell_check>false</spell_check><staged>false</staged><sys_class_name>sys_dictionary</sys_class_name><sys_created_by>admin</sys_created_by><sys_created_on>2017-03-07 17:59:30</sys_created_on><sys_customer_update>true</sys_customer_update><sys_id>564283aadb91b200a34fd421cf961920</sys_id><sys_mod_count>0</sys_mod_count><sys_name>Parent Incident</sys_name><sys_package display_value="xMatters" source="x_xma_xmatters">5950d7444f2231000e9fa88ca310c78c</sys_package><sys_policy/><sys_replace_on_upgrade>false</sys_replace_on_upgrade><sys_scope display_value="xMatters">5950d7444f2231000e9fa88ca310c78c</sys_scope><sys_update_name>sys_dictionary_x_xma_xmatters_inform_with_xmatters_parent_incident</sys_update_name><sys_updated_by>admin</sys_updated_by><sys_updated_on>2017-03-07 17:59:30</sys_updated_on><table_reference>false</table_reference><text_index>false</text_index><unique>false</unique><use_dependent_field>false</use_dependent_field><use_dynamic_default>false</use_dynamic_default><use_reference_qualifier>simple</use_reference_qualifier><virtual>false</virtual><widget/><write_roles/><xml_view>false</xml_view></sys_dictionary></record_update>5b0c83ed0f73320037edb97ce1050e2dfalseadmin2017-07-06 22:40:32d70c07610fb3320037edb97ce1050ef70admin2017-07-06 22:40:32
x_xma_xmatters_inform_with_xmatters
x_xma_xmatters_inform_with_xmatters.parent_incidentDictionaryglobalINSERT_OR_UPDATE5950d7444f2231000e9fa88ca310c78ccustomersys_properties_408f1655db1d3200a34fd421cf9619f8UUID for Affected Locations property in Inform with xMatters formfalsefalsex_xma_xmatters.inform.locations.uuidinform.locations.uuidsys_propertiesadmin2017-03-03 18:10:44true408f1655db1d3200a34fd421cf9619f80x_xma_xmatters.inform.locations.uuid5950d7444f2231000e9fa88ca310c78cfalse5950d7444f2231000e9fa88ca310c78csys_properties_408f1655db1d3200a34fd421cf9619f8admin2017-03-03 18:10:44string]]>5b0c83ed0f73320037edb97ce1050e2dfalseadmin2017-07-06 22:40:32d70c07610fb3320037edb97ce1050ef80admin2017-07-06 22:40:32
x_xma_xmatters.inform.locations.uuidSystem PropertyglobalINSERT_OR_UPDATE5950d7444f2231000e9fa88ca310c78ccustomersys_security_acl_8f5307a2dbd1b200a34fd421cf9619f2truetruefalseDefault access control on x_xma_xmatters_inform_with_xmattersx_xma_xmatters_inform_with_xmatterscreatesys_security_acladmin2017-03-07 17:59:31true8f5307a2dbd1b200a34fd421cf9619f20x_xma_xmatters_inform_with_xmatters5950d7444f2231000e9fa88ca310c78cfalse5950d7444f2231000e9fa88ca310c78csys_security_acl_8f5307a2dbd1b200a34fd421cf9619f2admin2017-03-07 17:59:31record]]>5b0c83ed0f73320037edb97ce1050e2dfalseadmin2017-07-06 22:40:32d70c07610fb3320037edb97ce1050ef90admin2017-07-06 22:40:32
Inform with xMatters.Parent IncidentField LabelglobalINSERT_OR_UPDATE5950d7444f2231000e9fa88ca310c78ccustomersys_properties_e26f1655db1d3200a34fd421cf961921Semicolon separated list of available locationsfalsefalsex_xma_xmatters.inform.locationsinform.locationssys_propertiesadmin2017-03-03 18:10:16truee26f1655db1d3200a34fd421cf9619216x_xma_xmatters.inform.locations5950d7444f2231000e9fa88ca310c78cfalse5950d7444f2231000e9fa88ca310c78csys_properties_e26f1655db1d3200a34fd421cf961921admin2017-03-08 18:48:22stringAtlanta;Boston;Charlotte;Chattanooga;Dallas;Los Angeles;Philadelphia;New York;San Francisco;Seattle;Washington]]>5b0c83ed0f73320037edb97ce1050e2dfalseadmin2017-07-06 22:40:32df0c07610fb3320037edb97ce1050ef80admin2017-07-06 22:40:32
x_xma_xmatters.inform.locationsSystem PropertyglobalINSERT_OR_UPDATE5950d7444f2231000e9fa88ca310c78ccustomersys_ui_module_875307a2dbd1b200a34fd421cf9619f2true8f5307a2dbd1b200a34fd421cf9619f1Inform with xMattersfalseitilsys_ui_moduleadmin2017-03-07 17:59:31trueglobal875307a2dbd1b200a34fd421cf9619f20Inform with xMatters5950d7444f2231000e9fa88ca310c78cfalse5950d7444f2231000e9fa88ca310c78csys_ui_module_875307a2dbd1b200a34fd421cf9619f2admin2017-03-07 17:59:31