Article Evgeniy Potapov · Jul 19, 2022 7m read

When we collect temporary data (the number of purchases in the store, the number of comments on the post), it may happen that there is no data for a certain period of time. In this case, this time period (hour, day, month) is not represented in the database, that is, there is not a single row for this period. In other words, there are no rows in the database for this period.

1
0 558
Article Eduard Lebedyuk · Nov 20, 2019 9m read

In this article, I would like to talk about the spec-first approach to REST API development.

While traditional code-first REST API development goes like this:

  • Writing code
  • REST-enabling it
  • Documenting it (as a REST API)

Spec-first follows the same steps but reverse. We start with a spec, also doubling as documentation, generate a boilerplate REST app from that and finally write some business logic.

This is advantageous because:

  • You always have relevant and useful documentation for external or frontend developers who want to use your REST API
  • Specification created in OAS (Swagger) can be imported into a variety of tools allowing editing, client generation, API Management, Unit Testing and automation or simplification of many other tasks
  • Improved API architecture.  In code-first approach, API is developed method by method so a developer can easily lose track of the overall API  architecture, however with the spec-first developer is forced to interact with an API from the position if API consumer which usually helps with designing cleaner API architecture
  • Faster development - as all boilerplate code is automatically generated you won't have to write it, all that's left is developing business logic.
  • Faster feedback loops - consumers can get a view of the API immediately and they can easier offer suggestions simply by modifying the spec

Let's develop our API in a spec-first approach!

6
10 3520
Question Michael Davidovich · Jul 26, 2022

I have successfully created REST service classes on my local IRIS server following this book: Using the /api/mgmnt/ Service | Creating REST Services | InterSystems IRIS Data Platform 2021.2

I am now 1) trying to edit impl.cls in VS Code and 2) export it to my local repo so I can push to the remote repo.

When I click on my project in VS Code and 'Add to project' and choose the new package, spec.cls and impl.cls, I get the following error:

ERROR #5540: SQLCODE: -114 Message: Unable to acquire lock for INSERT of child row for parent table '%Studio.Project' with parent id = 'Default_project'

12
0 444
Question Joseph Tsang · Jul 14, 2022

Is there anyone using this callback in the code? I was searching in the latest IRIS documentation for any handy callbacks of the %Persistent class which allows me to execute some codes just right after a transaction has been committed (TCOMMIT). The description of this %OnSaveFinally() sounds the thing I want because it said:

If the calling method started a transaction then that transaction is completed prior to invoking the callback.

However, I later discovered in my own test that this callback is triggered after %Save(), not after TCOMMIT.

5
0 558
Question Mark OReilly · Jun 8, 2022

Hi:

Had an issue after upgrading to 2021.1 where search bar for interoability will bring up "INVALID ACTION". 

On upgrading to 2022.1 this still occurs. 

It did not occur on another environement that was upgraded from 2017.2 straight to 2022.1 

Is there any solution? Loads up SYS in url rather than customnamespacename

Issue is the url for instance brings through ip/csp/sys/EnsPortal.DTLEditor.zen?$NAMESPACE=X 

ip/csp/healthshare/customnamespace/EnsPortal.DTLEditor.zen?$NAMESPACE=X

I encountered this before and forget if there was a solution for this

1
0 379
Question Fabio Care · Jul 27, 2022

Hello all, 

i am currently struggling following the instructions for reading an image file into the database as a base64 string.

My goal is to save an image into a global as base64. I followed different guides like:

https://community.intersystems.com/post/how-save-png-image-cache-base64…

https://community.intersystems.com/post/how-save-fileimage-some-specifi…

https://cedocs.intersystems.com/ens20152/csp/documatic/%25CSP.Documatic…

Here is my current code:

5
0 641
Discussion Dmitry Maslennikov · Jul 10, 2022

I would say it is a post of pain after years of using InterrSystems IRIS Docker images in many projects.

And I hope InterSystems will hear me and do something with it.

We have a lot of issues with Docker images, but I see no progress in solving them.

  • containers.intersystems.com - any new releases substitute previous versions, makes build useless
    • ARM64 images have separate names, and it makes a pain to use them
  • flags in iris-main, appears and disappears from version to version, which may fail the start the container
  • healthcheck does not work as expected
3
0 816
Article Oliver Wilms · Jul 25, 2022 3m read

