Check ##class(HS.Util.Installer.Foundation).Install()
- Log in to post comments
Check ##class(HS.Util.Installer.Foundation).Install()
It's a bug, I've created an issue in github with a possible fix.
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.
At the moment IRIS does not support OpenAPI 3.0, the project OpenAPI-Suite in Open Exchange ("Set of tools for ObjectScript code generation from Swagger 3.0") support it.
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
That's EXACTLY what a Schedule setting does in any Item/Business Host (Business Service in your case).
.png)
Enrico
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
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
"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
have a look to this article:
"here has to be a way to do this. No?"
well...no!
iris force <instance name>
Edit: wrong answer, see @Joel Solon comment below
Look the methods FileCompact() and and ReturnUnusedSpace() in the class SYS.Database.
Enrico
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....
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
Set sc=##class(%File).GetDirectorySpace("D:",.FreeSpace)
Write FreeSpace
classmethod GetDirectorySpace(Name As %String, ByRef FreeSpace As %String, ByRef TotalSpace As %String, Flag As %Integer = 1) as %Status
Return the amount of total space and free space in either Bytes,MB,GB on a drive or directory
Name = Valid Drive or directory specification
Flag = 0 - Return bytes
Flag = 1 - Return MB (Default)
Flag = 2 - Return GB
MB and GB returned are rounded to 2 decimal places.
Any error status returned is O/S level error. Note that on Windows only drives have a measurement for free space and directories can not so the FreeSpace is only returned for drives.
@Julius Kavay , nice code.
But the point was "more efficiently than using a serialization/deserialization", with this code it takes more than 4 times as serialization/deserialization.
I think that using serialization/deserialization IS very efficient.
@Rodrigo Werneck , are you having performance issues? What makes you think serialization/deserialization is inefficient? Did you measure the performance in your use case?
Enrico
Do you know the function name?
Do you need the *exact* function body (including comments, formatting etc.) or just the function code?
set status = instance.OnProcessInput(classToPostHandler, .response)You are not supposed to call the OnProcessInput() callback method directly, instead the ProcessInput() method should be called.
Sometime calling OnProcessInput() works, sometimes create problems.
Enrico
Please note that "%PosixTime values have a 1 microsecond resolution", see %Library.PosixTime class reference documentation.
Then:
USER>set ts="2023-12-12 19:46:19.000"
USER>set Posix=##class(%Library.PosixTime).TimeStampToLogical(ts)
USER>write ##class(%Library.PosixTime).LogicalToTimeStamp(Posix-18000000000)
2023-12-12 14:46:19
Enrico
Personally I usually prefer to assign permissions to Web Applications and assign to the users only the role necessary to use the application.
Often I don't need/want the user itself to have direct access to resources (i.e. database, tables//classes etc.), what I want is the ability for the user to access/use the Web Application (the FHIR server in this case), then the application itself has the required privilege.
In short, I don't what the user to be authorized to mess with the "internal" stuff...just use the application.
Of course this is a matter of preferences and use case scenario.
Enrico
My guess is that the user does not have enough privilege (role/resource permissions) to access your FHIR server, maybe the database resource?
If so, you have two options:
1) add to the user the required role(s) with proper access to the required resource(s)
2) add to the Web Application the required role(s) with proper access to the required resource(s)
Personally I would prefer option 2.
Just for testing, try to temporary %All role to the Web Application and see if it works.
Enrico
This Javascript:
var iv = CryptoJS.enc.Hex.parse("00000000000000000000000000000000");
var stringyouWantToEncrypt = "HelloWorld";
var base64Key = "RXJjb2xpbm9zZW1wcmVpbnBpZWRpMDEyMzQ1Nzg5MDE=";
var encrypted = CryptoJS.AES.encrypt(
stringyouWantToEncrypt,
CryptoJS.enc.Base64.parse(base64Key),
{
iv: iv,
}
)
And this ObjectScript:
Set text="HelloWorld"
Set IV=$c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
Set KEY = "RXJjb2xpbm9zZW1wcmVpbnBpZWRpMDEyMzQ1Nzg5MDE="
Set KEY=$SYSTEM.Encryption.Base64Decode(KEY)
Set text=$ZCONVERT(text,"O","UTF8")
Set sCrypt=$SYSTEM.Encryption.AESCBCEncrypt(text,KEY,IV)
Set sToken=$SYSTEM.Encryption.Base64Encode(sCrypt)
Write !,!, "Encoded -> "_sToken
Both return the same:
Encoded -> 2s4qbUJC6romvsp7TP2L4A==
Enrico
Ciao Barbara,
In your JS code:
var iv = CryptoJS.enc.Hex.parse("0000000000000000");
Convert the HEX sequence to a string, the resulting string made of 8 characters, all with ascii value of zero.
In AES, IV *must" be 16 characters long, I have no idea how your JS library handle this invalid value, IRIS correctly returns an error if IV is not 16 characters long.
The sample in the page you linked uses an IV made of 16 characters, converted from an HEX sequence.
In addition, you are passing to $SYSTEM.Encryption.AESCBCEncrypt() the KEY encoded in base64, in JS th base 64 KEY is decoded before use, so it should be:
Set sCrypt=$SYSTEM.Encryption.AESCBCEncrypt(text,$SYSTEM.Encryption.Base64Decode(KEY),IV)
Moreover, as Ralf pointed out, make sure the key is 16, 24, or 32 characters long
Ciao,
Enrico
Excellent job Dan!
I believe this is going to be very helpful for the community.
This week I will be out for training a course, so I have limited time to try the sample.
Enrico
Keep in mind that production CONFIG is stored in the database when the production class is compiled.
Enrico
Use foreach action to loop DRGgrp() and inside the loop insert an if action to the check if = "PMP", use break action when found.
If you need more detail, provide a sample HL7 message and specify what you need to do after finding it.
Enrico
Outstanding article, congratulations Kurro! 👏
Just one note on base64 conversion.
In fact you don't need to worry about the base64 conversion, all you need is to set ContentTransferEncoding to "base64" and then %Net.MIME* will take care of it, including adding the header "Content-Transfer-Encoding: base64" in the mime part header.
So, all you need is:
set content.ContentTransferEncoding = "base64"
set content.Body = pImage ; pImage is binary stream
Enrico
Use foreach action to loop DRGgrp() and inside the loop insert the check.
Enrico