Written by

Enterprise Application Development Consultant at The Ohio State University Wexner Medical Center
MOD
Question Scott Roth · 3 hr ago

Configuration item disabled, but shows enabled on Namespace

I am trying to built a Task that kicks off a Workflow to pull data into HSPD, and when I try to test the Task

ClassMethod TestTask()
{set tTask = ##class(OSU.Workday.TerminationsTask).%New()set tTask.DaysBack = 1 $$$ThrowOnError(tTask.OnTask())}

I keep getting TestTask+3^OSU.Workday.TerminationsTask.1 *%Exception.StatusException ERROR <Ens>ErrConfigDisabled: Configuration item 'OSU.DataSource.Workday.TermService' is disabled

But within the Namespace the OSU.DataSource.Workday.TermService shows enabled.

Here is my Task that I am using...

Class OSU.Workday.TerminationsTask Extends %SYS.Task.Definition
{

Parameter TaskName As STRING = "OSU - Workday Termination Update";

Property DaysBack As %Integer [ InitialExpression = 1 ];

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))
        
        // Create Request
        set tRequest = ##class(OSU.Workday.Messages.InactivatedRecordsRequest).%New()
        set tRequest.DaysBack = ..DaysBack
        
        set (tHint) = ""
        
        // Send Request to tService
        $$$ThrowOnError(tService.OnProcessInput(tRequest))
        
    }catch ex{
        set tSC = ex.AsStatus()
    }
    quit tSC
}

ClassMethod TestTask()
{
	set tTask = ##class(OSU.Workday.TerminationsTask).%New()
    set tTask.DaysBack = 1
    $$$ThrowOnError(tTask.OnTask())
}

/// Location and Revision of this file in Perforce (Auto-updating)
Parameter SrcVer = "$Id$";

}

ErrConfigDisabled: Configuration item 'OSU.DataSource.Workday.TermService' is disabled

Can someone help me figure out what I am doing wrong?

Product version: IRIS 2024.2
$ZV: HealthShare Provider Directory 2024.2.0 Build: 1009 [HealthShare Modules: Core:28.0 + Provider Direc

Comments

Zachary Nowicki · 3 hr ago

The CreateBusinessService method call may be creating a new service rather than using the existing component that you have defined in the production. Considering using the SendRequestAsync() call to send to the existing component. That would trigger the OnProcessInput call when the message lands in the component. Something to the effect of:
##class(Ens.BusinessService).SendRequestAsync(tServiceConfigName, tRequest)

0
Scott Roth  2 hr ago to Zachary Nowicki

SendRequestAsync did not work... <METHOD DOES NOT EXIST>  OnTask+12^OSU.Workday.TerminationsTask.1 SendRequestAsync,Ens.BusinessService
 

0