Question
· Sep 30, 2021

Portal's category.

Hello,


I’m looking for a way to find out which category of portal a connector belongs to.
I looked at the class ‘Ens.Config.Production’ and ‘Ens.Config.Item’ but without success.


An idea about the ‘ObjectScript’ code to design?

Best Regards.

Product version: Caché 2018.1
$ZV: Cache for Windows (x86-64) 2018.1.4 (Build 505_1U) Thu May 28 2020 10:01:40 EDT [HealthShare Modules:Core:15.032.9035 + Linkage Engine:15.032.9035]
Discussion (11)2
Log in or sign up to continue

You can query Ens_Config.Item on ClassName:

SELECT ID, Category FROM Ens_Config.Item WHERE ClassName = "EnsLib.HL7.Service.FileService"

But you'll want to keep in mind that a production can have multiple items that use the same class, so this query could return multiple rows all with different categories.

Category applies to the item as it is configured in the production, not to the underlying class it uses.

Hello Michel,

Ens.Config.Item has a Category property. Is that what you are looking for?

sample:

TEST>s item=##class(Ens.Config.Item).%OpenId(244)                            

TEST>zw item
item=4@Ens.Config.Item  ; <OREF>
+----------------- general information ---------------
|      oref value: 4
|      class name: Ens.Config.Item
|           %%OID: $lb("244","Ens.Config.Item")
| reference count: 2
+----------------- attribute values ------------------
|       %Concurrency = 1  <Set>
|        AlertGroups = ""  <Get>
|           Category = "test.cat"
|          ClassName = "Ens.Enterprise.MsgBankOperation"  <Set>
|            Comment = ""
|  DisableErrorTraps = ""
|            Enabled = 0
|         Foreground = 0
|     LogTraceEvents = 0
|               Name = "Ens.Enterprise.MsgBankOperation"  <Get>
|           PoolSize = 1
|           Schedule = ""
+----------------- swizzled references ---------------
| i%ModifiedSettings = ""  <Set>
| r%ModifiedSettings = ""  <Set>
|       i%Production = "TESTPKG.FoundationProduction"
|       r%Production = ""
|         i%Settings = ""
|      i%Settings(1) = $lb($lb("IPAddress","Adapter","127.0.0.1"))
|      i%Settings(2) = $lb($lb("LocalInterface","Adapter",""))
|      i%Settings(3) = $lb($lb("Port","Adapter","9192"))
|      i%Settings(4) = $lb($lb("EnableArchiving","Host","1"))
|      i%Settings(5) = $lb($lb("StayConnected","Adapter","3"))
|         r%Settings = ""  <Set>
|  i%VirtualSettings = ""  <Set>
|  r%VirtualSettings = ""  <Set>
+--------------- calculated references ---------------
| CommentOrClassname   <Get>
|  InactivityTimeout   <Get,Set>
+-----------------------------------------------------

TEST>w item.Category
"test.cat"

The class can be ' citadelle.labo.bs.FileXmlTransLaboIn ' in COS.

In case of a problem, an email is sent to the IT cell and currently, the category is a parameter of the connector.

Sample code (in French) :

SET msg.Body = msg.Body_"<br/><u>Infos pour le service EAI</u> :<br/>Le connecteur de 'Service' en charge de cette tâche est répertorié dans la catégorie '"_.."Catégorie"_"'.<br/>"

SET msg.Body = msg.Body_"Il se dénomme '"_..%ClassName()_"' et le package/classe : '"_$CLASSNAME()_"'.<br/><br/>"

I want to stop using this parameter.