新しい投稿

検索

質問
· 2024年10月16日

Error Executing Stored Procedure in InterSystems Cache using SQL

I am experiencing an issue while executing a stored procedure in InterSystems Cache. Here’s the procedure I created

CREATE PROCEDURE Silk.sp_InsertRecord (
    IN RecordDate TIMESTAMP,
    IN UserName VARCHAR(50),
    IN RecordType INT,
    IN RecordID VARCHAR(50),
    IN CategoryID INT,
    IN ApprovalDate TIMESTAMP,
    IN FileSize BIGINT,
    IN WorkstationName VARCHAR(50)
)
BEGIN 
    INSERT INTO DummyRecords (
        RecordKey, 
        FilePath, 
        RecordDate, 
        UserName, 
        RecordType, 
        RecordID, 
        CategoryID, 
        FileSize
    ) 
    VALUES (
        'd4a4e44b-4b56-4a74-b7f5-e44716fa5a13', 
        '', 
        RecordDate, 
        UserName, 
        RecordType, 
        RecordID, 
        CategoryID, 
        FileSize
    ); 
END

This creates an SP of Function type.

Issue:

I encounter the following error upon execution:

Namespace: SILK
Process: 29088
Error:
2024-10-17 12:25:54 [SQLCODE: <-400>:<Fatal error occurred>] [Cache Error: <<UNDEFINED>zspInsertObject+50^Silk.procspInsertObject.1 *%ROWCOUNT>] [Location: <SPFunction>] [%msg: <Unexpected error occurred: <UNDEFINED>%0Ao+3^Silk.procspInsertObject.1 *%mmmsqld(3)>]

However, when I execute the stored procedure without passing any parameters and hardcode the values directly, it executes without any errors. Then it usually creates a query type procedure.

Additional Information:

  • I am new to Cache and not entirely sure why I'm getting this error.
  • The stored procedure compiles without any syntax errors. This is just an example..

Can someone help me understand why this error is occurring and how I can resolve it? Any guidance on how to properly debug or fix this issue would be greatly appreciated.

ディスカッション (0)0
続けるにはログインするか新規登録を行ってください
質問
· 2024年10月16日

JWT Signature Creation for OAuth Call

Working on a project where I'm needing to make FHIR calls from my HealthConnect Interop production to Epic. 

My issue is I'm not able to construct a valid JWT for the OAuth token retrieval that Epic will accept. I have the below code where I'm able to create a valid header and payload that I'm base64URL encoding and then trying to sign with my .pem private key file. However, Epic is not liking the signature portion of my JWT.

As such, I wanted to present my code to see if I'm performing the signature steps correctly? I've seen some posts where the %Net.JSON JWT specific classes were used to generate the token, but I am thinking this method should work?

Any thoughts on this issue, or insight from other folks who have made OAuth calls from HealthConnect to Epic before, would be greatly appreciated! 

 

ClassMethod CreateJWT(pHostIn As %String) As Epic.Utils.JWTHeader
{
        
//Set Headers using message class I created.
set Header = ##class(Epic.Utils.JWTHeader).%New()
set Header.alg = "RS384"
Set Header.typ = "JWT"

//Set Epic payload values using message class I created.
Set Payload = ##class(Epic.Utils.JWTPayload).%New()
Set Payload.iss = "<Client ID>"
set Payload.sub = "<Client ID>"
set Payload.aud = pHostIn
Set Payload.jti = $SYSTEM.Util.CreateGUID()
Set Payload.exp = ##class(%Library.UTC).SecondsSinceUnixEpoch($ztimestamp)+3500

//Convert the Header and Payload JSON to stings.
do Header.%JSONExportToString(.HeaderString)
do Payload.%JSONExportToString(.PayloadString)

//Concat the Header and Payload together with period and Base64URL encode them.
set PayloadToSign = $$$BASE64URLENCODE(HeaderString)_"."_$$$BASE64URLENCODE(PayloadString)

//Open the private key pem file to be used for the RSA signature.
Set File=##class(%Stream.FileBinary).%New()
set File.Filename = "/PrivateKey.pem"
set PVKey = File.Read($$$MaxLocalLength)

//sign the concatenated Header and Payload using the PVKey from the file.
Set RSASig=##class(%SYSTEM.Encryption).RSASHASign(384,PayloadToSign,PVKey)

//Base64URL encode the returned RSA signature.
set Signature = $$$BASE64URLENCODE(RSASig)

//Concat the original Header/Payload string with the Base64URL encoded signature.
Set JWT = PayloadToSign_"."_Signature

//Return the fully constructed JWT for the token call.
       Quit JWT
}

