Find

Article
· Jun 6, 2024 2m read

Mover configuraciones específicas de Producción a Configuraciones Predeterminadas del Sistema

Al desarrollar una nueva Producción de Interoperabilidad, es bastante natural que los parámetros se añadan inicialmente en la Producción.

Sin embargo, en cuanto queréis mover la Producción de desarrollo a un entorno de prueba o staging, queda claro que algunos parámetros de configuración como Servidores HTTP, direcciones IP y/o puertos necesitan ser cambiados. Para evitar que estos parámetros se sobrescriban durante un redepliegue posterior, es esencial que mováis estos parámetros de la Producción a los Parámetros Predeterminados del Sistema.

Discussion (0)1
Log in or sign up to continue
Question
· Jun 6, 2024

Condition sur un objet dynamique vide

Bonjour, 

Je peux récupérer au sein d'un interop un objet dynamique vide : "{}"

Il faudrait que je puisse ajouter une condition afin de ne pas faire un traitement dans le cas ou je n'ai pas de contenu. Le seul moyen que j'ai trouvé pour l'instant c'est de vérifier si $LENGTH > 2 car cela me prend en compte les accolades. 

Avez-vous un moyen beaucoup plus propre ? 

Merci pour vos réponses

2 Comments
Discussion (2)2
Log in or sign up to continue
Article
· Jun 6, 2024 2m read

JSON_Table(SQL)の利用

これは、InterSystems FAQサイトの記事です。

IRIS/IRIS for Health2024.1以降のバージョンのSQLで、JSON_TABLE関数がサポートされています。
【ドキュメント】JSON_TABLE(SQL)

これを使用することにより、JSON形式データを表形式で取得することが出来ます。

【例】郵便番号情報を外部から取得し、表形式にマッピングする。
(取得データ(JSON))

{
	"message": null,
	"results": [
		{
			"address1": "東京都",
			"address2": "新宿区",
			"address3": "西新宿",
			"kana1": "トウキョウト",
			"kana2": "シンジュクク",
			"kana3": "ニシシンジュク",
			"prefcode": "13",
			"zipcode": "1600023"
		}
	],
	"status": 200
}

(SQL例)
 ※下記の実行には、SSL構成が必要になります。事前に構成を作成して、その構成名を使用してください。

SELECT
address1,address2,address3,kana1,kana2,kana3,zipcode
FROM JSON_TABLE(%Net.GetJson('https://zipcloud.ibsnet.co.jp/api/search?zipcode=1600023',
                             '{"SSLConfiguration":"test"}') , 
                             '$.content.results' COLUMNS ( address1 VARCHAR(100) PATH '$.address1', 
                                                           address2 VARCHAR(100) PATH '$.address2', 
                                                           address3 VARCHAR(100) PATH '$.address3', 
                                                           kana1 VARCHAR(100) PATH '$.kana1', 
                                                           kana2 VARCHAR(100) PATH '$.kana2', 
                                                           kana3 VARCHAR(100) PATH '$.kana3', 
                                                           zipcode VARCHAR(10) PATH '$.zipcode') ) as zipinfo

(取得結果(表形式))
  

 

2024.1より前のバージョンで、同様のことを行いたい場合は、以下のようにJSONを取得してパースし、テーブルに格納する処理を作成して対応します。

(ObjectScript例)

 set httprequest=##class(%Net.HttpRequest).%New()
 set httprequest.Https=1
 set httprequest.Server="zipcloud.ibsnet.co.jp"
 set httprequest.SSLConfiguration="test"
 set st=httprequest.Get()
 set st=httprequest.Get("/api/search?zipcode=1600023")
 set response=[].%FromJSON(httprequest.HttpResponse.Data)
 set results=response.results
 set iter=results.%GetIterator()
 while iter.%GetNext(.key,.resultobj) {
    //ZipInfoクラスにセット 
    set zipinfo=##class(FAQTest.ZipInfo).%New()
    set zipinfo.address1=resultobj.address1
    set zipinfo.address2=resultobj.address2
    set zipinfo.address3=resultobj.address3
        /*中略*/
    set zipinfo.zipcode=resultobj.zipcode       
      
    set st = zipinfo.%Save()
 }
Discussion (0)1
Log in or sign up to continue
InterSystems Official
· Jun 5, 2024

IRIS 2024.1 日本語ドキュメント公開 & ランチャーからの参照方法

このたび InterSystems IRIS 2024.1 の日本語ドキュメントが完成しました。以下のURLでご参照いただけます。


ランチャーから日本語ドキュメントを参照したい

<--break->IRIS for Windows で、ランチャーの [ドキュメント] をクリックしたときに、上記の日本語ドキュメントを表示させることが可能です。

ただし、このメニューのリンク先は http://localhost/<インスタンス名>/csp/docboook/DocBook.UI.Page.cls に固定されているため、日本語ドキュメントを表示させるには以下の手順にしたがい、IRISサーバ上に IIS および HTTPリダイレクト機能をインストールしたうえで、リダイレクトを設定する必要があります。


 

(1) IIS インストール (まだの場合)
IRISサーバ上に、IISをインストールします。
PowerShellを管理者モードで起動し、以下実行。再起動は不要。

Install-WindowsFeature -Name Web-Server -IncludeManagementTools

(2) HTTPリダイレクト機能追加 (まだの場合)
IRISサーバ上のIISに、リダイレクト機能を追加します。
PowerShellを管理者モードで起動し、以下実行。要Windows再起動

Enable-WindowsOptionalFeature -Online -FeatureName IIS-HttpRedirect

(3) 日本語ドキュメントへのリダイレクト設定
http://localhost/<インスタンス名>/csp/docbook -> 日本語オンラインドキュメント」へのリダイレクトを設定します。
コマンドプロンプトを管理者モードで起動し、以下3行実行。再起動不要。

※1つめのappcmdの /path は /<インスタンス名>/csp/docbook にします。以下の例では、インスタンス名=IRIS です。
※1つめのappcmdの /physicalPath は任意のフォルダで構いません。
※2つめのappcmdの /destination は、表示したいドキュメントの docbookj までを指定します。IRIS for Health を表示する場合は以下になります。
   /destination:https://docs.intersystems.com/irisforhealth20241/csp/docbookj 

cd C:\windows\system32\inetsrv
appcmd add app /site.name:"Default Web Site" /path:/iris/csp/docbook /physicalPath:c:\temp
appcmd set config "Default Web Site/iris/csp/docbook" /section:httpRedirect /enabled:true /destination:https://docs.intersystems.com/iris20241/csp/docbookj

 


appcmdで作った仮想アプリケーション (ここでは /iris/csp/docbook) は、IISコンソール画面から参照できません。
appcmd delete app "Default Web Site/iris/csp/docbook" を実行することで削除できます。


ぜひ日本語ドキュメントをご活用いただき、IRIS 製品をより便利にお使いください。

Discussion (0)0
Log in or sign up to continue
InterSystems Official
· Jun 5, 2024

What's new with InterSystems Language Server 2.5.0 - repost

Note: this was originally posted on June 5, 2024 but presented as being posted on May 9, 2024 so this re-post fixes the date. 

Recent updates to the Intersystems Language Server introduce many significant enhancements aimed at improving developer experience and productivity. I'll talk about some of the key ones here, while the complete list, including numerous bug fixes, can be found in the Language Server's CHANGELOG.

Detailed descriptions for syntax errors

In the past, all syntax errors were reported simply as "Syntax error." Now, the syntax error reported in VS Code's PROBLEMS pane has the same detail you find when compiling in the terminal, helping you more quickly identify and resolve issues in your code. In the below screenshot I have several errors in my ObjectScript code. On the left, under Before, the language server would only report, "Syntax error". Now, under After, you will find that the language server is able to provide much more useful error descriptions in the PROBLEMS pane. And remember, this all happens as you type -- prior to compilation. So it's a good idea to keep this pane visible if you often benefit from this kind of help.

 Warnings for SQL reserved words in persistent classes

You should already know that you should not try to use SQL reserved words in class names or properties. But in case you forget, or happen to use a more obscure one -- like LEVEL -- by mistake, the parser will now warn you even prior to attempting compilation. In the below screenshot I've named a property "unique". That's a reserved word in SQL, so it gets a warning underline and, when you hover over the underlined text, an appropriate message. 

Hover for class description when over a typed variable

When hovering over a variable, you now instantly see the class it represents along with the class' description. In the screenshot below, I'm hovering over the variable `task` on line 142 (of Tester.cls in the left pane). I get the full class name followed by the description provided by the class author. In the right pane I'm showing the source of rs.pipeline.Task so you can see where that information came from. 

Variable tracking in routine procedure blocks

If you write routines, you will now get warnings about potentially undefined variables in routine procedure blocks, just like you have long had for class methods. This is very helpful for preventing potential runtime errors that are often hard to identify!

 

Other updates document the latest features of IRIS, including vector functions, and add more comprehensive documentation and in-editor help features. Developers can now access detailed information and examples directly within their coding environment, reducing the need to switch contexts and look up external resources.

These new features collectively aim to streamline the coding process, reduce errors, and enhance overall productivity for developers using the Intersystems Language Server. Once again, for a detailed list of all changes and enhancements, you can check the full changelog on GitHub.

1 Comment
Discussion (1)2
Log in or sign up to continue