ERROR <Ens>ErrException: <UNDEFINED>OnProcessInput Error Troubleshooting
I have created the following Task to kick off a Ens.BusinessService to execute a SQL query and process the results
Class OSU.Workday.TerminationsTask Extends %SYS.Task.Definition
{
Parameter TaskName As STRING = "OSU - Workday Termination Update";
Method OnTask() As %Status
{
#Dim sc as %Status
#Dim ex as %Exception.AbstractException
set sc = $$$OK
try{
// create the service
#Dim tService As OSU.DataSource.Workday.TermService
Set tServiceConfigName = "OSU.DataSource.Workday.TermService"
// Call BusinessService
$$$ThrowOnError(##class(Ens.Director).CreateBusinessService(tServiceConfigName,.tService))
$$$ThrowOnError(tService.Adapter.OnTask())
set (tHint) = ""
}catch ex{
set tSC = ex.AsStatus()
}
quit tSC
}
ClassMethod TestTask()
{
set tTask = ##class(OSU.Workday.TerminationsTask).%New()
$$$ThrowOnError(tTask.OnTask())
}
/// Location and Revision of this file in Perforce (Auto-updating)
Parameter SrcVer = "$Id$";
}
and the following Service...
Class OSU.Workday.TerminationService Extends Ens.BusinessService
{
Parameter ADAPTER = "EnsLib.SQL.InboundAdapter";
Parameter REQUESTCLASSES As %String = "EnsLib.SQL.Snapshot";
/// Configuration item to send inbound messages
Property TargetConfig As Ens.DataType.ConfigName [ Required ];
Property Timeout As %Integer;
Parameter SETTINGS = "TargetConfig:Basic:selector?multiSelect=1&context={Ens.ContextSearch/ProductionItems?targets=1&productionName=@productionId},Timeout:Basic";
Method OnProcessInput(pInput As EnsLib.SQL.Snapshot, pOutput As %RegisteredObject) As %Status
{
#dim tTargetConfig As Ens.DataType.ConfigName
#dim tTimeout As %Integer
#dim tElapsedTime As %Numeric = $ZH
#dim tActivity As %String
Set tActivity = pHint
Set pHint = ..%SessionId
Set tTargetConfig = ..TargetConfig
Set tTimeout = ..Timeout
If tTargetConfig = "" {
Set tStatus = $$$EnsError($$$EnsErrTargetNotSpecified,"TargetConfig")
Quit
}
set req = ##class(OSU.Workday.Messages.WorkdayTerminations).%New()
set req.EMPLID = pInput.Get("EMPLID")
set req.MedCtrID = pInput.Get("MedCtrID")
set req.LastName = pInput.Get("LastName")
set req.FirstName = pInput.Get("FirstName")
set req.EFFDT = pInput.Get("EFFDT")
set req.MiddleName = pInput.Get("MiddleName")
set req.Gender = pInput.Get("Gender")
set req.DOB = pInput.Get("DOB")
set req.NPI = pInput.Get("NPI")
set req.DoctorNumber = pInput.Get("DoctorNumber")
set req.VerityID = pInput.Get("VerityID")
set req.SSN = pInput.Get("SSN")
set req.IDMID = pInput.Get("IDMID")
set sc = ..SendRequestSync(tTargetConfig,req)
// We *always* send back the %SessionId in pHint to allow the caller to track down the message session.
Set pHint = ..%SessionId
quit sc
}
/// Location and Revision of this file in Perforce (Auto-updating)
Parameter SrcVer = "$Id$";
}
However, when the Task executes, I am getting
ERROR <Ens>ErrException: <UNDEFINED>OnProcessInput+2 ^OSU.Workday.TerminationService.1 *pHint -- logged as '23 Mar 2026'
number 1 @'
Set tActivity = pHint'
Can someone help me see my issue?
Product version: IRIS 2024.2
$ZV: HealthShare Provider Directory 2024.2.0 Build: 1009 [HealthShare Modules: Core:28.0 + Provider Dire
Discussion (1)0
Comments
Hi Scott,
There is the line:
Set tActivity = pHint
and pHint is not defined before this set.
tActivityis not used in the method, so you can just delete this line.