Announcement
· Mar 11, 2020

New Coding Talk: How to Create and Submit an Application for InterSystems IRIS Online Programming Contest 2020

Hey Developers,

New "Coding Talk" video was specially recorded by @Evgeny Shvarov for the IRIS Programming Contest

How to Create and Submit an Application for InterSystems IRIS Online Programming Contest 2020

https://www.youtube.com/embed/qyUT195Pic0
[This is an embedded link, but you cannot view embedded content directly on the site because you have declined the cookies necessary to access it. To view embedded content, you would need to accept all cookies in your Cookies Settings]

In this video, you will know how to create your InterSystems IRIS ObjectScript application which runs with Docker. You will see how to submit it to Open Exchange and then how to participate with the application in InterSystems IRIS Online Programming Contest.

Check out the related InterSystems ObjectScript GitHub template project

Enjoy watching the video! 


🔥 Join the Online Programming Contest, show your best ObjectScript skills on InterSystems IRIS and earn some $ and glory! 🔥

Stay tuned for updates in this post.

Discussion (6)1
Log in or sign up to continue

Any IRIS edition includes formerly known as Ensemble feature, which is now is Interoperability (and one of the letters in IRIS).

You may get this error if you work in the namespace where Ensemble was activated. By default for USER was not activated.

When you create a new namespace Ensemble checkbox checked by default and, but you can uncheck it.

to enable namespace manually, do this command

do ##class(%EnsembleMgr).EnableNamespace("YOUR-NAMESPACE")

Evgeny, it still does not work. I had tried to use "yes" instead of "no" for "Ensemble" flag. Now I also tried "1". It still gives me error that superclasses do not exist. Can you please look at my terminal output? I show Installer.cls at the bottom below:

[node1] (local) root@192.168.0.23 ~
$ git clone https://github.com/oliverwilms/iriscontest2020
Cloning into 'iriscontest2020'...
remote: Enumerating objects: 64, done.
remote: Counting objects: 100% (64/64), done.
remote: Compressing objects: 100% (56/56), done.
remote: Total 64 (delta 21), reused 19 (delta 4), pack-reused 0
Unpacking objects: 100% (64/64), done.
[node1] (local) root@192.168.0.23 ~
$ cd iriscontest2020/
[node1] (local) root@192.168.0.23 ~/iriscontest2020
$ docker-compose build
Building iris
Step 1/16 : ARG IMAGE=store/intersystems/irishealth:2019.3.0.308.0-community
Step 2/16 : ARG IMAGE=store/intersystems/iris-community:2019.3.0.309.0
Step 3/16 : ARG IMAGE=store/intersystems/iris-community:2019.4.0.379.0
Step 4/16 : ARG IMAGE=store/intersystems/iris-community:2020.1.0.199.0
Step 5/16 : ARG IMAGE=intersystemsdc/iris-community:2019.4.0.383.0-zpm
Step 6/16 : FROM $IMAGE
2019.4.0.383.0-zpm: Pulling from intersystemsdc/iris-community
898c46f3b1a1: Pull complete
63366dfa0a50: Pull complete
041d4cd74a92: Pull complete
6e1bee0f8701: Pull complete
973e47831f38: Pull complete
b0c3b996c3e3: Pull complete
b48eef952cda: Pull complete
8254746f78e2: Pull complete
ec1f0f74baf0: Pull complete
fdc6015ec77d: Pull complete
b72c9a7f8270: Pull complete
c108d032e6d0: Pull complete
caf30f8515db: Pull complete
02b9549ccbc9: Pull complete
Digest: sha256:fc52a2359da312a5c39010a24d15e84a09ed6f3f2828e54021ebed54a3cb4c1a
Status: Downloaded newer image for intersystemsdc/iris-community:2019.4.0.383.0-zpm
 ---> 2f9eb08f28e3
Step 7/16 : USER root
 ---> Running in 78efd07fbcb0
Removing intermediate container 78efd07fbcb0
 ---> c8f8dddbd96e
Step 8/16 : WORKDIR /opt/irisapp
 ---> Running in a436b17bdd9c