Hello,

I became aware of Python in the early 2000s when I started automating tasks. Some of our processes utilized python scripts. I never figured it out very well, and we decided to do away with Python because nobody on our team was familiar with it.

Along the way, I heard a lot about Python. My interest was renewed when InterSystems offered bonus points for using Python in contests.

The things I like the most about Python so far is how easy it is to find the mean of the ages of all Titanic passengers. For my test-data app I wanted to find the largest value in the ‘Qty’ column in a CSV file.

0
0 322
Question Adrian Izadpanah · Jul 25, 2022

Hi all,

I am looking at a task which involves processing an XML file. Picking the file up from a folder (c:\test.xml) reading the data out of the XML and archiving the xml after it has been processed.

I was wondering what the best way of doing this would be?

I have got as far as creating a service in Ensemble. The Service I have created uses the class name EnsLib.XML.Object.Service.FileService.

Any advice or tutorials/guides would be much appreciated.

Many Thanks

3
0 451
Question Iryna Mykhailova · Jul 22, 2022

Hello,

I found another question on how to change the language for Studio (but it would've been nice to have my actual language used - Ukrainian, since it's available, or was available). Still, I can't seem to figure out how to get rid of gibberish in the menu without changing the Windows settings:

5
0 380
Question Kurro Lopez · Jul 21, 2022

Hi all,

I've just  update the version of WebTerminal using the link, but now it doesn't work.

When call to /terminal is displaying the following error:

{
    "errors":[ {
            "code":5002,
            "domain":"%ObjectErrors",
            "error":"ERROR #5002: Error de cache: <INVALID OREF>zWrite+5^WebTerminal.StaticContent.1",
            "id":"ObjectScriptError",
            "params":["<INVALID OREF>zWrite+5^WebTerminal.StaticContent.1"
            ]
        }
    ],
    "summary":"ERROR #5002: Error de cache: <INVALID OREF>zWrite+5^WebTerminal.StaticContent.1"
}
3
0 322
Job Sridhar Mandalapu · Jul 24, 2022

Our Organization is working towards a long term contract with regards to HealthShare implementation in the US and are interested in speaking with HealthShare unified care record certified consultants who reside in the continental united states. Send me an message if you are interested in knowing more.

1
0 265
Announcement Anastasia Dyubaylo · Jun 3, 2022

Welcome to the May'22 Community Release!

We’ve made some enhancements to your experience recently in the InterSystems Community:

🆕 Improved current events tracking 

🆕 Scheduled posting 

🆕 Enhanced code formatting 

🆕 Faster table creation 

🆕 Enriched reply experience 

🆕 Changed post teaser design 

Let's have a closer look at all of these below. 

6
0 438
Announcement Anastasia Dyubaylo · Jul 20, 2022

Hi Developers!

We are introducing a new feature on Dev Community site – Key Questions by InterSystems Developers.

We've added a new special #Key Question tag to highlight questions related to InterSystems Data Platforms considered as having the biggest impact.

Each month InterSystems Experts will choose such questions, and those authors will be awarded with all the honours!

What honours? Details in this post! 

6
0 827
Question Jefferson Borges · Jul 21, 2022

Good morning. Perhaps someone can tell me if this IRIS health communit version (IRISHealth_Community-2022.1.0.209.0-lnxubuntu2004x64) is supposed

to work in an Ubuntu 20.04 LTS installation in an Oracle Virtual Box .

I am trying to install different versions on Ubuntu . I tried with the 18 version. No luck. Than I've tried with the 20.04 version. No luck either.

The error I am having now is below

///////////////////////// error message from the install ////////////////////////////////

home/epic/epicinstall/IRISHealth_Community-2022.1.0.209.0-lnxubuntu2004x64# ./irisinstall

3
0 560
Question Mary George · Jul 20, 2022

Can I please check if anyone know why the data base resource is created differently when creating a namespace after specifically selecting it to use the default resource %DB_%DEFAULT?

I created a namespace and when creating the DB I selected the option to use the default resource

When the namespace creation was complete , database is using a new resource instead of the default. 

2
0 470
Question Nezla · Jul 21, 2022

Hi Guys,

usually when I want to find out which class is a zen page is, I just right click on the page and go to properties and this will show me the class url, but with this client I don't get properties as below !?

Thanks

3
0 341