Pull a List of Services/Processes/Operations from a Production?

49 views
Skip to first unread message

BC

unread,
Apr 11, 2018, 3:47:20 PM4/11/18
to InterSystems: Ensemble in Healthcare
Hello all.

What could one use to generate a list of Items (Services/Processes/Operations) from a Production?

I would ultimately like to generate a list of all Services, Processes, and Operations in a given Production and dump that list into a pipe delimited file.

I'm not asking for a complete solution, just some places to start poking around in the documentation.

Thanks for any pointers.  

Bill Casey

Graham, Ben

unread,
Apr 11, 2018, 3:56:12 PM4/11/18
to Ensemble-in...@googlegroups.com

Look at the Ens.Config.Production class.

 

-Ben

--
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare Community" group.
To post to this group, send email to Ensemble-in...@googlegroups.com
To unsubscribe from this group, send email to Ensemble-in-Healt...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/Ensemble-in-Healthcare?hl=en
---
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare" group.
To unsubscribe from this group and stop receiving emails from it, send an email to Ensemble-in-Healt...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.






This electronic transmission and any documents accompanying this electronic transmission may contain information that is confidential and/or legally privileged. The information is intended only for the use of the individual or entity named above. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or the taking of any action in reliance on or regarding the contents of this electronically transmitted information is strictly prohibited. If you have received this e-mail in error, please notify the sender and delete this message immediately.

David Loveluck

unread,
Apr 11, 2018, 4:12:49 PM4/11/18
to Ensemble-in...@googlegroups.com

 set prod=##class(Ens.Config.Production).%OpenId("Demo.HL7.MsgRouter.Production")
 set itcnt=prod.Items.Count()
 for i=1:1:itcnt {
             set item=prod.Items.GetAt(i)
 !,item.Name,",",item.ClassName,",",item.GetBusinessType(item.ClassName)
 }

J McHutch

unread,
Apr 11, 2018, 4:25:38 PM4/11/18
to Ensemble-in...@googlegroups.com
You could use awl and query the Ens_Config.Item table

Thanks, 
Nora

Sent from my iPhone, please excuse typos 
--

David Loveluck

unread,
Apr 11, 2018, 4:36:50 PM4/11/18
to Ensemble-in...@googlegroups.com

I should have added that my example will run in ENSDEMO.

 

From: David Loveluck
Sent: Wednesday, April 11, 2018 4:13 PM
To: Ensemble-in...@googlegroups.com
Subject: RE: [InterSystems-EnsHlth] Pull a List of Services/Processes/Operations from a Production?

 

 set prod=##class(Ens.Config.Production).%OpenId("Demo.HL7.MsgRouter.Production")
 set itcnt=prod.Items.Count()
 for i=1:1:itcnt {
             set item=prod.Items.GetAt(i)
 !,item.Name,",",item.ClassName,",",item.GetBusinessType(item.ClassName)
 }

 

 

 

 


Sent: Wednesday, April 11, 2018 3:56 PM
To: Ensemble-in...@googlegroups.com

BC

unread,
Apr 12, 2018, 9:45:54 AM4/12/18
to InterSystems: Ensemble in Healthcare
Thank you, Ben!  Will do.


On Wednesday, April 11, 2018 at 3:56:12 PM UTC-4, Ben wrote:

Look at the Ens.Config.Production class.

 

-Ben

 

From: ensemble-in...@googlegroups.com [mailto:ensemble-in-healt...@googlegroups.com] On Behalf Of BC
Sent: Wednesday, April 11, 2018 12:47 PM
To: InterSystems: Ensemble in Healthcare <Ensemble-in...@googlegroups.com>
Subject: [InterSystems-EnsHlth] Pull a List of Services/Processes/Operations from a Production?

 

Hello all.

 

What could one use to generate a list of Items (Services/Processes/Operations) from a Production?

 

I would ultimately like to generate a list of all Services, Processes, and Operations in a given Production and dump that list into a pipe delimited file.

 

I'm not asking for a complete solution, just some places to start poking around in the documentation.

 

Thanks for any pointers.  

 

Bill Casey

--
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare Community" group.

To post to this group, send email to Ensemble-i...@googlegroups.com
To unsubscribe from this group, send email to Ensemble-in-Healthcare-unsub...@googlegroups.com


For more options, visit this group at http://groups.google.com/group/Ensemble-in-Healthcare?hl=en
---
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare" group.

To unsubscribe from this group and stop receiving emails from it, send an email to Ensemble-in-Healthcare+unsub...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

BC

unread,
Apr 12, 2018, 9:49:57 AM4/12/18
to InterSystems: Ensemble in Healthcare
This is great, David.  I thank you, sir!

