Enrico Parisi · Jan 18, 2024 go to post

As you did in the wizard, you need to add/specify the classpath to "your" jars, this can be done in the java gw definition (and seems you didn't) or in your code when you connect to the java gw.

The fact that it works after using the wizard (that add the javapath) suggest this may be the issue.

Enrico Parisi · Jan 18, 2024 go to post

Did you add the classpath to the java gateway definition (not the import wizard) or added before you connect to the java gw?

Enrico Parisi · Jan 18, 2024 go to post

Difficult to tell with the little info given.

Can you please provide some more detail, ideally the code you use when you say "on trying to connect"?
Did you include the classpath?

Enrico Parisi · Jan 15, 2024 go to post

Optionally, instead of using  IgnoreNull property of the reader, add to your M.PAT class:

Parameter XMLIGNORENULL = 1;

Enrico Parisi · Jan 14, 2024 go to post
  1. Use a Utility Method: Develop a utility method within a class that inherits from Ens.Util.FunctionSet. This method would read the source config name from the first message header in the session. You can then use this method in your router logic as it will be automagically included.  

Custom utility functions used in DTL and Rules are defined in a class extending/inherits from Ens.Rule.FunctionSet, not Ens.Util.FunctionSet.

As documented here.

Enrico Parisi · Jan 14, 2024 go to post

OK, I think I understand the question! 😊

Suppose you want to put the "source" HL7 Message SourceConfigName in MSH:Security:

<assign value='##class(Ens.MessageHeader).%OpenId($$$JobCurrentHeaderId).SourceConfigName' property='target.{MSH:Security}' action='set' />

In case you what to get the first message source config name:

<assign value='##class(Ens.MessageHeader).%OpenId($$$JobSessionId).SourceConfigName' property='target.{MSH:Security}' action='set' />

Enrico Parisi · Jan 13, 2024 go to post

With "Message Header" you refer to MSH segment or Ens.MessageHeader?

Ens.MessageHeader properties cannot should not be modified.

Enrico Parisi · Jan 13, 2024 go to post

The double-double quotes after .log?

d $ZF(-100,"/SHELL /LOGCMD /STDOUT=/archive/logs/failover-intengtest-vip.log""",cmd)

Enrico Parisi · Jan 12, 2024 go to post

I had the same issue in in one system and opened a WRC case.

This is a spurious message (benign, simply should not be there)  and can be ignored, nevertheless make messages.log analysis...complicated.

You may want to contact WRC and mention MAK5798  and DP-412382.

Please note that this was "First fixed in IRIS 2022.2.0", so upgrading can be another option.

Enrico Parisi · Jan 11, 2024 go to post

To "capture" output I'd use a pipe instead of $ZF(-100), here a code sample:

Class Community.ExecOS [ Abstract ]
{

/// run an operating system commandClassMethod ExecOS(cmd As%String, Output LinesOut As%String)
{
    set oldzeof=$SYSTEM.Process.SetZEOF(0)
    set io=$IO,LinesOut=0try {
        if cmd=""Quitopen cmd:"Q"use cmd
        for LinesOut=1:1 {
            read LinesOut(LinesOut)
        }
    } catch CatchError {
        If CatchError.Name'="<ENDOFFILE>" {
            set LinesOut=CatchError.Name
        }
    }
    close cmd
    Do$SYSTEM.Process.SetZEOF(oldzeof)
    Use io
    quit
}

}
EPTEST>d ##class(Community.ExecOS).ExecOS("dir",.out) 
EPTEST>zw
out=13
out(1)=" Volume in drive C has no label."
out(2)=" Volume Serial Number is 3E11-87B5"
out(3)=""
out(4)=" Directory of c:\intersystems\irishealth\mgr\eptest"
out(5)=""
out(6)="02.01.2024  12:14    <DIR>          ."
out(7)="02.01.2024  12:14    <DIR>          .."
out(8)="11.01.2024  19:04       429'916'160 IRIS.DAT"
out(9)="05.01.2024  14:26                42 iris.lck"
out(10)="24.11.2023  00:34    <DIR>          stream"
out(11)="               2 File(s)    429'916'202 bytes"
out(12)="               3 Dir(s)  63'936'786'432 bytes free"
EPTEST>
Enrico Parisi · Jan 11, 2024 go to post

