Encontrar

Pregunta
· 30 oct, 2024

Using the other unit testing frameworks with IPM?

I assume IPM manifest tag UnitTest is tightly coupled with the standard unit test framework, right? However we have our own one that predates the standard one and we are not going to switch.

I think I need to import the unit test cases and then be able to run a single class method for the test run. Any ideas how this would be possible?

9 comentarios
Comentarios (9)3
Inicie sesión o regístrese para continuar
Pregunta
· 30 oct, 2024

dynamic SQL in object script code

i am trying to embed a dynamic SQL into Objectscript code , but the %NEXT() will return 0 , however when i copy the same query and run it in the SQL bit it will give me the result i want 
the code :

set myquery = "SELECT"
set myquery = myquery_" $PIECE(Substring(M.Rawcontent,Charindex('PD1|',M.Rawcontent),1000),'|',4),"
set myquery = myquery_" H1.TargetConfigName,"
set myquery = myquery_" H.Timecreated,"
set myquery = myquery_" H.MessageBodyId"
set myquery = myquery_" FROM"
set myquery = myquery_" Ens.MessageHeader H"
set myquery = myquery_" left outer join Enslib_HL7.Message M ON (H.MessageBodyId=M.ID)"
set myquery = myquery_" left outer join Ens.MessageHeader H1 ON(H.SessionID=H1.SessionID AND H1.TargetBusinessType='BusinessOperation')"
set myquery = myquery_" left outer join Enslib_HL7.Message M1 ON (H1.MessageBodyId=M1.ID)"
set myquery = myquery_" WHERE"
set myquery = myquery_" H.Timecreated >= '2024-10-14 00:00:00.000' AND"
set myquery = myquery_" H.Timecreated <= '2024-10-29 00:00:00.000' AND"
set myquery = myquery_" H.SourceConfigName IN ('Epic ADT_Router') AND"
set myquery = myquery_" H1.TargetConfigName IN ('EMS - Outgoing ADT/Scheduling/Orders') AND"
set myquery = myquery_" LEN($PIECE(Substring(M.Rawcontent,Charindex('PD1|',M.Rawcontent),1000),'|',4)) > 4"
set myquery = myquery_" GROUP BY"
set myquery = myquery_" H1.TargetConfigName"
$$$LOGINFO(myquery)
set tStatement = ##class(%SQL.Statement).%New()
set qStatus = tStatement.%Prepare(myquery)
if qStatus'=1 {write "%Prepare failed:" do $System.Status.DisplayError(qStatus)}
set rset = tStatement.%Execute()
if (rset.%SQLCODE '= 0) {write "%Execute failed:", !, "SQLCODE ", rset.%SQLCODE, ": ", rset.%Message quit}
$$$LOGINFO(rset.%SQLCODE)
Do rset.%Display()
//$$$LOGINFO(rset.%Display())
$$$LOGINFO(rset.%Print("|"))
$$$LOGINFO("Next "_rset.%Next())
$$$LOGINFO("GETDATA "_rset.%GetData(1))
while rset.%Next(){
$$$LOGINFO("Print "_rset.%Print("^|^"))
$$$LOGINFO("ODS "_rset.ods)
$$$LOGINFO("GETDATA "_rset.%GetData(1))
}

here is the  SQL runner results :

2 comentarios
Comentarios (2)3
Inicie sesión o regístrese para continuar
Pregunta
· 30 oct, 2024

Sonatype Nexus as IPM repository?

It's not supported at the moment but is it possible to implement the Sonatype Nexus (or JFrog Artifactory) support based on the current (or upcoming) IPM version?

In repo command help I see there is a support for filesystem repositories (which I have not yet tried) and my current (hopefully not far-fetched) interpretation is the IPM is designed to be able to support different repositories:

zpm:IPMTEST1>help repo
[...]
  ■ Filesystem repository:
    ∙ -filesystem, -f, -fs : Create/update a filesystem repository
    ∙ -depth, -d <value> : For filesystem repositories, specifies the depth (number of folders underneath the root) to search for files named module.xml
    ∙ -path, -p <value> : For filesystem repositories, specifies the path to the root directory
[...]
  ■ Examples
    ∙ repo -name LocalFiles -snapshots 1 -fs -depth 2 -path C:\MyWorkspace\RootModuleDir\
      Create a repository pointing to the filesystem with name LocalFiles, accepting snapshots, looking for files named module.xml up to 2 directories deep in C:\MyWorkspace\RootModuleDir\

The motivation: we already have a repository implementation used for Java and Docker builds and we would like to reuse that instead introducing a new component. I believe we're not the only ones here with this setup.

5 comentarios
Comentarios (5)4
Inicie sesión o regístrese para continuar
Artículo
· 30 oct, 2024 Lectura de 10 min

Production IRIS pilotée par une base de données avec des adaptateurs entrants personnalisés

L'utilisation traditionnelle d'une production IRIS consiste, pour un adaptateur entrant, à recevoir des données d'une source externe, à envoyer ces données à un service IRIS, puis à faire en sorte que ce service envoie ces données par l'intermédiaire de la production.

Comentarios (0)2
Inicie sesión o regístrese para continuar
Pregunta
· 30 oct, 2024

IPM package command failure: <VALUE OUT OF RANGE>zConstructTar+19^%ZPM.Utils.FileBinaryTar.1

I'm trying package IPM command but I'm getting the following error:

zpm:IPMTEST1>package -verbose -only -path /home/irisowner/ osex-ipm-hello

[IPMTEST1|osex-ipm-hello]       Package START
Exporting 'OSEX.ipm.hello.Hello.cls' to '/home/irisowner/src/OSEX/ipm/hello/Hello.cls'
Exported to /home/irisowner/module.xml
Module exported to:
        /home/irisowner/

[osex-ipm-hello]        Package FAILURE
ERROR! ObjectScript error: <VALUE OUT OF RANGE>zConstructTar+19^%ZPM.Utils.FileBinaryTar.1

What's wrong here?

I can see all the correct module files created:

$ pwd
/home/irisowner
$ ll module.xml src/OSEX/ipm/hello/Hello.cls
-rwxr-xr-x 1 irisowner irisowner 494 Oct 30 09:12 module.xml*
-rwxr-xr-x 1 irisowner irisowner 111 Oct 30 09:12 src/OSEX/ipm/hel

I'm running:

zpm:IPMTEST1>version

%SYS>     zpm          0.7.3
IPMTEST1> zpm-registry 1.3.2
https://pm.community.intersystems.com - 1.0.6
http://localhost:52773/registry/ - 1.3.2
2 comentarios
Comentarios (2)1
Inicie sesión o regístrese para continuar