Question TAMILMANI RAVI · Sep 17

How to get the specific production component status like (Running, stopped, Inactive, etc...) in programatically.

Actually, I want to know specific production component status. I used "Ens.Config.Production" to get the status of component. But it will return only the component enabled/disabled. Anyone is having any Idea to get the specific production component status?

Product version: IRIS 2024.1
$ZV: IRIS for Windows (x86-64) 2024.1.4 (Build 516_1U) Sat May 31 2025 13:15:40 EDT

Comments

DC AI Bot · Sep 17 Bot

To retrieve the current status (e.g., Running, Stopped) of a specific production component programmatically, you can follow these approaches:

  1. Using Ens.Util.Statistics to Check Job Status: Utilize the Ens.Util.Statistics.EnumerateJobStatus query to get the connection status of the component. Below is an example code snippet:

    ClassMethod GetConnectionStatus(pItemName As %String) As %String
    {
        Set tStatement = ##class(%SQL.Statement).%New()
        Set tStatus = tStatement.%PrepareClassQuery("Ens.Util.Statistics", "EnumerateJobStatus")
        If $$$ISERR(tStatus) {
            Return "Error in Status Query: "_$system.Status.GetErrorText(tStatus)
        }
        Set tRS = tStatement.%Execute(pItemName)
        If tRS.%SQLCODE = 0 {
            Do tRS.%Next()
            Return tRS.%Get("AdapterState") // This returns the status such as "running" or "stopped"
        }
        Return "Status not Found"
    }
    

    This class method takes the item name as input and fetches the current job status [1].

  2. Query Ens.Job.Enumerate to Get Job Status: You can directly query the Ensure.Job_Enumerate to see the status of your Business Operation. Here’s an example SQL-based method:

    &sql(SELECT Status INTO :JobStatus 
         FROM Ens.Job_Enumerate() 
         WHERE ConfigName='YourComponentName')
    

    This will return job statuses like Running, DeQueuing, etc., which correspond to the state of the component [2].

These methods allow inspection of the real-time status of the component beyond the enabled/disabled state.

Sources:

0
Yaron Munz · Sep 17

look at Ens_Config.Item there is a property called "Enabled"

0
Yaron Munz  Sep 17 to TAMILMANI RAVI

aha I got it. then look at class:  EnsPortal.SVG.ProductionConfigurationLegend

0
TAMILMANI RAVI  Sep 17 to Jani Hurskainen

Hi @Jani Hurskainen 

This was return the entire production status. But I need to know the specific component status from the production.

Thanks for your efforts ☺️ 

0
Enrico Parisi · Sep 17

I think you are mixing hosts (production component) and jobs.

A host can be enabled or disabled, when a host is enabled there are a number (PoolSize) of jobs and each job has a status.

You can view/list the status/details of production jobs in the Management portal Interoperability -> Monitor -> Jobs.

You already know how to get if an host is enabled/disabled, to get the status of all jobs you can use the query Enumerate in the Ens.Job class, to test it:

Set rs=##class(Ens.Job).EnumerateFunc()

Do rs.%Display()

0