Getting issue when validating script in pega robotics studio v-25.1.1. Below is the code:
catch (Exception ex)
{
OpenSpan.Diagnostics.Diagnostic.PublishException(ex);
return false;
}
Getting issue when validating script in pega robotics studio v-25.1.1. Below is the code:
catch (Exception ex)
{
OpenSpan.Diagnostics.Diagnostic.PublishException(ex);
return false;
}
@AshKS This is the old way to write log entries in a script. To see examples of the new methods, create a new script container. There are examples placed in each new script you create that you can copy over to your older scripts. Here they are for reference.
#region Usings
using System;
using System.Collections;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Reflection;
using System.Web;
using System.Windows.Forms;
using System.Xml;
using ScriptLogger = Pega.Core.Script.ScriptLogger;
#endregion
public class Script
{
#region Logging examples
// ScriptLogger.LogDebug(“test”);
// ScriptLogger.LogInformation(“test”);
// ScriptLogger.LogWarning(“test”);
// ScriptLogger.LogError(“test”);
// ScriptLogger.LogException(exception);
// ScriptLogger.LogException(exception, “test”);
#endregion
}