Issue with ORCA–ServiceNow Integration Creating Incident and Problem Tickets
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi All,
We have integrated ORCA with ServiceNow. For specific categories, instead of creating an Incident, we want the integration to create a Problem ticket.
To achieve this, we configured a Business Rule. However, it is not working as expected. Currently, both Incident and Problem tickets are being created.
When we test the same logic using the REST API Explorer or Postman, it works correctly and only Problem records are created. The issue occurs only when the tickets are generated directly from ORCA, where Incident tickets are still being created along with Problem tickets.
Could you please help us identify what might be causing this discrepancy and advise on how to ensure that only Problem tickets are created for the specified categories?
(function executeRule(current, previous /*null when async*/) {
gs.info("[ProblemCrea] for Incident: " + current.number);
gs.info("[ProblemCrea] Category: " + current.category +
", Short Desc: " + current.short_description +
", Priority: " + current.priority);
var problemGR = new GlideRecord('problem');
problemGR.initialize();
problemGR.short_description = current.short_description;
problemGR.description = current.description;
problemGR.priority = current.priority;
problemGR.impact = current.impact;
problemGR.urgency = current.urgency;
problemGR.category = current.category;
problemGR.assignment_group="84336a471be2ca54c697db9ce54bcbd9";
if (current.correlation_id) {
problemGR.u_orca_id = current.correlation_id;
}
var newProblemSysId = problemGR.insert();
gs.info("[ProblemCrea] created with sys_id: " + newProblemSysId);
current.setAbortAction(true);
gs.info("[ProblemCrea] Incident creation aborted.");
})(current, previous);
Thanks in advance.
Regards
- Labels:
-
Incident Management
