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.

I use the following two approaches combined:

  1. Interoperability production or the end-to-end integration flow is black box tested
  2. Unit tests cover any business process logic, like data transformations, that is considered to be easier to verify by unit testing than by black box testing.

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.

Jani Hurskainen · Feb 25, 2025 go to post

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.
Jani Hurskainen · Feb 11, 2025 go to post

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/

Jani Hurskainen · Jan 17, 2025 go to post

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.

Jani Hurskainen · Jan 17, 2025 go to post

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)?

Jani Hurskainen · Dec 31, 2024 go to post

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.

Jani Hurskainen · Dec 23, 2024 go to post

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.

Jani Hurskainen · Dec 12, 2024 go to post

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 ;)

Jani Hurskainen · Dec 9, 2024 go to post

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.

Jani Hurskainen · Nov 22, 2024 go to post

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.

Jani Hurskainen · Nov 18, 2024 go to post

Currently we have in-house ObjectScript code to convert a JSON configuration file into OAuth2.ServerDefinition, OAuth2.Client et al. objects.

Jani Hurskainen · Nov 18, 2024 go to post

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.

Jani Hurskainen · Nov 14, 2024 go to post

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 date2
Jani Hurskainen · Nov 5, 2024 go to post

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.

Jani Hurskainen · Nov 4, 2024 go to post

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!