Bill Casey


On Wednesday, April 11, 2018 at 4:12:49 PM UTC-4, David Loveluck wrote:

 set prod=##class(Ens.Config.Production).%OpenId("Demo.HL7.MsgRouter.Production")
 set itcnt=prod.Items.Count()
 for i=1:1:itcnt {
             set item=prod.Items.GetAt(i)
 !,item.Name,",",item.ClassName,",",item.GetBusinessType(item.ClassName)
 }

 

 

 

 

From: ensemble-in...@googlegroups.com [mailto:ensemble-in-healt...@googlegroups.com] On Behalf Of Graham, Ben
Sent: Wednesday, April 11, 2018 3:56 PM
To: Ensemble-in...@googlegroups.com
Subject: RE: [InterSystems-EnsHlth] Pull a List of Services/Processes/Operations from a Production?

 

Look at the Ens.Config.Production class.

 

-Ben

 

From: ensemble-in...@googlegroups.com [mailto:ensemble-in-healt...@googlegroups.com] On Behalf Of BC
Sent: Wednesday, April 11, 2018 12:47 PM
To: InterSystems: Ensemble in Healthcare <Ensemble-in...@googlegroups.com>
Subject: [InterSystems-EnsHlth] Pull a List of Services/Processes/Operations from a Production?

 

Hello all.

 

What could one use to generate a list of Items (Services/Processes/Operations) from a Production?

 

I would ultimately like to generate a list of all Services, Processes, and Operations in a given Production and dump that list into a pipe delimited file.

 

I'm not asking for a complete solution, just some places to start poking around in the documentation.

 

Thanks for any pointers.  

 

Bill Casey

--
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare Community" group.

To post to this group, send email to Ensemble-i...@googlegroups.com
To unsubscribe from this group, send email to Ensemble-in-Healthcare-unsub...@googlegroups.com


For more options, visit this group at http://groups.google.com/group/Ensemble-in-Healthcare?hl=en
---
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare" group.

To unsubscribe from this group and stop receiving emails from it, send an email to Ensemble-in-Healthcare+unsub...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

 





This electronic transmission and any documents accompanying this electronic transmission may contain information that is confidential and/or legally privileged. The information is intended only for the use of the individual or entity named above. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or the taking of any action in reliance on or regarding the contents of this electronically transmitted information is strictly prohibited. If you have received this e-mail in error, please notify the sender and delete this message immediately.

--
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare Community" group.

To post to this group, send email to Ensemble-i...@googlegroups.com
To unsubscribe from this group, send email to Ensemble-in-Healthcare-unsub...@googlegroups.com


For more options, visit this group at http://groups.google.com/group/Ensemble-in-Healthcare?hl=en
---
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare" group.

To unsubscribe from this group and stop receiving emails from it, send an email to Ensemble-in-Healthcare+unsub...@googlegroups.com.

Message has been deleted

JohnZ- RADNTX

unread,
Dec 3, 2020, 11:14:04 AM12/3/20
to InterSystems: Ensemble in Healthcare
select ID, AlertGroups, Category, ClassName, Comment, DisableErrorTraps, Enabled, Foreground, LogTraceEvents, Name, PoolSize, Production, Schedule, Settings from Ens_Config.Item where Production='ProductionNameClassHere' order by ClassName

rhurst

unread,
Dec 3, 2020, 11:38:14 AM12/3/20
to InterSystems: Ensemble in Healthcare
This is an old thread ... better if posted on their community portal?  Here's a code snippet on how I have [all] Productions exported.  We make a nice combined spreadsheet with both TEST and LIVE as well as feed our Application Registry for a BC/DR portal.

    do ##class(%SYS.Ensemble).GetStatusAll(.productions)

    set home = $NameSpace
    set ns = ""

    for {
        set ns = $o(productions(ns)) quit:ns=""
        set $NameSpace = ns

        set class = $li(productions(ns), 1)
        set state = $li(productions(ns), 2)

        ;if state '= "Running" continue

        do ..Export(file, state)
    }