Instantiated classes can be compiled with no error since....long time, I think at least Cachè 2017 but I might be wrong.

This is also documented here:

Compiling When There Are Existing Instances of a Class in Memory

If the compiler is called while an instance of the class being compiled is open, there is no error. The already open instance continues to use its existing code. If another instance is opened after compilation, it uses the newly compiled code.

However, the code to scan all processes variables is good to know/useful!

Enrico Parisi · Dec 28, 2023 go to post

Thank you for ll the info, I was able to install git-source-control and I'm....fighting testing it.

I think that the main problem with OEX software is the lack of information/details/documentation on how to install, configure and the use them.

Even ZPM itself suffer this problem, I found nowhere that a ZPM package can be downloaded as  tarball and installed using the load command.
Where is the url for downloading the the tarballs for the ZMP packages reported/documented?

The git-source-control has very (very, very....) limited documentation/information on any aspect, from configuration to usage. Often it's a reverse engineering activity  to figure out how it (should) work.
The feeling is that is a half backed software that has been abandoned.

Nevertheless I keeping fighting testing it.

Enrico Parisi · Dec 27, 2023 go to post

I found the problem.

The issue does not happen if the service user is changed using:

IRISinstall.exe setserviceusername <instance-name> <username> <password>

When that command is issued two groups are created:

IRISServices
IRIS_Instance_<InstanceNme>

and the service user is added as member of there two groups.

The reason that it works using this way is that to the IRISServices group, in Local Security Policy is assigned the "Replace a process level token" user right.

In other words, the user that stars IRIS need the "Replace a process level token" right assigned via Local Security Policy (or GPO in an AD Domain).

Lesson learned:
- Use IRISinstall.exe to change the user for the IRIS service
or
- Assign "Replace a process level token" right to the user of IRIS service

Enrico Parisi · Dec 22, 2023 go to post

That's EXACTLY what a Schedule setting does in any Item/Business Host (Business Service in your case).

Enrico

Enrico Parisi · Dec 22, 2023 go to post

Well...installing a ZPM registry require ZPM itself and internet connection.

Additionally, in environments with no internet connection adding a new server (or docker) with internet connection just to install a source control software does not sound like "a solution".

I understand that ZPM is simple and handy, but why not releasing a stand alone installer that can be downloaded and installed without ZPM?

Enrico

Enrico Parisi · Dec 21, 2023 go to post

Is internet connection a requirement?

It seems is not possible to download and install it without using ZPM that require internet connection.

Not every server has internet connection.

Enrico

Enrico Parisi · Dec 21, 2023 go to post

"Unfortunately  the Schedule Option isn't suitable where we need the job to run only once at a set time per day"

Why not? It is definitely possible to schedule to start every day at 8:00 for example using this schedule string:

START:*-*-*T08:00:00,STOP:*-*-*T08:10:00

You start a Business Service at 8:00 and stop it at 8:10 (for example).
All you need to take care is that the BS only make one call when started.

Enrico

Enrico Parisi · Dec 18, 2023 go to post

Yeah, it has happened to me too, it seems WRC is not interested in fixing/reporting bugs when any sort of workaround is possible/available, like using a different class in this case.

The community is frequented by InterSystems product managers, developers, sales engineers and many other InterSystems people, maybe out of compassion will report it and will get it fixed, so maybe in IRIS 2026 we will see it fixed! 😂

Fixing this does not seems to be difficult, it's just  matter of filtering/checking the XData block  before (blindly) using it as JSON map.

I'm not holding my breath....

Enrico Parisi · Dec 18, 2023 go to post

It seems you cannot use ax XData block of "MimeType = application/json" within a class that extends %JSON.Adaptor.

Put your XData block in a different class that does not extends %JSON.Adaptor.

This may be a bug, (it looks so to me), you may want to report it to WRC.

Enrico