Removing intermediate container a436b17bdd9c
 ---> da8cdcae02a1
Step 9/16 : RUN chown ${ISC_PACKAGE_MGRUSER}:${ISC_PACKAGE_IRISGROUP} /opt/irisapp
 ---> Running in 1698d44c50eb
Removing intermediate container 1698d44c50eb
 ---> c9c75c4960cd
Step 10/16 : USER irisowner
 ---> Running in dd49a263a773
Removing intermediate container dd49a263a773
 ---> abef13ffc4de
Step 11/16 : COPY  Installer.cls .
 ---> b01d3b536e89
Step 12/16 : COPY  src src
 ---> 6ed1aa33393e
Step 13/16 : COPY irissession.sh /
 ---> 2b8436f61475
Step 14/16 : SHELL ["/irissession.sh"]
 ---> Running in 9eca533f3ef5
Removing intermediate container 9eca533f3ef5
 ---> 63ee158e5412
Step 15/16 : RUN   do $SYSTEM.OBJ.Load("Installer.cls", "ck")   set sc = ##class(App.Installer).setup()
 ---> Running in afd2046fb280
This copy of InterSystems IRIS has been licensed for use exclusively by:
InterSystems IRIS Community
Copyright (c) 1986-2019 by InterSystems Corporation
Any other use is a violation of your license agreement
Starting IRIS

Node: afd2046fb280, Instance: IRIS

%SYS>

%SYS>

Load started on 03/24/2020 02:21:26
Loading file Installer.cls as udl
Compiling class App.Installer
Compiling routine App.Installer.1
Load finished successfully.
2020-03-24 02:21:26 0 App.Installer: Installation starting at 2020-03-24 02:21:26, LogLevel=3
2020-03-24 02:21:26 3 Evaluate: #{$system.Process.CurrentDirectory()}src -> /opt/irisapp/src
2020-03-24 02:21:26 3 SetVariable: SourceDir=/opt/irisapp/src
2020-03-24 02:21:26 3 SetVariable: Namespace=IRISAPP
2020-03-24 02:21:26 3 SetVariable: app=irisapp
2020-03-24 02:21:26 3 Evaluate: ${Namespace} -> IRISAPP
2020-03-24 02:21:26 3 Evaluate: ${Namespace} -> IRISAPP
2020-03-24 02:21:26 3 Evaluate: ${Namespace} -> IRISAPP
2020-03-24 02:21:26 3 Evaluate: ${Namespace} -> IRISAPP
2020-03-24 02:21:26 3 Evaluate: /opt/${app}/data -> /opt/irisapp/data
2020-03-24 02:21:26 3 Evaluate: %DB_${Namespace} -> %DB_IRISAPP
2020-03-24 02:21:26 1 CreateDatabase: Creating database IRISAPP in /opt/irisapp/data/ with resource %DB_IRISAPP
2020-03-24 02:21:26 2 CreateDatabase: Overwriting /opt/irisapp/data/IRIS.DAT
2020-03-24 02:21:26 2 CreateDatabase: Adding database IRISAPP
2020-03-24 02:21:26 2 CreateDatabase: Creating and assigning resource '%DB_IRISAPP' to IRISAPP
2020-03-24 02:21:26 1 CreateNamespace: Creating namespace IRISAPP using IRISAPP/IRISAPP
2020-03-24 02:21:26 2 CreateNamespace: Adding namespace IRISAPP
2020-03-24 02:21:26 1 ActivateConfiguration: Activating Configuration
2020-03-24 02:21:26 3 Evaluate: ${SourceDir} -> /opt/irisapp/src
2020-03-24 02:21:26 1 Import: Loading /opt/irisapp/src (isdir=1) into IRISAPP, recurse=1

Load of directory started on 03/24/2020 02:21:26

Loading file /opt/irisapp/src/DMLSS/FilePassthroughService.cls as udl
Loading file /opt/irisapp/src/DMLSS/EmailPassthroughOperation.cls as udl
Loading file /opt/irisapp/src/DMLSS/Production.cls as udl
Loading file /opt/irisapp/src/PackageSample/ObjectScript.cls as udl
Loading file /opt/irisapp/src/DMLSS/Util.cls as udl
Loading file /opt/irisapp/src/PackageSample/PersistentClass.cls as udl