Method Export(file:%String, state="Running")

    set % = "|"

    #dim rs as %ResultSet = ##class(%ResultSet).%New("Ens.Config.Production:Extent")
    $$$QuitOnError(rs.Execute())

    while rs.Next(.sc) {

        #dim production as Ens.Config.Production = ##class(Ens.Config.Production).%OpenId(rs.ID)

        set itemKey = ""
        while production.Items.GetNext(.itemKey) '= "" {

            #dim item as Ens.Config.Item = production.Items.GetAt(itemKey)

            set name = item.Name
            set description = item.Comment
            set schedule = item.Schedule
            do item.GetSetting("BusinessPartner", .owner)
            set direction = ""
            set host = ..#INSTANCE ;$SYSTEM.INetInfo.LocalHostName()
            set port = ""

                ; TCP
                do item.GetSetting("IPAddress", .host)
                do item.GetSetting("Port", .port)
                ; Proxy
                if '$d(host) do item.GetSetting("ProxyServer", .host)
                if '$d(port) do item.GetSetting("ProxyPort", .port)
                ; other protocols
                kill EMAIL,FTP,SSL,URL
                if '$d(host) {
                    do item.GetSetting("SMTPServer", .EMAIL)
                    if $d(EMAIL) {
                        set host = EMAIL
                        do item.GetSetting("SMTPPort", .port)
                        do item.GetSetting("SSLConfig", .SSL)
                        if '$g(port) set port = $s($g(SSL)'="":465, 1:25)
                    }
                }
                if '$d(host) {
                    do item.GetSetting("FTPServer", .FTP)
                    if $d(FTP) {
                        set host = FTP
                        do item.GetSetting("FTPPort", .port)
                        do item.GetSetting("SSLConfig", .SSL)
                        if '$g(port) set port = $s($g(SSL)'="":22, 1:21)
                    }
                }
                if '$d(host) {
                    if '$d(URL) do item.GetSetting("URL", .URL)
                    if '$d(URL) do item.GetSetting("WebServiceURL", .URL)
                    if $d(URL) {
                        set host = $p($p(URL, "//", 2), "/", 1)
                        if host [ ":" {
                            set port = +$p(host, ":", 2)
                            set host = $p(host, ":", 1)
                        }
                        if '$g(port) set port = $s(URL ? 1"https:".e:443, URL ? 1"http:".e:80, 1:port)
                    }
                }
                ; future use? might need to inspect for custom adapters, parameters, etc.
                ;#dim itemClass as %Dictionary.CompiledClass = ##class(%Dictionary.CompiledClass).%OpenId(item.ClassName)
                ;if $isobject(itemClass) {
                ;}

                set host = $g(host, ..#INSTANCE)
                set ipaddr = $SYSTEM.INetInfo.HostNameToAddr(host)

                use file
                write $s(state = "Running":item.Enabled, 1:0),
                    %, production.Name _"::"_ name,
                    %, description,
                    %, schedule,
                    %, $g(owner),
                    %, direction,
                    %, host,
                    %, ipaddr,
                    %, $g(port),
                    !
                use 0
            }
        }

David Loveluck

unread,
Dec 3, 2020, 1:06:47 PM12/3/20
to Ensemble-in...@googlegroups.com

In general, for technical questions I would suggest the developer community. https://community.intersystems.com/

 

Dave

From: ensemble-in...@googlegroups.com <ensemble-in...@googlegroups.com> On Behalf Of JohnZ- RADNTX
Sent: Thursday, December 3, 2020 11:14 AM
To: InterSystems: Ensemble in Healthcare <Ensemble-in...@googlegroups.com>

Subject: Re: [InterSystems-EnsHlth] Pull a List of Services/Processes/Operations from a Production?

 

select ID, AlertGroups, Category, ClassName, Comment, DisableErrorTraps, Enabled, Foreground, LogTraceEvents, Name, PoolSize, Production, Schedule, Settings from Ens_Config.Item where Production='ProductionNameClassHere' order by ClassName

 

On Wednesday, April 11, 2018 at 3:25:38 PM UTC-5 mchu...@msn.com wrote:

You could use awl and query the Ens_Config.Item table

Thanks, 

Nora

 

Sent from my iPhone, please excuse typos 

Hello all.

 

What could one use to generate a list of Items (Services/Processes/Operations) from a Production?

 

I would ultimately like to generate a list of all Services, Processes, and Operations in a given Production and dump that list into a pipe delimited file.

 

I'm not asking for a complete solution, just some places to start poking around in the documentation.

 

Thanks for any pointers.  

 

Bill Casey

--

You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare Community" group.
To post to this group, send email to Ensemble-in...@googlegroups.com
To unsubscribe from this group, send email to Ensemble-in-Healt...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/Ensemble-in-Healthcare?hl=en
---
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare" group.
To unsubscribe from this group and stop receiving emails from it, send an email to Ensemble-in-Healt...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare Community" group.
To post to this group, send email to Ensemble-in...@googlegroups.com
To unsubscribe from this group, send email to Ensemble-in-Healt...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/Ensemble-in-Healthcare?hl=en
---
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare" group.
To unsubscribe from this group and stop receiving emails from it, send an email to Ensemble-in-Healt...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages