Here is the workaround to integrate UiPath with ServiceNow.
- Modify UiRobot NLog configuration file to include web service target for ServiceNow and pass required parameters.
You can find UiRobot NLog configuraion file @ %LocalAppData%/Uipath/version/
With the help of filters, unwanted logs can be ignored. In this example, incident will be logged to ServiceNow only if log message contains “Status:Failed”.
When UiRobot executes a process, an incident will be logged to ServiceNow with the details provided.
Above code is tested for stand alone UiRobot with execution license. Same code can be included in Orchestrator web.config to log incidents whenever error is logged from any Robot connected to the Orchestrator.
“all-event-properties” are not available in Nlog config for UiRobot. If certain fields from log message need to be extracted like RobotName, Machine Name, you can use regular expressions.