To me a similar kind of compile loop is triggered when you have multiple VS Code instances connected to IRIS. I have learned to toggle the other connections off but it's an annoying feature.
- Log in to post comments
To me a similar kind of compile loop is triggered when you have multiple VS Code instances connected to IRIS. I have learned to toggle the other connections off but it's an annoying feature.
Recording/transcript for us who didn't make it to the conference hall?
I use the following two approaches combined:
The test are usually slightly overlapping but I don't see that a problem. You mix these approached in the relevant way for your integration application.
I don't mock business operations in #1, as I don't want to modify system under test, but I mock the external systems and configure the business operations to connect the mocks. For unit testing (#2) the standard software industry mock practices are just fine and have nothing Interoperability specific.
I have seen cases in #1 with both Apache Camel and IRIS Interoperability where the actual integration was changed (i.e. some components where replaced with mocks) for testing but in all cases the outcome was very brittle and hard to maintain test code. Definitely it is possible but moving the mocks out of the integration just made the testing much simpler and straightforward. That's just my experience working with mainly HTTP and JDBC connectivity, YMMV.
You also want to make it trivial to trigger the integration flow programmatically. Sometimes that's extra test only code in your integration but usually not.
In Interoperability you keep your business services and hosts very thin so there should be not much to test so they should usually be covered with rather trivial smoke test cases. You can also inspect the message flow programmatically to verify the correct messaging inside the flow. We have tooling in our in-house testing framework for that (essentially SQL queries to Ens tables).
This is how I have been setting up IRIS instance local filesystem registries. I'm still using an old 0.9.1 version so your version might behave differently.
The repository location is recorded by environment variable IPM_LOCAL_REGISTRY.
In ObjectScript shell %SYS namespace:
// install ipm
do $system.OBJ.Load("/path/to/zpm-0.9.1.xml","ck",.errorlog)
// setup local filesystem ipm registry
zwrite ##class(%IPM.Main).Shell("repo -name REPONAME -filesystem -depth 2 -path ${IPM_LOCAL_REGISTRY}")A (minimized) bash script used to install module tarballs:
#!/bin/bash
declare -r tarball=${1}
declare -r workdir=$(mktemp --directory --tmpdir=/tmp ipm-module.XXXXXX)
trap "rm -rf ${workdir}" EXIT
declare -r manifest=${workdir}/module.xml
tar zxf ${tarball} -C ${workdir}
declare -r name=$(perl -ne 'if (m/<Name>(.*?)<\/Name>/) { print "$1"; last; }' ${manifest})
declare -r version=$(perl -ne 'if (m/<Version>(.*?)<\/Version>/) { print "$1"; last; }' ${manifest})
declare -r module_dir=${IPM_LOCAL_REGISTRY}/${name}/${version}
if [[ -d ${module_dir} ]]; then
echo "Module ${name} version ${version} is already in the local registry"
exit 0
fi
mkdir -p ${module_dir}
cp -r ${workdir}/* ${module_dir}It will untar the tarball, figure out the module name and version from the manifest file and copy the sources to correctly named directory.
I also have other scripts that will fetch the tarballs from the actual artifact repository where the module tarballs are stored.
The last test (or assert) in TestLowerCase() is faulty (testing an empty string).
##class(Ens.Director).GetProductionStatus() will tell you if the production state is running/stopped/suspended/troubled.
Documentation:
https://docs.intersystems.com/iris20241/csp/documatic/%25CSP.Documatic…
Just nitpicking but I think it's 2022.1.7.1116.1, not 116.
Thanks for the background.
The following is for the documentation team:
From: https://docs.intersystems.com/irisforhealthlatest/csp/docbook/DocBook.U…
Case-sensitive: variable names (other than the ObjectScript system variables) are case-sensitive. Names of packages, classes, and class members, names of routines and their entry points, names of include files and macros are also all case sensitive.
This is plain wrong. The package and class names are case in-sensitive as you can read in this message thread and in the compilation example below:
Compilation started on 02/25/2025 10:16:38 with qualifiers 'bckru' Compiling class Foo.Class1 Compilation finished successfully in 0.056s. ERROR #5093: Name conflict on class 'foo.Class2' because package 'Foo' has the same name but differs in case. ERROR #5092: Name conflict on class 'Foo.class1' because class 'Foo.Class1' has the same name but differs in case.
I guess the 2025 answer is to look at Python solution(s) which are likely many. A quick internet search suggests e.g. https://pypi.org/project/jsondiff/ that seems to be a reasonable complete, recent and popular.
Unfortunately I'm not yet arrived to IRIS Python-land, hence I had to come up yet another partial solution that fits to my current use case:
https://github.com/janihur/objectscript-ex/blob/main/src/OSEX.Json.Comp…
How to take control of your own code snippets:
The "old school" way: keep a "tidy" public or private repository from where you can easily import the code into any namespace with $system.OBJ.ImportDir
The "new school" way: organize the code into a public or private IPM module (or modules). In case of public code host the module(s) in https://openexchange.intersystems.com/?zpm=1 Remember to be explicit about the license!
Select top level package name (try to follow the de-facto naming rules) and organize the code there as you see best (use sub packages and classes).
I don't know about public collections of functions but browse and follow-up the https://openexchange.intersystems.com/
In addition they have to by case-insensitive unique.
IMO this is s strange way of saying the name is case insensitive.
If foo, Foo and FOO are consider the same name then the name is case insensitive.
If foo, Foo and FOO are consider different names then the name is case sensitive.
Err ... class names are not case sensitive?
ERROR #5092: Name conflict on class 'Package.subpackage.classname' because class 'Package.subpackage.ClassName' has the same name but differs in case.
Is there a related configuration option(s)?
I just added a column to show completion of parts in the exercises
- - no part
- 1 only part 1 (silver star)
- 2 only part 2 (another silver star)
- 3 1+2 both parts completed (gold star)
The option 2 is redundant. Part 2 only unlocks when part 1 has been solved.
Now available on your favorite internet community portal: My little Advent of Code 2024 journey!
If you update from IPM 0.7.x to 0.9.0 [...]
I have no idea how one could update IPM and I don't see updating mentioned anywhere in the documentation. I created https://github.com/intersystems/ipm/issues/673 with a bit more background. Let's continue discussion there.
Did you noticed the top level schemas import even more schemas? E.g. VSDService.xsd imports ../ConnectorContext.xsd that imports ConnectorCommon.xsd and so on.
I know nothing about IRIS WSDL support but I suspect you have to have all the types from bottom-up.
v0.9.1 has been out for some time now!
I'm definitely and permanently fallen behind and used already most of my annual skill+time puzzle quota. So I'm not expecting to solve more than 7 or 8 first days. However you'll get a small story about my learnings here when I'm done ;)
Great! After I have upgraded it too we can have a session about my IPM usage scenario if you're still interested. I guess the session could take place on early January.
Any updates when 0.9 will be released?
I feel your pain. It's very frustrating to work with systems like that 😟I'd recommend to put as much "pressure" as possible on the upstream system to fix their MSH18. Or course that might not be a realistic option in your case.
Can't you check MSH.18 - Character Set? See e.g. https://hl7-definition.caristix.com/v2/HL7v2.5/Fields/MSH.18
Or are we talking about something else ?
Yes, this seems to make sense.
However one will miss all this if just reading:
As I did. I'll file a documentation issue 😒
Currently we have in-house ObjectScript code to convert a JSON configuration file into OAuth2.ServerDefinition, OAuth2.Client et al. objects.
Related: how do I configure locale with CPF? I didn't find an option. Currently we are running:
do ##class(Config.NLS.Locales).Install("finw")
set ^SYS("NLS", "Config", "Collation")="Finnish3"with iris terminal.
I'm not sure if there is other options too but how about to convert the dates into strings? In select use to_char() and in insert use to_date():
select
-- date to string with to_char()
to_char(current_date, 'YYYY-MM-DD') as date1,
-- string to date with to_date
to_date('2024-11-14','YYYY-MM-DD') as date2So the conclusion is the compiler doesn't have tail-call elimination.
I finally figured this out with a help of a colleague! I just had to create a user that I can use for authentication in publish operation. AFAICS now everything works as expected.
The difference in authentication of zpm-registry's /package and /packages paths confused me untiI I read the source code.
Essentially my problem here was this was the first time I run into these web applications and IRIS authentication model.
Unfortunately the company doesn't have open-source culture (yet) so the answer is no.
However I have got an assignment a while ago to argument why the company should open-source software components. So if you or anyone where here have good arguments please share 😉 I do have my own list of arguments already but more the merrier!