Compilation started on 03/24/2020 02:21:26 with qualifiers 'ck'
ERROR #5373: Class 'Ens.BusinessOperation', used by 'DMLSS.EmailPassthroughOperation:superclass', does not exist
Skip class DMLSS.EmailPassthroughOperation
ERROR #5373: Class 'Ens.BusinessService', used by 'DMLSS.FilePassthroughService:superclass', does not exist
Skip class DMLSS.FilePassthroughService
ERROR #5373: Class 'Ens.Production', used by 'DMLSS.Production:superclass', does not exist
Skip class DMLSS.Production
Compiling 3 classes, using 3 worker jobs
Compiling class DMLSS.Util
Compiling class PackageSample.ObjectScript
Compiling class PackageSample.PersistentClass
Compiling table PackageSample.PersistentClass
Compiling routine PackageSample.ObjectScript.1
Compiling routine DMLSS.Util.1
Compiling routine PackageSample.PersistentClass.1
Detected 3 errors during compilation in 0.112s.

ERROR #5373: Class 'Ens.BusinessOperation', used by 'DMLSS.EmailPassthroughOperation:superclass', does not exist
Detected 3 errors during load.
2020-03-24 02:21:26 0 App.Installer: ERROR #5373: Class 'Ens.BusinessOperation', used by 'DMLSS.EmailPassthroughOperation:superclass', does not exist
2020-03-24 02:21:26 0 App.Installer: ERROR #ConfigFailed: Unknown status code: <Ins>ConfigFailed )
  > ERROR #5373: Class 'Ens.BusinessOperation', used by 'DMLSS.EmailPassthroughOperation:superclass', does not exist
2020-03-24 02:21:26 0 App.Installer: Installation failed at 2020-03-24 02:21:26
2020-03-24 02:21:26 0 %Installer: Elapsed time .423668s

%SYS>
ERROR: Service 'iris' failed to build: The command '/irissession.sh do $SYSTEM.OBJ.Load("Installer.cls", "ck")   set sc = ##class(App.Installer).setup()' returned a non-zero code: 1
[node1] (local) root@192.168.0.23 ~/iriscontest2020
$ cat Installer.cls
Class App.Installer
{

XData setup
{
<Manifest>
  <Default Name="SourceDir" Value="#{$system.Process.CurrentDirectory()}src"/>
  <Default Name="Namespace" Value="IRISAPP"/>
  <Default Name="app" Value="irisapp" />

  <Namespace Name="${Namespace}" Code="${Namespace}" Data="${Namespace}" Create="yes" Ensemble="1">

    <Configuration>
      <Database Name="${Namespace}" Dir="/opt/${app}/data" Create="yes" Resource="%DB_${Namespace}"/>

      <Import File="${SourceDir}" Flags="ck" Recurse="1"/>
    </Configuration>
    <CSPApplication Url="/csp/${app}" Directory="${cspdir}${app}"  ServeFiles="1" Recurse="1" MatchRoles=":%DB_${Namespace}" AuthenticationMethods="32"
       
    />
  </Namespace>

</Manifest>
}

ClassMethod setup(ByRef pVars, pLogLevel As %Integer = 3, pInstaller As %Installer.Installer, pLogger As %Installer.AbstractLogger) As %Status [ CodeMode = objectgenerator, Internal ]
{
  #; Let XGL document generate code for this method. 
  Quit ##class(%Installer.Manifest).%Generate(%compiledclass, %code, "setup")
}

}

Hi Oliver!

It was an issue in %Installer - the Import statement

<Import File="${SourceDir}" Flags="ck" Recurse="1"/>

was inside the Configuration tag started import before Interoperability (Ensemble) enabled in Namespace.

I put it below the configuration and it works.

Thanks @Dmitry Maslennikov for your help.

I sent you a pull request with the fix.