1 Comment
ディスカッション (1)1
続けるにはログインするか新規登録を行ってください
記事
· 2024年10月16日 2m read

configuração do recurso de Python Flexível em Tempo de Execução no IRIS 2024.2

Olá Comunidade,

Este artigo tem como objetivo guiá-lo pelo processo de configuração e utilização do recurso Python Runtime Flexível para Python embutido. Antes da versão 2024.2, o instalador do InterSystems IRIS incluía uma versão pré-instalada do Python. Você pode encontrar as bibliotecas Python e os arquivos de aplicação localizados no diretório \lib\python dentro da sua pasta de instalação do IRIS (por exemplo, C:\InterSystems\IRIS20242\lib\python).

No entanto, a partir da versão 2024.2, o instalador do IRIS não mais inclui a instalação do Python por padrão. Consequentemente, você não encontrará esses arquivos no diretório mencionado. É necessário que você instale a versão necessária do Python para trabalhar eficazmente com Python embutido no IRIS.

Vamos proceder à configuração do recurso runtime flexível dentro do meu ambiente IRIS.

Eu instalei a versão comunitária 2024.2 na minha máquina e tentei conectar o shell python imediatamente no terminal IRIS.

USER>Write $ZV
IRIS for Windows (x86-64) 2024.2 (Build 247U) Tue Jul 16 2024 09:57:03 EDT
USER>Do $SYSTEM.Python.Shell()
ERROR #5002: ObjectScript error: <OBJECT DISPATCH>Shell+16^%SYS.Python.1 *Failed to Load Python: Check documentation and messages.log, Check CPF parameters:[PythonRuntimeLibrary,PythonRuntimeLibraryVersion], Check sys.path setup in: $INSTANCE/lib/python/iris_site.py.

Ele lança um erro devido à configuração ausente dos valores PythonRuntimeLibrary  e PythonRuntimeLibraryVersion (nota: eu já defini a versão PythonRuntimeLibraryVersion)

Agora, eu já instalei o python 3.12.5 no meu sistema e configurei os valores nas configurações.

PythonRuntimeLibrary  - “C:\Program Files\Python312\python3.dll”
PythonRuntimeLibraryVersion - 3.12

Depois de configurado, executei o Do $SYSTEM.Python.Shell() novamente e consegui entrar no shell Python com sucesso.

Observação: O recurso de tempo de execução flexível do Python, de acordo com a documentação, não é suportado para todos os sistemas operacionais.

ディスカッション (0)1
続けるにはログインするか新規登録を行ってください
質問
· 2024年10月16日

Web gateway and management portal configuration in Mirrored environment

Is it possible to use one IIS server to configure Webgateway and external Webserver for management portal when implementing synchronous mirroring with VIP  i.e Is it necessary to have two mirror servers(primary and Backup) , one Arbiter server, one Webserver for Webgateway and a sperate webserver for management portal? 

If anyone can please point to any documentation on Mirroring with Webgateway and external webserver for management  portal will be really helpful. 

 

Thank you for your help

6 Comments
ディスカッション (6)2
続けるにはログインするか新規登録を行ってください
質問
· 2024年10月16日

File generation issues while using $ZF(-100 asynchronously

Hello Community,

We use $ZF(-1 synchronous call to generate the pdf files. Now I want to change to asynchronously. So, I use $ZF(-100 with "/ASYNC" function. I use "/ASYNC" directly write $ZF(-100,"/ASYNC","notepad.exe") in windows/linux it throws the <NOTOPEN> error, However If I use $ZF(-100,"/ASYNC /SHELL","notepad.exe") it opens the notepad without issues.

However, I execute the below in Linux system the file is not generated properly. But  $ZF(-2,"/ASYNC /SHELL", " /fop/fop -r -fo ""/grp1/tempXSL-FO.TT.12.xml"" -pdf ""/grp1/tempXSL-FO.TT.12.pdf"" 1>/dev/null 2>""/grp1/tempXSL-FO.TT.12.err"" ") this works

write $ZF(-100,"/ASYNC /SHELL", " /fop/fop -r -fo ""/grp1/tempXSL-FO.TT.12.xml"" -pdf ""/grp1/tempXSL-FO.TT.12.pdf"" 1>/dev/null 2>""/grp1/tempXSL-FO.TT.12.err"" ")

Thanks!

ディスカッション (0)1
続けるにはログインするか新規登録を行ってください